204 Commits

Author SHA1 Message Date
saari%netscape.com
c5b4a238c8 Fix for PDT+ bugs 21602 and 21648. r=joki
git-svn-id: svn://10.0.0.236/trunk@56055 18797224-902f-48f8-a5cc-f745e15eee43
1999-12-15 22:04:43 +00:00
danm%netscape.com
b5781d5136 deathgrip the event listener manager in HandleEvent. partial fix for bug 21397. r:hyatt a:chofmann
git-svn-id: svn://10.0.0.236/trunk@55968 18797224-902f-48f8-a5cc-f745e15eee43
1999-12-14 02:29:34 +00:00
hyatt%netscape.com
c324cc9a00 Fix for the crash in SendFocusBlur.
git-svn-id: svn://10.0.0.236/trunk@55901 18797224-902f-48f8-a5cc-f745e15eee43
1999-12-11 05:42:18 +00:00
mjudge%netscape.com
78a1c7b0e7 massive changes a=jar.hoffman, r=akkana
git-svn-id: svn://10.0.0.236/trunk@55878 18797224-902f-48f8-a5cc-f745e15eee43
1999-12-11 00:02:08 +00:00
saari%netscape.com
072f9f11f5 Helping to fix 19114 by making a strong ref weak. Potential fix for 19268 by making scrollbars not steal focus. r=hyatt a=chofmann
git-svn-id: svn://10.0.0.236/trunk@55832 18797224-902f-48f8-a5cc-f745e15eee43
1999-12-10 00:51:50 +00:00
joki%netscape.com
c31311ba6f fix 21337, set modifier keys for generated events. r:brendan a:brendan
git-svn-id: svn://10.0.0.236/trunk@55807 18797224-902f-48f8-a5cc-f745e15eee43
1999-12-09 21:02:09 +00:00
hyatt%netscape.com
1587680a3d Fix for caret problems in Ender text fields. r=saari
git-svn-id: svn://10.0.0.236/trunk@55761 18797224-902f-48f8-a5cc-f745e15eee43
1999-12-08 20:55:45 +00:00
hyatt%netscape.com
43b6924a32 Fix for the two crashers: 21180 and 21163, r=saari
git-svn-id: svn://10.0.0.236/trunk@55760 18797224-902f-48f8-a5cc-f745e15eee43
1999-12-08 20:18:16 +00:00
hyatt%netscape.com
2e9da7699f Fix for 21139, r=waterson
git-svn-id: svn://10.0.0.236/trunk@55751 18797224-902f-48f8-a5cc-f745e15eee43
1999-12-08 09:01:06 +00:00
hyatt%netscape.com
2c134c2abf Massive rewrite of the focus/blur architecture. Things should behave better
now. r=saari


git-svn-id: svn://10.0.0.236/trunk@55715 18797224-902f-48f8-a5cc-f745e15eee43
1999-12-08 04:54:29 +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
ftang%netscape.com
199df01b45 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
git-svn-id: svn://10.0.0.236/trunk@55502 18797224-902f-48f8-a5cc-f745e15eee43
1999-12-07 01:29:00 +00:00
kin%netscape.com
b61d6c2bdb Fix for bug #20524: [DOGFOOD] No Caret in Win32 Composer window
Made some modifications to nsEventStateManager::PreHandleEvent().
We now prevent setting of gLastFocusedContent when handling
NS_ACTIVATE. We now allow DOM focus notifications even when
we can't send a blur notification in NS_GOTFOCUS.
r=saari@netscape.com


git-svn-id: svn://10.0.0.236/trunk@55446 18797224-902f-48f8-a5cc-f745e15eee43
1999-12-06 21:48:36 +00:00
joki%netscape.com
09db2943e9 Fix for bug 20663, mem leak in event listeners. r:beard
git-svn-id: svn://10.0.0.236/trunk@55319 18797224-902f-48f8-a5cc-f745e15eee43
1999-12-04 23:40:05 +00:00
joki%netscape.com
46824fda78 Fix bug 14836, keep disabled control from responding to events. r:pollmann@netscape.com
git-svn-id: svn://10.0.0.236/trunk@55265 18797224-902f-48f8-a5cc-f745e15eee43
1999-12-04 02:22:21 +00:00
tbogard%aol.net
067920c238 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.


git-svn-id: svn://10.0.0.236/trunk@55175 18797224-902f-48f8-a5cc-f745e15eee43
1999-12-03 09:24:22 +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
saari%netscape.com
de3e84d435 Adding new event state manager API GetFocusedEventTarget which returns the current frame in focus
regardless of the ESM instance you call it from. Editor guys need this for bug 20225


