66 Commits

Author SHA1 Message Date
jst%netscape.com
8d2336ba83 Teaching idlc about the new nsString API.
git-svn-id: svn://10.0.0.236/trunk@66749 18797224-902f-48f8-a5cc-f745e15eee43
2000-04-21 21:29:19 +00:00
norris%netscape.com
fab29b0e70 Files:
caps/idl/nsICertificatePrincipal.idl
	caps/idl/nsIPrincipal.idl
	caps/src/nsBasePrincipal.cpp
Implement the ability to manipulate multiple capabilties simultaneously.
r=mstoltz@netscape.com

Files:
	caps/src/nsCodebasePrincipal.cpp
Codebase equality should be based upon origin, not full path.
r=mstoltz@netscape.com

Files:
	caps/src/nsScriptSecurityManager.cpp
Change URI checking to deny based upon scheme rather than allow based upon
scheme for greater flexibility.
r=mstoltz@netscape.com

Files:
	dom/public/nsDOMPropEnums.h
	dom/public/nsDOMPropNames.h
	dom/src/base/nsGlobalWindow.cpp
	modules/libpref/src/init/all.js
Fix bug 20469 Seeing JS functions and global variables from arbitrary host
r=vidur@netscape.com

Files:
	dom/src/base/nsJSUtils.cpp
	dom/src/base/nsJSUtils.h
	dom/src/base/nsJSEnvironment.cpp
	dom/tools/JSStubGen.cpp
	layout/base/src/nsDocument.cpp
	layout/html/content/src/nsGenericHTMLElement.cpp
Improve performance by removing NS_WITH_SERVICE call for every DOM access.
Propagate XPCOM failure codes out properly.
r=vidur@netscape.com

Files:
	layout/html/document/src/nsFrameFrame.cpp
Fix 27387 Circumventing Same Origin security policy using setAttribute
r=vidur@netscape.com


git-svn-id: svn://10.0.0.236/trunk@62633 18797224-902f-48f8-a5cc-f745e15eee43
2000-03-11 06:32:42 +00:00
vidur%netscape.com
bbd2782803 Fix for bug 27775. Introduced idl keyword 'replaceable' and marked some of the newer window properties with it. Fixes pages like www.oracle.com that have define window-scoped variables with the same name. r=rginda, a=chofmann
git-svn-id: svn://10.0.0.236/trunk@61441 18797224-902f-48f8-a5cc-f745e15eee43
2000-02-22 22:08:36 +00:00
norris%netscape.com
6fc5a6608b Fix bug #25864 watch() vulnerability
r=vidur,rogerl


git-svn-id: svn://10.0.0.236/trunk@59445 18797224-902f-48f8-a5cc-f745e15eee43
2000-02-02 00:22:58 +00:00
sfraser%netscape.com
ad79113dc9 Fix idlc code generation with nsCOMPtr. r=vidur.
git-svn-id: svn://10.0.0.236/trunk@58059 18797224-902f-48f8-a5cc-f745e15eee43
2000-01-18 01:01:27 +00:00
pp%ludusdesign.com
b5787cf895 Converting usage of ::GetIID() to NS_GET_IID().
Bug #20232, r=scc@netscape.com


git-svn-id: svn://10.0.0.236/trunk@57423 18797224-902f-48f8-a5cc-f745e15eee43
2000-01-11 20:49:15 +00:00
vidur%netscape.com
e8816c32e3 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
git-svn-id: svn://10.0.0.236/trunk@56330 18797224-902f-48f8-a5cc-f745e15eee43
1999-12-22 01:48:47 +00:00
jband%netscape.com
191411b358 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


