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

58 Коммитов

Автор SHA1 Сообщение Дата
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
Olli Pettay fd266b20b2 Bug 1281762 - nsWindowRoot::mPopupNode may keep otherwise closed documents alive, r=enn 2016-06-23 17:14:19 +03:00
Jonathan Watt b15368cfcb Bug 1279451 - Remove a lot of unnecessary includes of nsAutoPtr.h. rs=sparky 2016-06-07 21:10:18 +01: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
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
Daniel Holbert c7b9a89575 Bug 1125325 followup: Add missing 'override' keyword to TabChild::GetInnerSize() and nsWindowRoot::AddBrowser(), RemoveBrowser(), EnumerateBrowsers(). rs=ehsan 2015-06-08 10:24:56 -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
Daniel Holbert 21d8c54ac2 Bug 1125325 followup: Add missing 'override' keyword to TabChild::GetInnerSize() and nsWindowRoot::AddBrowser(), RemoveBrowser(), EnumerateBrowsers(). rs=ehsan 2015-06-08 10:24:56 -07: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
Andrea Marchesini 5c1e2ee932 Bug 1156632 - Remove unused forward class declarations - patch 1 - dom/base, r=ehsan 2015-04-22 08:29:15 +02:00
Trevor Saunders d5851ef31c bug 1146027 - more final r=froydnj 2015-03-24 17:51:43 -04:00
Ehsan Akhgari 883849ee32 Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj
This patch was automatically generated using the following script:

function convert() {
echo "Converting $1 to $2..."
find . \
       ! -wholename "*/.git*" \
       ! -wholename "obj-ff-dbg*" \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_OVERRIDE override
convert MOZ_FINAL final
2015-03-21 12:28:04 -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
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 a0f306343e Bug 808856 - Make not overriding WrapObject fail to build. r=ehsan.
--HG--
extra : rebase_source : 4683c70c97f7eea454bc445331dbbbe7c4f2cec7
2014-10-07 11:44:48 +02:00
Ehsan Akhgari 0653303071 Bug 1060987 - Fix more bad implicit constructors in DOM; r=baku
--HG--
extra : rebase_source : 01709017e97fdc96d1d53eb881efc1792118edc4
2014-09-01 20:49:25 -04:00
Phil Ringnalda 117bb1a341 Backed out 6 changesets (bug 1060982, bug 1061058, bug 1060987, bug 1061060, bug 1060930) for build bustage
CLOSED TREE

Backed out changeset c23b8418e6be (bug 1060987)
Backed out changeset a8cddc6bdffc (bug 1061060)
Backed out changeset b5af5cbdac3f (bug 1060982)
Backed out changeset 4912d451011a (bug 1060930)
Backed out changeset bdacbf453238 (bug 1061058)
Backed out changeset da6c71a8f5ae (bug 1060987)
2014-09-01 16:48:51 -07:00
Ehsan Akhgari 6c932dea6c Bug 1060987 - Fix more bad implicit constructors in DOM; r=baku 2014-09-01 18:00:53 -04:00
Benoit Jacob ec742680c8 Bug 1028588 - Fix dangerous public destructors in the rest of dom/ - r=ehsan 2014-06-23 15:56:07 -04: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
Ehsan Akhgari 297d558e56 Bug 930583 - Stop #including nsEventStateManager in nsWindowRoot.h and nsDocument.h; r=smaug 2013-10-24 14:53:52 -04: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
Boris Zbarsky 48946a9621 Bug 862627 part 1. Switch EventListener to WebIDL codegen. r=smaug 2013-09-23 20:25:17 -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
Arnaud Sourioux 8ebb1ca3e6 Bug 877746 - Annotate ~230 methods with MOZ_OVERRIDE in /dom. r=Ms2ger 2013-06-05 12:15:48 -04: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
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
Boris Zbarsky 27b4736d69 Bug 829252 part 2. Make nsGlobalWindow inherit from dom::EventTarget and ensure that all the things that inherit from it correctly QI to it. r=peterv 2013-01-29 08:44:01 -05:00
Gervase Markham 82ff7027aa Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Jonas Sicking a326e5c69f Bug 658714 Part 10: Remove nsIDOM3EventTarget/nsIDOMEventGroup. r=smaug 2011-06-23 19:18:02 -07:00
Jonas Sicking f7e72db3bc Bug 658714 Part 7: DeCOMtaminate nsEventListenerManager. r=smaug 2011-06-23 19:18:01 -07:00
Jonas Sicking cd52437ea7 Bug 658714 Part 6: Fixups after search'n'replace s/nsPIDOMEventTarget/nsIDOMEventTarget/. r=smaug 2011-06-23 19:18:01 -07:00
Jonas Sicking 07c1f0b90f Bug 658714 Part 5: Search'n'replace nsPIDOMEventTarget to nsIDOMEventTarget. r=smaug 2011-06-23 19:18:00 -07:00
Jonas Sicking 815124365b Bug 658714 Part 2: Merge nsIDOMNSEventTarget into nsIDOMEventTarget. r=smaug 2011-06-23 19:17:59 -07:00
Jonas Sicking 50c51df5f9 Bug 658714 Part 1: Merge nsPIDOMEventTarget into nsIDOMEventTarget. r=smaug,bent 2011-06-23 19:17:58 -07:00