48 Commits

Author SHA1 Message Date
dbaron%fas.harvard.edu
772b5b8c58 Convert users of nsAReadable[C]String and nsAWritable[C]String typedefs to [const] nsA[C]String. b=131899 r=scc sr=jag a=asa
git-svn-id: svn://10.0.0.236/trunk@117354 18797224-902f-48f8-a5cc-f745e15eee43
2002-03-24 00:16:18 +00:00
jst%netscape.com
a49bb992db Fixing bug 116834. Making element.innerHTML='...<script>...</script>...' not execute the script, this makes mozilla compatible with IE wrt innerHTML and execution of scripts. r=bzbarsky@mit.edu, sr=rpotts@netscape.com
git-svn-id: svn://10.0.0.236/trunk@113684 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 05:53:56 +00:00
jst%netscape.com
19215022f1 Fixing bug 105572. Don't bother GC'ing on context destruction when we're tearing down a frame in a frameset (or an iframe). r=jband@netscape.com, sr=vidur@netscape.com
git-svn-id: svn://10.0.0.236/trunk@105748 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-19 04:13:37 +00:00
gerv%gerv.net
612ee840db License changes, take 2. Bug 98089. mozilla/dom/.
git-svn-id: svn://10.0.0.236/trunk@103755 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-25 22:43:09 +00:00
dbaron%fas.harvard.edu
9359000a40 Header include dependency cleanup. b=64023 r=jag rs=brendan
git-svn-id: svn://10.0.0.236/trunk@99299 18797224-902f-48f8-a5cc-f745e15eee43
2001-07-16 02:40:48 +00:00
dbaron%fas.harvard.edu
88810ef1eb Fix bad getters on nsIDocument and nsIScriptContext to use out params rather than return |AddRef|ed pointers. b=81289 r=jaggernaut sr=jst a=asa
git-svn-id: svn://10.0.0.236/trunk@97540 18797224-902f-48f8-a5cc-f745e15eee43
2001-06-20 03:27:48 +00:00
radha%netscape.com
52d37371b0 Fix for bug # 72197 javascript urls cause problems with history r= rpotts sr=blizzard
git-svn-id: svn://10.0.0.236/trunk@95060 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-15 22:26:19 +00:00
jst%netscape.com
43eee52859 Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
git-svn-id: svn://10.0.0.236/trunk@94242 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-08 17:42:36 +00:00
jband%netscape.com
e9ee268b9d fix bug 52579. Avoid infinite recursion dialog when JS is run by xpconnect on DOM context. a,r=brendan@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@79277 18797224-902f-48f8-a5cc-f745e15eee43
2000-09-15 06:17:08 +00:00
danm%netscape.com
be2b97977f new method SetRootedScriptObject. bug 43466 r=brendan
git-svn-id: svn://10.0.0.236/trunk@77316 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-26 23:32:52 +00:00
jst%netscape.com
7e0575bfee DOM string changes. All nsString& in DOM interfaces (and interfaces needed by DOM implementations) have been changed to nsAReadableString& and nsAWritableString&. String implementation additions (sanctioned by scc) to support DOM needs. Bug 49091. r=vidur,jst,scc
git-svn-id: svn://10.0.0.236/trunk@76967 18797224-902f-48f8-a5cc-f745e15eee43
2000-08-23 17:27:06 +00:00
joki%netscape.com
8aabc79a05 fixes for 5995, 7304, 10573, 22832, and 9668.
Changes to event handling to deal with reentrant events, cursor fixes, and return value fixes.


git-svn-id: svn://10.0.0.236/trunk@66958 18797224-902f-48f8-a5cc-f745e15eee43
2000-04-24 04:41:27 +00:00
jst%netscape.com
cb06101661 Eliminating the last traces of NS_COMFALSE from the DOM code, fixes M15 bug #11594.
git-svn-id: svn://10.0.0.236/trunk@65304 18797224-902f-48f8-a5cc-f745e15eee43
2000-04-05 02:40:08 +00:00
hyatt%netscape.com
81bbe05843 Enhancements to nsIScriptcontext. r=brendan@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@64420 18797224-902f-48f8-a5cc-f745e15eee43
2000-03-29 01:18:21 +00:00
akkana%netscape.com
418dacce26 9266: Disable JS in the editor (and allow for disabling it anywhere). r=brendan,jband,norris,sfraser
git-svn-id: svn://10.0.0.236/trunk@64271 18797224-902f-48f8-a5cc-f745e15eee43
2000-03-28 00:15:56 +00:00
norris%netscape.com
953def32a1 Fix
32088 Circumventing Same Origin security policy using javascript: URLs
        32040 about: can't be link