git-svn-id: svn://10.0.0.236/trunk@56202 18797224-902f-48f8-a5cc-f745e15eee43
1999-12-18 20:29:29 +00:00
waterson%netscape.com
61fb6b819c Bug 21668. Ugh. Totally botched my patch application. Let's try that again.
git-svn-id: svn://10.0.0.236/trunk@56119 18797224-902f-48f8-a5cc-f745e15eee43
1999-12-17 00:26:08 +00:00
waterson%netscape.com
7d789bbc22 Bug 21668. Use nsCOMPtr (or Linss-ptr) to get the nativeThis. r=shaver
git-svn-id: svn://10.0.0.236/trunk@56116 18797224-902f-48f8-a5cc-f745e15eee43
1999-12-17 00:11:03 +00:00
norris%netscape.com
2429ef124a Fix 18553 [DOGFOOD] addEventListener allows sniffing keystrokes
Add checks to nsScriptSecurityManager::CheckCanListenTo that take
a principal and ensure that the currently executing script code
either is from the same origin as that principal or has the
UniversalBrowserRead privilege enabled. (chrome code has all
privileges enabled by default.) It's okay for the principal passed in
to be null. That just signifies a privileged window/document that only
can be listened to with privileges.

I added GetPrincipal/SetPrincipal methods to nsIEventListenerManager.
nsDocument::GetNewListenerManager sets a principal on the listener
manager when it creates one. Obviously there are other places that
create listener managers, but scripts seem to go through this one.

Another change is to save some memory usage. Currently I allocate an
array of PolicyType that is NS_DOM_PROP_MAX elements long.
Unfortunately, compilers appear to allocate four bytes for each
PolicyType, so the array takes around 2400 bytes. I've added changes
to use two bit vectors that should consume about 1/16 that space.

r=joki

There are also changes that push nsnull onto the JSContext stack when
entering a nested event loop.

r=jband


git-svn-id: svn://10.0.0.236/trunk@54477 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-25 05:28:18 +00:00
norris%netscape.com
f77a65d9d4 Modify generated dom code to use a enum rather than a string for codesize
and efficiency.
Tighten checks on document properties and node properties. Should resolve
several bugs:
18965 document.firstChild vulnerability
19043 document.childNodes vulnerability
19044 document.lastChild vulnerability
r=mstoltz


git-svn-id: svn://10.0.0.236/trunk@54051 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-20 07:28:34 +00:00
waterson%netscape.com
8f787ac240 Fix event listener leak in code that is generated to take functions. Fix to generate new NPL 1.1 license. r=joki
git-svn-id: svn://10.0.0.236/trunk@53902 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-18 20:38:43 +00:00
dmose%mozilla.org
92d791b7b0 updated license boilerplate to xPL 1.1, a=chofmann@netscape.com,r=endico@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@52908 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-06 03:40:37 +00:00
vidur%netscape.com
0b80e52b07 global object no longer has an unused constructor.
git-svn-id: svn://10.0.0.236/trunk@48943 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-23 23:52:09 +00:00
slamm%netscape.com
a0ba5c7dc6 Fix build warnings.
git-svn-id: svn://10.0.0.236/trunk@46586 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-09 19:16:12 +00:00
vidur%netscape.com
ccf644288f Added JS exceptions to DOM glue. Added implementation for nsIDOMDOMException. Added nsIScriptContextOwner::ReportScriptError.
git-svn-id: svn://10.0.0.236/trunk@46438 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-08 23:14:30 +00:00
joki%netscape.com
9db6478cb3 Adding new flag to the security check calls out of the DOM generated JS files.
git-svn-id: svn://10.0.0.236/trunk@45348 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-31 14:23:55 +00:00
vidur%netscape.com
97a1d958cd jsval can now be a parameter or return type. Got rid of unused variable warnings. Fixed secMan leak.
git-svn-id: svn://10.0.0.236/trunk@44759 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-27 06:06:24 +00:00
brendan%mozilla.org
5e48294f99 - Avoid generating "if (argc >= 0)" dead code and incurring warnings on some
platforms.  Those warnings were degrading slamm's tinderbox warning page's
  S/N ratio.
- Use const char arrays initialized by string constants, rather than const
  pointers to unnamed arrays created by string constants.
- Chop out some extra leading newlines that sometimes tripled up when emitted
  after a double trailing newline.