git-svn-id: svn://10.0.0.236/trunk@55078 18797224-902f-48f8-a5cc-f745e15eee43
1999-12-02 20:55:17 +00:00
danm%netscape.com
9bfb5a41b9 adding 'close' xul event handler. part of bug 13695. r:hyatt@netscape.com
git-svn-id: svn://10.0.0.236/trunk@54950 18797224-902f-48f8-a5cc-f745e15eee43
1999-12-01 22:35:33 +00:00
norris%netscape.com
1ffa0ae294 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


git-svn-id: svn://10.0.0.236/trunk@54940 18797224-902f-48f8-a5cc-f745e15eee43
1999-12-01 22:23:22 +00:00
saari%netscape.com
74ae6fc2f8 Fix for bug 18983, multiple carets showing up. R: shaver, a long time ago. I've since verified personally on linux and other platforms.
git-svn-id: svn://10.0.0.236/trunk@54891 18797224-902f-48f8-a5cc-f745e15eee43
1999-12-01 09:09:46 +00:00
bryner%uiuc.edu
6e5ee99738 Making a minor optimization for mousewheel scrolling on trees. r=shaver.
git-svn-id: svn://10.0.0.236/trunk@54767 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-30 22:00:28 +00:00
waterson%netscape.com
c439c8fcbb Fix incorrect use of dont_QueryInterface() in PreHandleEvent() that was leaking.
git-svn-id: svn://10.0.0.236/trunk@54623 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-29 22:47:39 +00:00
brendan%mozilla.org
eee1a99532 Use nsAutoString for local strings (r=vidur@netscape.com).
git-svn-id: svn://10.0.0.236/trunk@54591 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-29 21:15:42 +00:00
brendan%mozilla.org
96b0c7d20d Whitespace/comment police.
git-svn-id: svn://10.0.0.236/trunk@54533 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-28 10:32:13 +00:00
warren%netscape.com
eb9a891946 Eliminated the libs build pass.
git-svn-id: svn://10.0.0.236/trunk@54523 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-28 03:05:01 +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
vidur%netscape.com
29607952c0 Fixes for 19650 and 15133. Added nsHTMLDocument::Resolve(). Script event handler compilation is deferred till when the event handler is first invoked. Atoms used for event name comparisions instead of strings. R=joki
git-svn-id: svn://10.0.0.236/trunk@54457 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-25 00:05:21 +00:00
tbogard%aol.net
ae5a81e394 Changed nsIPresContext& to nsIPresContext*. Changed nsEventStatus& to nsEventStatus*. Now more compatible with XPIDL. a=vidur r=scc
git-svn-id: svn://10.0.0.236/trunk@54392 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-24 06:03:41 +00:00
warren%netscape.com
7cc3cd1861 Minor cleanup.
git-svn-id: svn://10.0.0.236/trunk@54264 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-23 07:05:53 +00:00
joki%netscape.com
1c8e0c82bf Fix for 17683, add key events for alt+numpad character generation. r:vidur
git-svn-id: svn://10.0.0.236/trunk@54161 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-22 19:45:13 +00:00
bryner%uiuc.edu
5e76628a60 These changes will enable scrolling with the mouse wheel (currently only
for unix).  r=saari.


git-svn-id: svn://10.0.0.236/trunk@54090 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-21 01:46:41 +00:00
saari%netscape.com
11b77c2fd6 Bring back, bring back, bring back the caret to me, to me...
The return of the text caret. Simple change, start dispatching content
focus events to the window (what I checked in) *and* the document (the
way it worked before, what editor relied upon). Discussed with joki, but not
technically reviewed.


