Commit Graph

953 Commits

Author SHA1 Message Date
saari%netscape.com
8e132ddbbe part of previous checkin 2000-01-26 22:48:16 +00:00
saari%netscape.com
c2981cef58 fix for 14346, 21854, 24380 and other caret bugs. r= hyatt, brade for the mac menu stuff. 2000-01-26 22:41:43 +00:00
norris%netscape.com
7ec9655d07 Fix 23227 Document object vulnerability
r=mstoltz
2000-01-26 15:33:57 +00:00
dcone%netscape.com
e31204f271 support for regression testing. r=rods 2000-01-26 15:14:41 +00:00
jband%netscape.com
eef6de8432 Lots of xpconnect bug fixes...
- fix bug 12954 "should throw when setting non-settable props".

- fix bug 13418 "xpconnect needs to be threadsafe".
I think I filled in the cracks. Tests would be nice :)

- fix bug 22802 "[MLK] XPConnect Leaks".

- fix bug 24119 "[MLK] Reminder about cleaning up maps".

- fix bug 24453 "xpconnect needs default security manager".
I also changed the code in DOM and caps to just install a default secman and
not install a secman for each JSContext.

- fix bug 24687 "xpconect should avoid resolve performance suckage".
Added (modified) patch from shaver to create my JSObjects with the
global object as the temporary proto to avoid losing lookup.

- hack for bug 24688 "runtime errors in wrapped JS are not made obvious"
Added a debug only printf. We still need a JSErrorConsole service for this.

- fix bug 16130 "createInstanace and getService can create wrappers around wrappers"
Fixing this one really entailed changing the semantics of nsIXPConnect::wrapNative
and nsIXPConnect::wrapJS to use common code in xpcconvert that deals with existing
wrappers and DOM objects (with their own schemes for wrapping and unwrapping).
So, I changed the callers because the params changed slightly and some callers
were doing more work than necessary given the new semantics.

- Continued in the crusade to replace manaual refcounting with nsCOMPtrs whenever
touching old code.

- Added myself as first contributor to xpconnect files (vanity prevails!)

- Added new copyright header on some files that were missing it.

- Added some API comments.

- Converted nsXPCWrappedJS to implement nsIXPConnectWrappedJS via MI rather than
the old loser scheme of the nsIXPConnectWrappedJSMethods tearoff object.

- added DumpJSStack as globals to xpconnect and DOM dlls to be callable from
debuggers. I have ideas on how to improve and expand this support soon.

r=mccabe
2000-01-26 08:38:10 +00:00
hyatt%netscape.com
0dfb94bf0a Fixes for bugs: 18193, 13971, 23440, 18444, 21462, 21818, 22619, 23498, 24081, and 21972. r=just about everybody. 2000-01-25 06:35:27 +00:00
norris%netscape.com
8507a58ec3 Files:
caps/include/nsScriptSecurityManager.h
	caps/src/nsScriptSecurityManager.cpp
	modules/libpref/src/init/all.js
Fix
24565 nsScriptSecurityManager::GetSecurityLevel() is a performance
24567 re-write DOM glue security checks to avoid NS_WITH_SERVICE()
r=waterson

Files:
	dom/src/base/nsGlobalWindow.cpp
	layout/base/src/nsDocument.cpp
	layout/base/src/nsGenericElement.cpp
Fix assertion failure for 1-character property names.


Files:
	dom/src/jsurl/nsJSProtocolHandler.cpp
	webshell/src/nsDocLoader.cpp