Also remove deprecated method
r=mstoltz


git-svn-id: svn://10.0.0.236/trunk@64066 18797224-902f-48f8-a5cc-f745e15eee43
2000-03-24 22:15:37 +00:00
brendan%mozilla.org
bc0baef1a1 (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!)


git-svn-id: svn://10.0.0.236/trunk@57127 18797224-902f-48f8-a5cc-f745e15eee43
2000-01-08 00:24:24 +00:00
brendan%mozilla.org
d2ded9c6d9 - 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.


git-svn-id: svn://10.0.0.236/trunk@55612 18797224-902f-48f8-a5cc-f745e15eee43
1999-12-07 22:14:17 +00:00
waterson%netscape.com
820584eef4 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.
git-svn-id: svn://10.0.0.236/trunk@55349 18797224-902f-48f8-a5cc-f745e15eee43
1999-12-05 07:29:25 +00:00
brendan%mozilla.org
4ccbd4b644 - 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)


git-svn-id: svn://10.0.0.236/trunk@55157 18797224-902f-48f8-a5cc-f745e15eee43
1999-12-03 03:40:30 +00:00
brendan%mozilla.org
abfb05cbb4 XULDOMJS_19991106_BRANCH landing (15146, r=vidur@netscape.com)
git-svn-id: svn://10.0.0.236/trunk@53328 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-12 06:08:14 +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
brendan%mozilla.org
f980be0221 (13163, r=alecf, scc, waterson, others; names available on request)
- Fix most of bug 13163 (see TODO for rest).  This entails adding a version-string argument to nsIScriptContext::EvaluateString and passing it around lots of places in content sinks. 

- Fix leaks and confusion about mSecurityManager and mNameSpaceManager in nsJSEnvironment.cpp.  These still need to move from nsJSContext to nsGlobalWindow or thereabouts, jband and vidur are looking at that. 

- Added comments and expanded tabs in nsJSEnvironment.cpp, esp. to EvaluateString.  Also changed various nsresult vars to be named rv.  Also restored brace/style conformity to nsJSProtocolHandler.cpp. 

- Factored CompileFunction from AddScriptEventListener to pave the way for brutal sharing of compiled JS event handlers via JS_CloneFunctionObject. 

- Lots of nsCOMPtr uses added.  I'm using one for mNameSpaceManager.  Hold mSecurityManager as a service explicitly, on the other hand (awaiting scc's fix to allow comptrs for services), and release in nsJSContext's dtor (fixing a leak).  These two managers should be moved to the window object -- TODO item below. 

- Hold JSRuntimeService along with JSRuntime for live of nsJSEnvironment, fix for shaver. 

- Fix window.setTimeout etc. so the filename and line number of the timeout expr is propagated.  This meant factoring nsJSUtils.cpp code. 

- Fix all content sinks to use the same, and up-to-date JavaScript version parsing (whether for script type or for old language attribute); also fix SplitMimeType clones to strip whitespace. 

- With waterson, fix bug in brutal-sharing version of XUL content sink: script src= should not evaluate the inline content of its tag.


git-svn-id: svn://10.0.0.236/trunk@52347 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-31 00:43:30 +00:00
vidur%netscape.com
1173466bfc Added a version of window.close, which when alled from script that defers actual closure if it is invoked from the script context of the window itself. Fixes bug 15261. R=joki.
git-svn-id: svn://10.0.0.236/trunk@52080 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-28 14:12:56 +00:00
norris%netscape.com
761b5f5706 Add ability to disable JS. Fix 13978 shopping at webvan.com crashes
git-svn-id: svn://10.0.0.236/trunk@47995 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-17 20:13:52 +00:00
norris%netscape.com
3036cb7a8a Add security support for javascript: uris.
git-svn-id: svn://10.0.0.236/trunk@47649 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-15 20:58:41 +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
arielb%netscape.com
ad40dbfcd5 includes updates to codbase matching security checks currently turned off
but in place.  redefined the script security manager in caps and it is
now generating codebase principals.