git-svn-id: svn://10.0.0.236/trunk@53571 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-16 00:04:55 +00:00
don%netscape.com
9e22967825 Checked in saari fix for bug #18876 to help re-open tree. r:saari
git-svn-id: svn://10.0.0.236/trunk@53523 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-15 20:09:37 +00:00
saari%netscape.com
48d75f5289 Landing focus changes. R: joki
git-svn-id: svn://10.0.0.236/trunk@53410 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-13 05:16:33 +00:00
pinkerton%netscape.com
f1b54be399 don't generate drag exit events until _after_ drop event has been processed. move from PreHandleEvent to PostHandleEvent. r=saari.
git-svn-id: svn://10.0.0.236/trunk@53287 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-12 01:02:14 +00:00
waterson%netscape.com
254ba7fef5 Bug 18066. Only addref the listener if it isn't already in our set of listeners. r=joki, a=chofmann
git-svn-id: svn://10.0.0.236/trunk@53031 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-09 23:37:08 +00:00
pinkerton%netscape.com
2d80fbfdef fix for #17664 (crash in drag code when css destroys the frame when clicking on link). small fix for when target is null on mouseMove events (say when mouse is in menu bar on MacOS). (r=saari).
git-svn-id: svn://10.0.0.236/trunk@52991 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-09 07:10:46 +00:00
joki%netscape.com
0a957febc3 Fix for bug 17618, null out current event target frame after processing event. a:chofmann, r:vidur
git-svn-id: svn://10.0.0.236/trunk@52949 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-08 21:30:22 +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
joki%netscape.com
acb57210c3 Fix for bug 17835. Free JS event listeners when the JS object they're registered on goes away. a:chofmann r:vidur
git-svn-id: svn://10.0.0.236/trunk@52886 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-05 23:37:40 +00:00
joki%netscape.com
c79e9c67d2 Changes to DOM events to accomodate the new breakdown of events into mouse and key events. This fixes a couple of bug, though the main one is 13406. Involves changes to multiple DOM generated file as well as fixing up usage of DOM event api usage in editor, rdf, and xul. r:vidur
git-svn-id: svn://10.0.0.236/trunk@52691 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-03 07:11:45 +00:00
pinkerton%netscape.com
e182909557 fix for #16463 (crash when frames involved in a drag went away) and nsCOMPtrizing a lot of things (r=saari).
git-svn-id: svn://10.0.0.236/trunk@52498 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 03:55:14 +00:00
pinkerton%netscape.com
6671a998a4 allow mouse event coordinates to be accessed with d&d events in addition to mouse events, since d&d events have the same structure as mouse events. (r=joki).
git-svn-id: svn://10.0.0.236/trunk@52466 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-02 01:38:01 +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
troy%netscape.com
bd46e7911f Changed SetView/GetView to take an additional argument which is the
pres context


git-svn-id: svn://10.0.0.236/trunk@51822 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-26 04:44:41 +00:00
rods%netscape.com
2a900deed8 The code that checked to see whether it should explicitly set focus on the gfx's containing widget
now uget the new focused content's frame instead of using the mCurrentTarget. The mCurrentTarget
is correct for a mouse down but incorrect for a "tab". This is because the mCurrentTarget points at
the currently focused content for a tab event, instead of the new content.
r=joki, bug 11162


git-svn-id: svn://10.0.0.236/trunk@51190 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-19 21:57:43 +00:00
buster%netscape.com
ab0550c29d no bug number, part of webshell cleanup. nsIWebShell.h was needlessly included, so I removed it
trivial change, no reviewer.


git-svn-id: svn://10.0.0.236/trunk@50822 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 13:34:45 +00:00
kipp%netscape.com
f23d12f0ae Removed two more warnings
git-svn-id: svn://10.0.0.236/trunk@50747 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-15 00:29:28 +00:00
ftang%netscape.com
2d2a382150 landing keyEvent_19991004_BRANCH
bugs # see the log of the check in into branch
author/reviewer:
mozilla/layout/base/src/nsRangeList.cpp brade/mjudge
mozilla/layout/html/forms/src/nsGfxTextControlFrame.cpp brade/ftang
mozilla/layout/events/src/nsDOMEvent.cpp brade/joki
mozilla/layout/events/src/nsEventStateManager.cpp brade/joki
mozilla/widget/public/nsGUIEvent.h akkana/ftang
mozilla/widget/src/windows/nsWindow.cpp ftang/mjudge
mozilla/widget/src/windows/nsWindow.h ftang/mjudge
mozilla/widget/src/mac/nsTextAreaWidget.cpp brade/ftang
mozilla/widget/src/mac/nsMacEventHandler.cpp brade/simon
mozilla/widget/src/xpwidgets/nsKeyBindMgr.cpp brade/ftang
mozilla/widget/src/gtk/nsGtkEventHandler.cpp akkana/?
mozilla/widget/src/gtk/nsWidget.cpp erik/ftang
mozilla/layout/xul/base/src/nsTreeCellFrame.cpp brade/ftang
mozilla/editor/base/nsEditorEventListeners.cpp brade/akkana
mozilla/editor/base/nsHTMLEditor.cpp brade/akkana
mozilla/rdf/content/src/nsXULKeyListener.cpp ftang/saari
fix the master bug- 15693
fix at least, but not limited to, the following bugs
10158,11956,6053,9333,10901,14348,6449,11845,13016,14410,15657,15307,15842,13856


git-svn-id: svn://10.0.0.236/trunk@50688 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-14 18:27:01 +00:00