Граф коммитов

94 Коммитов

Автор SHA1 Сообщение Дата
Nika Layzell f1ac9bf744 Bug 1419597 - Part 18: Remove IsInnerWindow and IsOuterWindow methods, r=smaug
MozReview-Commit-ID: DAAm6tLubhJ
2017-11-23 13:12:13 -05:00
Nika Layzell 3409141758 Bug 1414974 - Part 2: Switch many consumers to nsGlobalWindow{Inner,Outer}, r=smaug
This is a large patch which tries to switch many of the external consumers of
nsGlobalWindow to instead use the new Inner or Outer variants.

MozReview-Commit-ID: 99648Lm46T5
2017-11-09 10:44:47 -05:00
Kyle Machulis be815f3caf Bug 1412437 - Remove nsIDOMHTMLTextAreaElement; r=bz
MozReview-Commit-ID: JAON7Rd7IAo
2017-11-01 14:28:22 -07:00
Masayuki Nakano 4ce89d8f61 Bug 1369072 - part3: nsXBLPrototypeHandler::DispatchXBLCommand() should use controller of visible window r=smaug
With previous change, KeyboardEvent is dispatched even when invisible window
has focus.  However, nsRootWindow::GetControllerForCommand() returns controller
for focused window even when the window is invisible because it uses
nsFocusManager::GetFocusedDescendant() to retrieve focused window.

Perhaps, we can assume that users won't expect to do something with invisible
window when they type some keys.  Then, nsRootWindow::GetControllerForCommand()
should return controller for visible ancestor window if focused window is
invisible.

This patch makes nsFocusManager::GetFocusedDescendant() can return only visible
descendants.  However, it already has a bool argument.  Therefore, it should
have a flag instead of adding new flag.  Most changes of this patch is replacing
its callers.

Then, nsRootWindow::GetControllerForCommand() and nsRootWindow::GetControllers()
should have a bool flag if it should return controller(s) for visible window.
This patch adds a bool flag for it.  Fortunately, the interface isn't scriptable.

Finally, this patch makes nsXBLPrototypeHandler::DispatchXBLCommand() and
EventStateManager::DoContentCommandEvent() retrieve controller for visible
window since they are always handles user input.

MozReview-Commit-ID: GygttTHuKRm

--HG--
extra : rebase_source : 1341273c4606298cb9b890b9312d9f5c8a75d144
2017-09-07 22:54:49 +09:00
Masatoshi Kimura dec070e4cf Bug 1389460 - Remove @deprecated nsIDOMEventTarget.DispatchDOMEvent. r=smaug
MozReview-Commit-ID: E88DZK5sfwx

--HG--
extra : rebase_source : 64e1a47c9366a970f20ec459dde9b379a207e802
2017-08-07 02:28:52 +09:00
Sebastian Hengst b3269bec34 Backed out changeset 685802013f43 (bug 1389460) for OS X bustage at widget/cocoa/nsMenuX.mm:364: no member named 'DispatchDOMEvent' in 'nsIContent'. r=backout 2017-08-11 17:46:42 +02:00
Masatoshi Kimura 58d29db70b Bug 1389460 - Remove @deprecated nsIDOMEventTarget.DispatchDOMEvent. r=smaug
MozReview-Commit-ID: E88DZK5sfwx

--HG--
extra : rebase_source : 63300d87c0496394d3f75cb76bc47c75d640d369
2017-08-07 02:28:52 +09:00
Mats Palmgren 41a0eaaaa9 Bug 1372009 - Use aCommandsHandled.EnsureInserted instead of Contains+PutEntry to avoid unnecessary hashtable lookups. r=froydnj
MozReview-Commit-ID: 4ukgy6mBsKq
2017-06-17 00:06:04 +02:00
Boris Zbarsky ac6be6fde3 Bug 835981 part 6. Change nsIDOMXULElement::GetControllers consumers to nsXULElement. r=peterv 2017-02-02 10:32:58 -05:00
Stone Shih 1ed10ff082 Bug 1305458 Part1: Rename nsIDOMEventTarget::PreHandleEvent to nsIDOMEventTarget::GetEventTargetParent. r=smaug
MozReview-Commit-ID: FM3vDUyLOCb