git-svn-id: svn://10.0.0.236/trunk@42944 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-10 06:59:03 +00:00
vidur%netscape.com
294ecfb965 Changed attribute getter glue to use NS_SUCCESS macro instead of comparing to NS_OK
git-svn-id: svn://10.0.0.236/trunk@42783 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-09 19:19:49 +00:00
waterson%netscape.com
db94f8f652 Fix missing cast in XPC case.
git-svn-id: svn://10.0.0.236/trunk@40711 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-22 21:57:29 +00:00
slamm%netscape.com
ae6533ee28 Remove unused variable (and compiler warning)
git-svn-id: svn://10.0.0.236/trunk@38475 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-06 23:38:33 +00:00
mcafee%netscape.com
02be303d37 BeOS changes
git-svn-id: svn://10.0.0.236/trunk@37120 18797224-902f-48f8-a5cc-f745e15eee43
1999-06-27 09:34:52 +00:00
pollmann%netscape.com
01652fd586 Bug 2195: Make select[n] == select.options[n] (idlc bugfix courtesy of Vidur)
git-svn-id: svn://10.0.0.236/trunk@35539 18797224-902f-48f8-a5cc-f745e15eee43
1999-06-15 23:41:30 +00:00
vidur%netscape.com
752bdba383 Changed reference counting rules for nsGlobalWindow - now its JSObject maintains a reference to it. The root for the global JSObject is now removed in SetWebShell when we're going away. Lots of null checks so that standalone global window doesn't crash.
git-svn-id: svn://10.0.0.236/trunk@35327 18797224-902f-48f8-a5cc-f745e15eee43
1999-06-15 03:17:11 +00:00
vidur%netscape.com
4823ea99ad JS_GetPrivate calls now go through a nsJSUtils wrapper that checks up the prototype chain. This is useful for applets where the JSClass instance is set as the proto of the LiveConnect-generated object.
git-svn-id: svn://10.0.0.236/trunk@34883 18797224-902f-48f8-a5cc-f745e15eee43
1999-06-11 22:38:35 +00:00
vidur%netscape.com
1e71bfb687 Fixes for bug 927. JS timer code can deal with the window closing in a timer callback. NamedItem gets called for unknown integer property values as well. Added nsCOMPtr generation option to idlc. Fixed warnings in generated code.
git-svn-id: svn://10.0.0.236/trunk@34861 18797224-902f-48f8-a5cc-f745e15eee43
1999-06-11 21:49:41 +00:00
vidur%netscape.com
0f89791d58 Added support for noscript qualifier to attributes and methods. When this qualifier is used, the corresponding attribute or method is not reflected in the glue.
git-svn-id: svn://10.0.0.236/trunk@33044 18797224-902f-48f8-a5cc-f745e15eee43
1999-05-28 00:17:38 +00:00
joki%netscape.com
dc86961440 Beginnings of JavaScript security bits.
git-svn-id: svn://10.0.0.236/trunk@32727 18797224-902f-48f8-a5cc-f745e15eee43
1999-05-26 21:43:28 +00:00
mccabe%netscape.com
7550d64eb3 Support for magically detecting whether an argument to an XPConnect'ed function is a dom node with a native nsISupports, and unwrapping it properly.
This'll go live as soon as I can persuade joki or vidur to rebuild the DOM stubs.