git-svn-id: svn://10.0.0.236/trunk@43798 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-20 09:51:02 +00:00
vidur%netscape.com
29bf6d365c Changed method signature of EvaluateScript to return nsresult. Added nsJSThreadContextStack pushing and popping around script evaluation.
git-svn-id: svn://10.0.0.236/trunk@43669 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-19 20:36:31 +00:00
vidur%netscape.com
212b213c9c changed name of NS_CreateContext to NS_CreateScriptContext
git-svn-id: svn://10.0.0.236/trunk@42780 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-09 19:14:49 +00:00
norris%netscape.com
205ddb1970 Tom Pixley's code for the beginnings of DOM security, with a fix for the previous Mac link failure.
git-svn-id: svn://10.0.0.236/trunk@38654 18797224-902f-48f8-a5cc-f745e15eee43
1999-07-07 07:50:03 +00:00
michaelp%netscape.com
dcfeafc885 added memory cleanup tripwire.
git-svn-id: svn://10.0.0.236/trunk@23992 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-12 22:24:30 +00:00
scc%netscape.com
817f56596f rename |IID()| --> |GetIID()|
git-svn-id: svn://10.0.0.236/trunk@22744 18797224-902f-48f8-a5cc-f745e15eee43
1999-03-03 19:48:57 +00:00
pinkerton%netscape.com
e6d847b909 add IID
git-svn-id: svn://10.0.0.236/trunk@19715 18797224-902f-48f8-a5cc-f745e15eee43
1999-02-04 18:29:36 +00:00
vidur%netscape.com
526d71ae38 Fixed early initialization problem in script namespace management
git-svn-id: svn://10.0.0.236/trunk@16985 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-30 02:46:36 +00:00
vidur%netscape.com
08b60c2fa0 Ongoing work on mechanism for introducing global names into a script namespace
git-svn-id: svn://10.0.0.236/trunk@16751 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-21 16:51:10 +00:00
vidur%netscape.com
290921df31 Enabled asynchronous loading of SCRIPT SRC=, STYLE SRC= and LINK elements for style sheets. Changed nsIScriptContext to not be dependent on JavaScript.
git-svn-id: svn://10.0.0.236/trunk@16421 18797224-902f-48f8-a5cc-f745e15eee43
1998-12-15 06:10:59 +00:00
joki%netscape.com
581ca7e7ca Adding initial bit for the JS security system
git-svn-id: svn://10.0.0.236/trunk@15080 18797224-902f-48f8-a5cc-f745e15eee43
1998-11-21 00:12:33 +00:00
vidur%netscape.com
103713e48c Added GC method to script contenxt
git-svn-id: svn://10.0.0.236/trunk@13512 18797224-902f-48f8-a5cc-f745e15eee43
1998-10-26 23:22:21 +00:00
joki%netscape.com
d5153ccc10 Adding new window methods, moving js evaluate methods to using UC strings.
git-svn-id: svn://10.0.0.236/trunk@11714 18797224-902f-48f8-a5cc-f745e15eee43
1998-10-01 22:21:59 +00:00
vidur%netscape.com
b9d512330b Added javascript: URL handling. Added AddNamedReference and RemovedNamedReference to script context interface.
git-svn-id: svn://10.0.0.236/trunk@8269 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-20 22:25:21 +00:00
joki%netscape.com
9248af60f9 Adding url and lineno to script evaluation
git-svn-id: svn://10.0.0.236/trunk@7890 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-12 23:37:50 +00:00
joki%netscape.com
9106b337ee Adding partial load event support, removing script context Run_GC method adding partial script error support
git-svn-id: svn://10.0.0.236/trunk@7810 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-12 04:56:40 +00:00
joki%netscape.com
06a2ca93d0 Add RunGC method onto ScriptContext interface. Probably temporary until we have auto-gc'ing set up.
git-svn-id: svn://10.0.0.236/trunk@7644 18797224-902f-48f8-a5cc-f745e15eee43
1998-08-10 01:33:34 +00:00
vidur
1b41003b82 Moved over to a new version of Level 1. NodeIterators and AttributeLists out. NodeLists and NamedNodeMaps in.
git-svn-id: svn://10.0.0.236/trunk@5501 18797224-902f-48f8-a5cc-f745e15eee43
1998-07-14 18:44:44 +00:00
vidur
140a853e4f Added autogeneration of XPCOM headers and JavaScript stub classes. Added better masking of JS-specific structures in generic interfaces. Creation of a scripting global object interface.
git-svn-id: svn://10.0.0.236/trunk@4313 18797224-902f-48f8-a5cc-f745e15eee43
1998-06-23 18:43:06 +00:00
dario
7d9b7da232 doc
git-svn-id: svn://10.0.0.236/trunk@307 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-15 18:55:21 +00:00
kipp
fb1503758e moved to pub
git-svn-id: svn://10.0.0.236/trunk@165 18797224-902f-48f8-a5cc-f745e15eee43
1998-04-13 20:24:54 +00:00