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
a=i'm leaving now for vacation, and i can't find anyone around, but i'm assuming that you
actually want them before January 3rd, so I'm checking them in.
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
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.
- 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)