git-svn-id: svn://10.0.0.236/trunk@31201 18797224-902f-48f8-a5cc-f745e15eee43
1999-05-12 02:05:48 +00:00
law%netscape.com
0a79567556 Tweaking initializer code so it still works with appcores
git-svn-id: svn://10.0.0.236/trunk@30705 18797224-902f-48f8-a5cc-f745e15eee43
1999-05-07 19:37:21 +00:00
vidur%netscape.com
8339b3e79f Added use of the nsIJSNativeInitializer interface in constructors. Work in progress for unknown keyword.
git-svn-id: svn://10.0.0.236/trunk@30191 18797224-902f-48f8-a5cc-f745e15eee43
1999-05-04 20:48:50 +00:00
waterson%netscape.com
46470523bb Bug 5679. Fix leak from XPConnect glue.
git-svn-id: svn://10.0.0.236/trunk@30059 18797224-902f-48f8-a5cc-f745e15eee43
1999-05-04 03:32:12 +00:00
waterson%netscape.com
f838e4ca07 Fixed a problems with XPIDL parameters and return values ('out' params are stills broken). Got rid of the XPIDL_JS_STUBS defines, as they are obsolete.
git-svn-id: svn://10.0.0.236/trunk@29404 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-27 06:14:08 +00:00
waterson%netscape.com
24bc601a81 Modified JSStubGen to spit out correct code from XPConnect.
git-svn-id: svn://10.0.0.236/trunk@29014 18797224-902f-48f8-a5cc-f745e15eee43
1999-04-24 02:38:05 +00:00
joki%netscape.com
8139ab8bcf New DOM2 event api's.
git-svn-id: svn://10.0.0.236/trunk@25415 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-28 22:19:42 +00:00
waterson%netscape.com
a0c57020f4 Must've missed this file in my merge: support for xpidl keyword.
git-svn-id: svn://10.0.0.236/trunk@23554 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 20:15:23 +00:00
vidur%netscape.com
2cf6b40bda Added CreateElementWithNameSpace to proprietary document interface. Fixed GetTagName for HTML to uppercase tag names. Hooked up style rule addition and deletion to reconstruct frames. Fixed DOM generation problem
git-svn-id: svn://10.0.0.236/trunk@23441 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-10 01:17:49 +00:00
warren%netscape.com
0b33372d99 nsRepository -> nsIComponentManager changes.
git-svn-id: svn://10.0.0.236/trunk@23300 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-09 09:44:27 +00:00
sfraser%netscape.com
7e33e3843a Changes to get DOM IDL compiler to build on Mac.
git-svn-id: svn://10.0.0.236/trunk@23002 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-06 00:33:35 +00:00
waterson%netscape.com
f8f837b4fc Made NS_InitFooClass() accessable outside of JSDOM.DLL.
git-svn-id: svn://10.0.0.236/trunk@20918 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-17 08:32:14 +00:00
vidur%netscape.com
4ef7dcc47f Added script namespace management mechanism. This allows external native code to add symbols and constructors to the script global namespace. Added IID() static method generation to IDL generator.
git-svn-id: svn://10.0.0.236/trunk@16821 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-22 22:03:20 +00:00
cls%seawood.org
4c418bae35 Added build option for idl tool. Thanks to Tague Griffith <tague@netscape.com> for the patch and the patience while I fumbled this patch. :)
git-svn-id: svn://10.0.0.236/trunk@16404 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-15 03:24:59 +00:00
vidur%netscape.com
8675dc74ce Slimmed down DOM code by creating a few utility functions for conversion, etc. Fixed bug 1656 - bug in generator with an enum value of 0.
git-svn-id: svn://10.0.0.236/trunk@15654 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-03 00:33:00 +00:00
vidur%netscape.com
a0e09b1568 Updated DOM interfaces to match final W3C recommendation. Modified IDL compiler to take IIDs
git-svn-id: svn://10.0.0.236/trunk@13207 18797224-902f-48f8-a5cc-f745e15eee43
1998-10-20 17:07:23 +00:00
vidur%netscape.com
5e8d2d6415 Added new style interfaces. Modified property slot id allocation.
git-svn-id: svn://10.0.0.236/trunk@11001 18797224-902f-48f8-a5cc-f745e15eee43
1998-09-25 00:49:44 +00:00
vidur%netscape.com
e792ef87b8 Added constructors for DOM JS classes. nsIScriptObjectOwner::ResetScriptObject is now SetScriptObject. New factory for layout. New interface nsIDOMNativeObjectRegistry.
git-svn-id: svn://10.0.0.236/trunk@10238 18797224-902f-48f8-a5cc-f745e15eee43
1998-09-17 01:53:52 +00:00
vidur%netscape.com
82f15807dd Got rid of Construct method from nsIJSScriptObject interface.
git-svn-id: svn://10.0.0.236/trunk@10003 18797224-902f-48f8-a5cc-f745e15eee43
1998-09-14 23:01:48 +00:00
vidur%netscape.com
833ee5f0d5 Added stopgap code for aliased constructors
git-svn-id: svn://10.0.0.236/trunk@9854 18797224-902f-48f8-a5cc-f745e15eee43
1998-09-11 18:05:11 +00:00