--HG--
extra : rebase_source : 5a513af84718a6d591f77437a0704984c8fc2b67
2016-10-21 10:11:07 +08:00
Olli Pettay fd266b20b2 Bug 1281762 - nsWindowRoot::mPopupNode may keep otherwise closed documents alive, r=enn 2016-06-23 17:14:19 +03:00
Neil Deakin ea192c61f5 Bug 1174798, propagate keyboard indicator state down to child processes, r=smaug 2016-06-09 07:59:31 -04:00
Andrea Marchesini 55614d4c60 Bug 1266194 - Implement boolean or EventListenerOptions as 3rd param to addEventListener, r=smaug 2016-04-26 16:23:17 +08:00
Kyle Huey 91efc5a86c Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
Kyle Huey c7d3c4e21a Bug 1216401: Eviscerate nsIDOMWindow, move still needed methods to nsPIDOMWindow. r=bz 2015-10-26 14:37:32 -07:00
Nathan Froyd 01583602a9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Birunthan Mohanathas ad8fffc614 Bug 1182980 - Part 3: Use nsTHashtable::Iterator in nsWindowRoot. r=khuey 2015-07-22 09:42:01 -07:00
David Parks eff33f4052 Bug 1125325 - Store TabParents with their WindowRoot. r=smaug
nsContentUtils::CallOnAllRemoteChildren calls a callback on all tabs
connected to a given window but it has only worked in Firefox e10s tabs.
This patch adds a list of (weak) references to each top-level document's
WindowRoot so that e.g. the nsPresContext can access them instead of
using nsContentUtils.  This provides a solution to the problem of finding remote PBrowsers generally.
2015-06-07 22:39:39 -07:00
Kartikaya Gupta eb7580bebc Back out 3 csets from bug 1125325 for introducing bug 1173224. r=me 2015-06-10 15:55:34 -04:00
David Parks 6bfe79757c Bug 1125325 - Store TabParents with their WindowRoot. r=smaug
nsContentUtils::CallOnAllRemoteChildren calls a callback on all tabs
connected to a given window but it has only worked in Firefox e10s tabs.
This patch adds a list of (weak) references to each top-level document's
WindowRoot so that e.g. the nsPresContext can access them instead of
using nsContentUtils.  This provides a solution to the problem of finding remote PBrowsers generally.
2015-06-07 22:39:39 -07:00
Boris Zbarsky 068f758b05 Bug 1163898 part 1. Give DOMEventTargetHelper a sane accessor for getting its nsIGlobalObject. r=smaug 2015-05-12 15:56:39 -04:00
Andrew McCreight 9e8f4b219e Bug 1152551, part 2 - Fix mode lines in dom/. r=jst 2015-05-03 15:32:37 -04:00
Boris Zbarsky dc24477d79 Bug 1117172 part 3. Change the wrappercached WrapObject methods to allow passing in aGivenProto. r=peterv
The only manual changes here are to BindingUtils.h, BindingUtils.cpp,
Codegen.py, Element.cpp, IDBFileRequest.cpp, IDBObjectStore.cpp,
dom/workers/Navigator.cpp, WorkerPrivate.cpp, DeviceStorageRequestChild.cpp,
Notification.cpp, nsGlobalWindow.cpp, MessagePort.cpp, nsJSEnvironment.cpp,
Sandbox.cpp, XPCConvert.cpp, ExportHelpers.cpp, and DataStoreService.cpp.  The
rest of this diff was generated by running the following commands:

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObject\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(Binding(?:_workers)?::Wrap\((?:aCx|cx|aContext|aCtx|js), [^,)]+)\)/\1, aGivenProto)/g'
2015-03-19 10:13:33 -04:00
Olli Pettay e964974938 Bug 1124245, nsGlobalWindow::IsActive shouldn't depend on the state in nsFocusManager, r=Enn
--HG--
extra : rebase_source : 5fcd4611cc73651d9f7d1d498808847f26ff1d6b
2015-02-06 18:26:29 +02:00
Neil Deakin b0a6a33837 Bug 1060529, send the enabled state of child process commands to the parent on update, without the test, r=smaug,ehsan 2014-12-09 10:48:27 -05:00
Wes Kocher 280a38ff20 Backed out 2 changesets (bug 1060529) for introducing a new intermittent bc1 orange
Backed out changeset 5ddd9eb25925 (bug 1060529)
Backed out changeset d4f962fb38be (bug 1060529)
2014-12-08 16:40:55 -08:00
Neil Deakin 2e2109d0f9 Bug 1060529, send the enabled state of child process commands to the parent on update, now with improved test, r=smaug,ehsan 2014-12-08 08:12:22 -05:00
Olli Pettay 4066b17292 Bug 1082839 - WebIDL for WindowRoot, r=peterv
--HG--
extra : rebase_source : 035e2752e12f31b78accae45eb1534c4dc31b690
2014-10-18 02:05:16 +03:00
Peter Van der Beken 962c9a5742 Bug 1078744 - Replace SetIsDOMBinding with SetIsNonDOMBinding, invert the flag for dom bindings in nsWrapperCache and add SetIsNotDOMBinding. r=bz.
--HG--
extra : rebase_source : 6ca1903658d3d6fe2634409cd39fa68c6b1219bd
2014-10-07 11:44:48 +02:00
Birunthan Mohanathas a85cd37de4 Bug 1001966 - Part 2: Change uses of numbered NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE macro to the variadic variant. r=smaug 2014-04-29 04:57:00 -04:00
Masayuki Nakano 3234ceea19 Bug 983049 part.5 Rename nsEventDispatcher to mozilla::EventDispatcher r=smaug
--HG--
rename : dom/events/nsEventDispatcher.cpp => dom/events/EventDispatcher.cpp
rename : dom/events/nsEventDispatcher.h => dom/events/EventDispatcher.h
2014-03-18 13:48:21 +09:00
Masayuki Nakano 2db7fb2c3d Bug 983049 part.3 Rename nsEventChainPostVisitor to mozilla::EventChainPostVisitor r=smaug 2014-03-18 13:48:20 +09:00
Masayuki Nakano a8aba2b26c Bug 983049 part.2 Rename nsEventChainPreVisitor to mozilla::EventChainPreVisitor r=smaug 2014-03-18 13:48:19 +09:00
Masayuki Nakano fbf7cdeb19 Bug 981261 part.5 Rename nsEventListenerManager to mozilla::EventListenerManager r=smaug
--HG--
rename : dom/events/nsEventListenerManager.cpp => dom/events/EventListenerManager.cpp
rename : dom/events/nsEventListenerManager.h => dom/events/EventListenerManager.h
2014-03-17 15:56:53 +09:00
Kyle Huey 9ab68d6b69 Bug 915757: Split GetListenerManager into two functions for more const-correctness. r=smaug 2013-10-23 07:32:04 +08:00
Ryan VanderMeulen 9abde8f9b2 Backed out 2 changesets (bug 915757, bug 919885) for frequent Android Armv6 mochitest-8 crashes.
Backed out changeset 04610078280c (bug 915757)
Backed out changeset db9190b3ce60 (bug 919885)
2013-10-14 14:38:54 -04:00
Kyle Huey e2f7b57b3e Bug 915757: Split GetListenerManager into two functions for more const-correctness. r=smaug 2013-10-14 19:58:25 +08:00
Phil Ringnalda 5c6d197b06 Backed out 2 changesets (bug 915757, bug 919885) for xpcshell bustage
Backed out changeset 5d17d90b838d (bug 915757)
Backed out changeset 91495d3a91c8 (bug 919885)
2013-10-13 21:59:58 -07:00
Kyle Huey ebb9068971 Bug 915757: Split GetListenerManager into two functions for more const-correctness. r=smaug 2013-10-14 11:10:44 +08:00
Masayuki Nakano 5dbc2a60e4 Bug 920377 part.31 Get rid of nsEvent r=roc 2013-10-02 12:46:04 +09:00
Masayuki Nakano f90a5b1125 Bug 912956 part.18 Remove nsGUIEvent.h r=roc 2013-09-25 20:21:22 +09:00
Boris Zbarsky 48946a9621 Bug 862627 part 1. Switch EventListener to WebIDL codegen. r=smaug 2013-09-23 20:25:17 -04:00
Ehsan Akhgari 39c2729336 Bug 919325 - Minimize the #includes in content/ IDL files; r=bzbarsky
--HG--
extra : rebase_source : 923a665eadc62046c9d5398a25187a3331fd8d25
2013-09-22 19:23:30 -04:00
Ehsan Akhgari c88ae238ac Bug 917299 - Remove some dead code in content/ and dom/; r=bzbarsky 2013-09-17 12:49:07 -04:00
Olli Pettay ce4308f863 Bug 899022, cycle collect WindowRoot's window, r=mccr8
--HG--
extra : rebase_source : d223a51a2f928694dc6c3c79bd73b971329004db
2013-08-08 21:23:55 +03:00
Boris Zbarsky 6871042269 Bug 865377. Give EventTarget a chrome-only getter that returns its global. r=smaug
The idea is that you then do things like t.dispatchEvent(new t.ownerGlobal.Event("something")).
2013-05-30 17:46:39 -04:00
David Zbarsky b1ad5f5a1f [Bug 857884] Use dom::EventTarget more instead of nsIDOMEventTarget Part 6 r=Ms2ger 2013-04-19 18:18:33 -04:00
Boris Zbarsky de948b12f3 Bug 835643 part 4. Put in place all the infrastructure to switch EventListener to WebIDL codegen. r=smaug 2013-04-16 17:16:08 -04:00
David Zbarsky 59707ec484 Bug 857884 - Use dom::EventTarget more in content/ and dom/ r=Ms2ger 2013-04-05 20:44:15 -04:00
David Zbarsky 46284ae633 Bug 847007: Remove nsIContent includes r=Ms2ger 2013-03-21 20:05:20 -04:00