Fix 18653 "javascript:" URLs cross windows problems (probably regressi
r=nisheeth

Files:
	layout/events/src/nsEventListenerManager.cpp
Fix
23834 document.onkeypress allows sniffing keystrokes
24152 document.onclick shows links from other window
r=joki
2000-01-23 04:23:14 +00:00
waterson%netscape.com
d100985675 Bugs 18127, 20677, 23905. Partial fix. Give the nsXULPrototypeDocument it's own JSContext to use for compiling scripts and event handlers. Modify script and event handler code to compile shared scripts using this context, if appropriate. r=brendan 2000-01-22 22:00:35 +00:00
michael.lowe%bigfoot.com
6696fa133b Repeating, prioritised timer implementation for Windows and Gtk (bug 22979). author={Win32=michael.lowe@bigfoot.com, Gtk=alex@cendio.se}, r={kmcclusk,rods,sfraser,et al} a=brendan 2000-01-21 21:56:09 +00:00
vidur%netscape.com
29ac9e129a Fix for bug 24215. Misspelled constant. 2000-01-19 01:40:48 +00:00
vidur%netscape.com
41d1ed74ad Cleanup - dealing with people modifying the idl generator and not checking in the generated file or vice-versa. r=pollmann. 2000-01-18 23:41:27 +00:00
vidur%netscape.com
7aa3c33c9c Fix for bug 9378. document.layers now returns undefined, not null. r=pollmann 2000-01-18 23:35:47 +00:00
sfraser%netscape.com
fd5ce2c430 More of fix for 14026; call through to the controller for edit menu items, now that it does the right thing. r=saari 2000-01-18 21:07:54 +00:00
sfraser%netscape.com
d80cd3f7e3 Fix idlc code generation with nsCOMPtr. r=vidur. 2000-01-18 01:01:27 +00:00
morse%netscape.com
788b972e65 fix crash on e-mail startup, jar's suggested fix 2000-01-17 08:50:16 +00:00
danm%netscape.com
325b6a262a let webshell window know when a window has a size specified in JS. bug 15555. r:hyatt 2000-01-15 02:32:31 +00:00
vidur%netscape.com
61085e3a2a Fix for bug 22594. Implemented window.escape() and unescape(). R=ftang 2000-01-15 02:26:10 +00:00
vidur%netscape.com
e296114aae Fix for bug 23020. Relative URLs used in image.src and location.href should be resolved taking into account the base document URL of the calling context. R=pollmann 2000-01-15 02:02:27 +00:00
tao%netscape.com
da49ef2262 bug 23400: Need to expose api GetDocumentCharacterSet() to JS. r=vidur. 2000-01-15 02:01:05 +00:00
pollmann%netscape.com
9cdc409fde Bug 14419 (4 of 4): Make option text read/write (glue implementation) r=harishd 2000-01-15 01:50:18 +00:00
pollmann%netscape.com
ea78836d79 Bug 14419 (3 of 4): Make option text read/write (glue header) r=harishd 2000-01-15 01:49:39 +00:00
pollmann%netscape.com
dfef0be8c9 Bug 14419 (2 of 4): Make option text read/write (idl) r=harishd 2000-01-15 01:45:02 +00:00
alecf%netscape.com
714e7a48a9 expose the form controls in a XUL document in the "controls" DOM attribute
this will make prefs and wizards much faster
r=hyatt
2000-01-13 02:59:08 +00:00
danm%netscape.com
5d32515178 explicitly skip URL load if no URL param was specified in window.open. fixes bug 20757. similar to rev 1.200 (backed out in 1.201), though something went wrong with that one. not sure what. this one tests well. patch submitted by bissiri@eecs.umich.edu. r:me 2000-01-11 22:52:04 +00:00
pp%ludusdesign.com
698852a4f4 Converting usage of ::GetIID() to NS_GET_IID().
Bug #20232, r=scc@netscape.com
2000-01-11 20:49:15 +00:00
hyatt%netscape.com
21a48fa26a adding behavior property to CSS. r=brendan 2000-01-11 03:40:41 +00:00
norris%netscape.com
ddb2282b6c Fix
858  [Feature] JavaScript auto-disable per-domain RFE
    13023 Users must be able to disable Java and JavaScript (for JS in mail)
    21923 Executing functions in "chrome:" protocol - #2.
    r=mstoltz

    (Checked in with red on Mac; Wan-Teh says his changes are localized so
     it shouldn't interfere with his fixing bustage.)
2000-01-08 16:51:54 +00:00
brendan%mozilla.org
cfe8cb3e89 (bug 22795, r=vidur@netscape.com)
- Add "aShared" flag to nsIScriptContext::CompileEventHandler, telling it to clear the compiled event handler's scope chain if true, in order to
  (a) avoid entraining garbage
      (i.e., a shared compile-time-only parent object); and
  (b) cause later BindCompiledEventHandler calls to ensure that the event handler has the particular scope chain needed for the binding
      (to the target object that's receiving the event).
- Use :: consistently (and all over the place) before calls to JS_ functions in nsJSEnvironment.cpp.
- Eliminate tabs and barbarians-at-the-gate-of-Rome style, in favor of when-in-Rome style (hail Waterson Maximus!)
2000-01-08 00:24:24 +00:00
vidur%netscape.com
b845753fb6 Fix for bug 23074. Implemented image.complete. r=pollmann 2000-01-06 23:41:14 +00:00
norris%netscape.com
3133f8c77d Fix assertion failure at startup caused by failure to run genPropNames.pl.
r=mstoltz@netscape.com
2000-01-06 22:04:18 +00:00
alecf%netscape.com
cb1027f2f0 add new method to ensure that tree content is visible: go through all the presentation shells, and call EnsureRowIsVisible for each tree.
also expose a method to get the visible row for a tree - I needed it anyway, figured I might as well expose it from JS.
other half of fix for #12895
r=bryner
2000-01-06 07:54:43 +00:00
vidur%netscape.com
3cc928f744 Fix for bug 23066. Added getter/setter for image.lowsrc for compatibility - the DOM defines image.lowSrc (note the case difference). r=pollmann 2000-01-06 01:15:55 +00:00
norris%netscape.com
4f128298d2 Fix 22909 previousSibling vulnerability
r=mstoltz
2000-01-06 00:59:18 +00:00
norris%netscape.com
cb73c0030f Work on 18860 impossible to call applet's public methods from JavaScript 2000-01-06 00:58:16 +00:00
norris%netscape.com
20420e71d1 Fix error when getting property names only one character long.
r=vidur
2000-01-06 00:55:23 +00:00
vidur%netscape.com
8f980ae60c Temporary fix for bug 22795. The scope link should only be broken in the brutal sharing case. Brendan to provide a better fix later. r,a=brendan 2000-01-06 00:39:18 +00:00
danm%netscape.com
e48e2108a7 backing out 1.199, which breaks sooooo many things. oops. 2000-01-05 01:27:40 +00:00
danm%netscape.com
c9b5268447 explicitly skip URL load if no URL param specified in window.open. fixes bug 20757. patch submitted by bissiri@eecs.umich.edu. r:me 2000-01-04 22:29:57 +00:00
vidur%netscape.com
d37c5c5323 Fix for bug 16787. Added navigator.cookieEnabled. Removed warnings. a=don r=waqar 1999-12-22 22:42:06 +00:00
vidur%netscape.com
21a755c03d Partial fix for bug 22413. Create generic script instances for layer and ilayer elements. a=don r=waqar 1999-12-22 22:32:41 +00:00
vidur%netscape.com
70de582cc6 Fix for bug 18840. Radio button groups are now reflected as collections in a form's namespace. Added nsIDOMHTMLFormControlList interface and special handling for namedItem method that return a jsval. a=dagley r=pollmann 1999-12-22 01:48:47 +00:00
vidur%netscape.com
87722ed65b added files: mozilla/dom/src/html/nsJSHTMLFormControlList.cpp 1999-12-22 01:48:41 +00:00
vidur%netscape.com
f2a687efd0 Fix for 20955. Fixed FMMs in window.navigator methods. a=dagley r=pollmann 1999-12-22 01:43:48 +00:00
jband%netscape.com
ef9c82db1e Landing big set of DOM and XPConnect changes:
DOM: getting rid of JS_GetContextPrivate wherever possible. Use static parent
links where we can. When we do need to find this info about the caller
we call a function that knows how to get that info rather than inline calls
to JS_GetContextPrivate. This is all required for calling DOM objects on
non-DOM JSContexts as we do via xpconnect.

XPConnect: basic refactoring work to disassociate wrappers from the JSContext
that was active when the wrapper was constructed. This allows for calling into
wrapped JS objects on the right JSContext and for proper grouping of wrapped
native objects so that they can share proto objects. This also allows for
better sharing of objects and lays the foundations for threadsafety and
interface flattening.

Also, xpconnect tests are reorganized and improved.

fixes bugs: 13419, 17736, 17746, 17952, 22086

r=vidur r=mccabe r=norris r=cbegle
a=chofmann
1999-12-18 20:29:29 +00:00
tbogard%aol.net
1f9c8343b4 DOMWindow List now holds on to a docshell interface rather than a webshell. Tweaked some of the finding of named frames to adhere to spec. GlobalWindowImpl now in many places talks to the webshell object as a docshell rather than the old webshell interfaces. Fixed bug #21970. r=vidur 1999-12-17 22:25:22 +00:00
syd%netscape.com
9ad549aeef Change calls to Flash(void) in nsIWidget, nsWindow to GetAttention().
r=sdagley a=chofmann. Add support for GetAttention API to nsIDOMWindow.
r=vidur, a=chofmann. To do, make call to WebShell from nsIDOMWindow,
this will come once travis lands some webshell code.
1999-12-17 06:11:45 +00:00
mscott%netscape.com
5f4692f308 fix antother webshell leak. Add a CleanUp method to the global window. When the global window is told it is closing,
call the CleanUp method to force it to release all of it's state.
r=vidur, a=chofmann
1999-12-17 00:50:17 +00:00
waterson%netscape.com
b3cf5bd138 Bug 21668. Ugh. Totally botched my patch application. Let's try that again. 1999-12-17 00:26:08 +00:00
waterson%netscape.com
baa1f3847b Bug 21668. Use Linss-ptr (or nsCOMPtr) to avoid leaking nativeThis. (Unfortunately, I also picked up some whitespace diffs from previously un-regenerated files. Ignore that!) r=shaver 1999-12-17 00:15:51 +00:00
waterson%netscape.com
cef34d8d22 Bug 21668. Use nsCOMPtr (or Linss-ptr) to get the nativeThis. r=shaver 1999-12-17 00:11:03 +00:00
waterson%netscape.com
52fe23a466 Bug 21364. Break parent and proto pointers after compiling shared event handler. shaver mostly did this. r=brendan. Also, fix extra addref of global object, thanks mscott! 1999-12-17 00:08:28 +00:00
mjudge%netscape.com
9cb4dbc615 adding in lineup/down code 1999-12-15 03:59:38 +00:00
danm%netscape.com
92a48a543e check for null context in CheckTimeout. add another deathgrip in HandleDOMEvent. part of fix for bug 19302. r:hyatt a:chofmann 1999-12-15 02:14:53 +00:00
vidur%netscape.com
76b192e1f0 Backing out because of bogus checkin comment 1999-12-15 00:28:32 +00:00
vidur%netscape.com
7eee3537f3 Fix for bug 21368. navigator.plugins methods were returning an error code if the plugin wasn't found instead of returning null. a=jar R=pollmann. 1999-12-15 00:25:00 +00:00
vidur%netscape.com
b5706304c1 Fix for bug 21368. navigator.plugins methods were returning an error code if the plugin wasn' 1999-12-15 00:24:24 +00:00
vidur%netscape.com
8937c4d924 Fix for bug 10644. In cases where we expect boolean attributes, accept anything that can be converted to a boolean. a=jar r=pollmann. 1999-12-15 00:24:02 +00:00
syd%netscape.com
180c85a27e Window.idl was not being built if you did this on Linux (Makefile.in
rot). r=vidur, a=brendan (related to but does not fix PDT+ 18518).
1999-12-14 23:48:08 +00:00
vidur%netscape.com
657729a882 Fix for bug 9787. Implemented a stub version of document.clear. Fix necessary for getting in 20737. a=chofmann r=pollmann. 1999-12-14 23:32:26 +00:00
danm%netscape.com
fe29f5d7a5 deathgrip chrome event handler in HandleDOMEvent. partial fix for bug 21397. r:hyatt a:chofmann 1999-12-14 02:28:16 +00:00
mjudge%netscape.com
b564a31389 forgot newline at end of file. causing warning 1999-12-14 01:41:27 +00:00
mjudge%netscape.com
61f17031a2 2 files mcluskey reviewed, saari also. fix for keybindings pageup/down. ya 1999-12-14 01:38:17 +00:00
akkana%netscape.com
54aa51a733 Fixing build bustage on Linux 1999-12-14 00:55:37 +00:00
davidm%netscape.com
231d707531 #ifdef out code for controller. Checkin to unblock mjudge and other r= mjudge 1999-12-13 23:13:33 +00:00
jdunn%netscape.com
0a5450b336 nsCOMPtr is supposed to wrap interface references and not class references
r= chofmann@netscape.com danm@netscape.com
# 20193
1999-12-09 21:44:16 +00:00
hyatt%netscape.com
9471c4c457 Modifications to support the command dispatcher. r=saari 1999-12-08 04:58:05 +00:00
hyatt%netscape.com
f23566bf16 Massive rewrite of the key binding system and the command dispatcher. Key
bindings are now fully hierarchical.  In addition, DOM windows, input fields
and textareas can pull their key bindings from a separate XUL file.  This
allows configurable key bindings.

Massive rewrite of the command dispatcher system.  The command dispatcher now
deals with DOM windows in addition to DOM elements.  It now tracks both
successfully and works in conjunction with the new focus/blur architecture.

r=saari
1999-12-08 04:56:56 +00:00
vidur%netscape.com
68f79c1ca8 Fix for bug 17857. Relative URLs for script-based setting of the SRC attribute now does resolution relative to the calling context. R=nisheeth. 1999-12-08 03:52:01 +00:00
brendan%mozilla.org
5135a6dbb2 - Rename "FunctionObject" or shorthands to "EventHandler" to make nsIScriptContext more scripting-language-neutral.
- Allow nsIScriptContext::BindEventHandler to take a null void* handler argument, to remove the binding by nullifying it (for hyatt's XML-driven-key-mapping work). 
- Try to GetCompiledEventHandler (and if we don't, and compile it, Put too) for the load event and other non-deferred (XUL window-level) event listeners. 
- Improve doc comments and whitespace.
1999-12-07 22:14:17 +00:00
danm%netscape.com
1b74898ee7 add deathgrip to JSContext to prevent its untimely destruction. fixes bug 20193. r:brendan@mozilla.org 1999-12-07 02:39:17 +00:00
ftang%netscape.com
5d9824b4bd add query composition event which get current curosor position. add timer base IME x y location query for gtk. r=erik. fix bug 17916 20550 1999-12-07 01:29:00 +00:00
waterson%netscape.com
3ef74ab388 Bug 20785. Clone function object to define as event handler property. Checked in for brendan@mozilla.org 1999-12-06 08:27:03 +00:00
waterson%netscape.com
ec2655c506 Bug 20786. Use function object, rather than function, as the thing which is executed, ensuring that the correct bindings are used when the function is shared across several contexts. This checkin is really brendan@mozilla.org; I'm just landing the code. 1999-12-05 07:29:25 +00:00
warren%netscape.com
6af4802e75 Added buffer size parameters to NewChannel. Allows for optimization of amount of image data consumed. Bug #20408 1999-12-04 10:01:32 +00:00
vidur%netscape.com
0877a41ffc Changed IID to remove conflict in IIDs.h 1999-12-04 01:29:54 +00:00
tbogard%aol.net
d6a8d07409 Fixing the mail bustage. Was accidently using the internal object instead of the one passed in. 1999-12-03 21:41:35 +00:00
tbogard%aol.net
79ca59ef74 Fixed the merge. 1999-12-03 21:13:50 +00:00
tbogard%aol.net
9e5b4606dd Flipped the if. Was not continuing on success. 1999-12-03 21:11:30 +00:00
waterson%netscape.com
139d5cb27f Use more mundane macros to fix backwards logic. 1999-12-03 21:08:56 +00:00
tbogard%aol.net
c50e9ef9dd Fixed a bug where the first time to try and get the location object was failing. 1999-12-03 19:41:22 +00:00
tbogard%aol.net
f35fd0e55a Fixes to get rid of relying on webShell implementing nsIScriptContextOwner. It now implements nsIScriptGlobalObjectOwner or can do a GetInterface to nsIScriptGlobalObject. 1999-12-03 19:02:31 +00:00
tbogard%aol.net
eb96099e6d 1.) WebShell no longer implements nsIScriptContextOwner.
2.)  WebShell now implements the new nsIScriptGlobalObjectOwner.
3.)  WebShell supports GetInterface to nsIScriptGlobalObject.
4.)  Documents no longer carry around a reference to nsIScriptContextOwner.  Instead they hold on to a nsIScriptGlobalObject.  nsIDocument::GetScriptContextOwner has now become nsIDocument::GetScriptGlobalObject().  Same change to the set methods.
1999-12-03 09:24:22 +00:00
brendan%mozilla.org
87f3583410 Mac doesn't have ctype.h, or something. 1999-12-03 06:11:54 +00:00
brendan%mozilla.org
d44c35ee1b - Doc-comments for nsIScriptContext methods I added or modified.
- Rename nsIScriptContext::CompileFunction to CompileEventHandler, and add BindCompiledEventHandler, to reflect function name restrictions and help brutal sharing.
- Add adjunct-interface nsIScriptEventHandlerOwner to nsIScriptObjectOwner.h; this interface is queried for by nsEventListenerManger.cpp to test and fill the XUL prototype event handler "cache".
- PR_LOG JS warnings, and look in javascript.options.{strict,werror} for those options.  
- Implement nsIScriptEventHandlerOwner in nsXULElement, keeping pointers to pre-compiled event handlers in nsXULPrototypeAttribute.
 
(bug 13218, r=waterson@netscape.com,vidur@netscape.com)
1999-12-03 03:40:30 +00:00
drapeau%eng.sun.com
b12618788f Fix for bug 18899 ('Make "--enable-oji" as part of the default Mozilla
Build').  Modified files that conditionally compiled in support for
OJI, replacing with code that looks for OJI as an XPCOM service, and
failing gracefully if the OJI XPCOM service is not found.  The four
files modified by this fix are the only active ones; other modules
that conditionally compile in support for OJI appear to be dead code.

r=drapeau@eng.sun.com.  Fix contributed by Jayashri Visvanathan
(visvan@eng.sun.com).
1999-12-03 00:26:09 +00:00
norris%netscape.com
98862d9415 Fix bug 18636 java script security problem when accessing my.netscape.com/
r=mstoltz
1999-12-02 23:56:25 +00:00
tbogard%aol.net
daa4db77af Adding nsIScriptGlobalObjectOwner.idl to the manifest. 1999-12-02 06:18:32 +00:00
tbogard%aol.net
b0ab7a8495 added files: mozilla/dom/public/nsIScriptGlobalObjectOwner.idl 1999-12-02 06:17:29 +00:00
tbogard%aol.net
ec4119174e Connecting nsIScriptGlobalObjectOwner.idl to be compiled. Not yet used anywhere. 1999-12-02 06:16:08 +00:00
tbogard%aol.net
5a3a6e0145 Adding new interface for people who can supply an nsIScriptGlobalObject. Not yet connected to the build. 1999-12-02 06:14:49 +00:00
danm%netscape.com
d25d8e587a adding 'close' xul event handler. part of bug 13695. r:hyatt@netscape.com 1999-12-01 22:35:33 +00:00
norris%netscape.com
d89d87531c Fix
20257 unable to edit existing images in editor due to JS error
	19933 JavaScript "window.location" core dumps in CAPS
Back out previous changes for enforcing security on listeners and go with a
simple restriction of access to the method for adding listeners.
r=mstoltz
1999-12-01 22:23:22 +00:00
shaver%netscape.com
1a0aec6215 fix windows filename case damage, r=brade,sdagley 1999-12-01 16:11:07 +00:00
rods%netscape.com
f1a98d55ca removing all lower case version of this file 1999-12-01 16:10:00 +00:00
rods%netscape.com
4749742331 bug 2253 1999-12-01 15:54:59 +00:00
buster%netscape.com
fd31de07ac bug 2253. added controller to html text input
r = kmcclusk, norris
1999-12-01 15:11:33 +00:00
hyatt%netscape.com
074f2362e4 More skin goodness. r=gimpy 1999-11-30 09:29:43 +00:00
warren%netscape.com
2db26922a6 Landing no_neckoutil2_branch. Bug #11159. Removes neckoutil_s.lib from build which helps beos and openvms. 1999-11-30 04:50:42 +00:00
tbogard%aol.net
b79a4cc957 Removing now that the interface definition can be found in the IDL file. 1999-11-30 04:09:16 +00:00
tbogard%aol.net
887609d285 Would help if I removed nsIScriptContextOwner.h instead of nsIScriptObjectOwner.h 1999-11-30 00:28:40 +00:00