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

72 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez d2ed260822 Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug
Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.

Overall it's not a very interesting patch I think.

nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.

I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.

While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
2019-01-03 17:48:33 +01:00
Andrea Marchesini 9cc643f6d3 Bug 1513895 - Unify PopupBlocker algorithm in 1 single file, r=smaug 2018-12-16 10:21:16 +01:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Boris Zbarsky 1914ffc8ec Bug 1450167. Stop using atom-or-string for event names in the listener manager. r=smaug
Now that we support atoms off the the main thread, we can just use atoms.
2018-07-24 18:15:19 -04:00
Henri Sivonen 2363350998 Bug 218415 - Add window.event. r=smaug.
window.event is set on the wrong window when the target and the
callback are from different realms and the callback is an XPCOM
callback.

MozReview-Commit-ID: HXeUIicdMuT

--HG--
extra : rebase_source : 978a3fecf87e1ac4414ec0ea93335796bc24951a
2018-04-04 15:57:17 +03:00
Bogdan Tara 6669112756 Backed out changeset 306ec43e7ab9 (bug 218415) for failures on track-remove-track-inband.html CLOSED TREE 2018-07-04 19:56:18 +03:00
Henri Sivonen 82805f2778 Bug 218415 - Add window.event. r=smaug.
window.event is set on the wrong window when the target and the
callback are from different realms and the callback is an XPCOM
callback.

MozReview-Commit-ID: HXeUIicdMuT

--HG--
extra : rebase_source : 5852093c015844cf3cc49dcd7fe71c9ea881eef9
2018-04-04 15:57:17 +03:00
Margareta Eliza Balazs d898125afb Backed out changeset 27257fdd6c67 (bug 218415) for xpcshell failures in js/xpconnect/tests/unit/test_nuke_sandbox_event_listeners.js on a CLOSED TREE 2018-07-04 16:46:52 +03:00
Henri Sivonen f63ec4c1fe Bug 218415 - Add window.event. r=smaug.
window.event is set on the wrong window when the target and the
callback are from different realms and the callback is an XPCOM
callback.

MozReview-Commit-ID: HXeUIicdMuT

--HG--
extra : rebase_source : 9679d42cc9df899e2208a3cb72e14fdaabbcad8c
2018-04-04 15:57:17 +03:00
Emilio Cobos Álvarez fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Boris Zbarsky f1e26dcba7 Bug 1455052 part 1. Switch event dispatch to working with Event, not nsIDOMEvent. r=masayuki
MozReview-Commit-ID: 4vZgmBnTWKH
2018-04-20 12:53:16 -04:00
Boris Zbarsky 4cfde58ac8 Bug 1453345 part 3. Remove the eWrappedJSListener listener type, now that we shouldn't have them anymore. r=smaug
MozReview-Commit-ID: LycJUIJm5p9
2018-04-12 00:03:44 -04:00
Boris Zbarsky 4ec0cf9709 Bug 1453132. Change nsIEventListenerService to use WebIDL event listeners, not nsIDOMEventListener. r=smaug
The test change is needed because there is no notok() function.  But the old
nsIDOMEventListener setup would fail to report the exception anywhere, so the
test still passed (albeit without testing what it thought it was testing).  The
new setup reports the exception via an error event on the window, and the test
harness notices that.

MozReview-Commit-ID: 3ISmcyhMk0R
2018-04-11 10:27:01 -04:00
Boris Zbarsky 0b77426fa7 Bug 1449631 part 11. Remove nsIDOMEventTarget::AddSystemEventListener. r=smaug
The security checks outer window did here don't seem right, because the whole
point is that this method is only called by C++ code for its own purposes.
We're not adding random untrusted listeners via addSystemEventListener!

MozReview-Commit-ID: JdS5gTESclu
2018-04-05 13:42:42 -04:00
Olli Pettay abe47d910c Bug 1449268 - Treat document-level touch event listeners as passive, r=kats
--HG--
extra : rebase_source : 0ea948a612dfbd46b80b52985f96685b012e0079
2018-04-04 19:19:54 +03:00
Thomas Wisniewski e6ae182e4a Bug 1449812 - Constify DOMEventTargetHelper::HasListeners and HasListenersFor. r=baku
MozReview-Commit-ID: 739quGYs78Y

--HG--
extra : rebase_source : 8dec1d2187473c8583e538cc40fd544f6da38ae8
2018-03-28 22:40:32 -04:00
Nicholas Nethercote d225f7151b Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro.
(Path is actually r=froydnj.)

Bug 1400459 devirtualized nsIAtom so that it is no longer a subclass of
nsISupports. This means that nsAtom is now a better name for it than nsIAtom.

MozReview-Commit-ID: 91U22X2NydP

--HG--
rename : xpcom/ds/nsIAtom.h => xpcom/ds/nsAtom.h
extra : rebase_source : ac3e904a21b8b48e74534fff964f1623ee937c67
2017-10-03 09:05:19 +11:00
Nicholas Nethercote dfd3b7e7aa Bug 1400459 (part 2) - Devirtualize nsIAtom. r=heycam.
This patch merges nsAtom into nsIAtom. For the moment, both names can be used
interchangeably due to a typedef. The patch also devirtualizes nsIAtom, by
making it not inherit from nsISupports, removing NS_DECL_NSIATOM, and dropping
the use of NS_IMETHOD_. It also removes nsIAtom's IIDs.

These changes trigger knock-on changes throughout the codebase, changing the
types of lots of things as follows.

- nsCOMPtr<nsIAtom> --> RefPtr<nsIAtom>

- nsCOMArray<nsIAtom> --> nsTArray<RefPtr<nsIAtom>>
  - Count() --> Length()
  - ObjectAt() --> ElementAt()
  - AppendObject() --> AppendElement()
  - RemoveObjectAt() --> RemoveElementAt()

- ns*Hashtable<nsISupportsHashKey, ...> -->
  ns*Hashtable<nsRefPtrHashKey<nsIAtom>, ...>

- nsInterfaceHashtable<T, nsIAtom> --> nsRefPtrHashtable<T, nsIAtom>
  - This requires adding a Get() method to nsRefPtrHashtable that it lacks but
    nsInterfaceHashtable has.

- nsCOMPtr<nsIMutableArray> --> nsTArray<RefPtr<nsIAtom>>
  - nsArrayBase::Create() --> nsTArray()
  - GetLength() --> Length()
  - do_QueryElementAt() --> operator[]

The patch also has some changes to Rust code that manipulates nsIAtom.

MozReview-Commit-ID: DykOl8aEnUJ

--HG--
extra : rebase_source : 254404e318e94b4c93ec8d4081ff0f0fda8aa7d1
2017-09-26 08:33:21 +10:00
Ryan Hunt c38e071dbe Bug 1385071 - Add another method to EventTarget for detecting only non-passive key listeners. r=smaug
This is for adding a pref that will allow web content to have key listeners
and use keyboard APZ, if they are marked passive. This commit also reworks
the function names and comments to make them more accurate.

MozReview-Commit-ID: LGDaVQOK1CS

--HG--
extra : rebase_source : a6bb4b7fff3488dea62b9114aa164814c74561a4
2017-07-27 19:46:44 -04:00
Sylvestre Ledru 4e9cf83ee8 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG

--HG--
extra : rebase_source : 7235b3802f25bab29a8c6ba40a181a722f3df0ce
2017-07-06 14:00:35 +02:00
Ryan Hunt 1432b9109d Bug 1351783 part 8 - Gather whether there are key listeners on the focused element. r=kats,smaug
This commit updates FocusTarget to collect whether there are key listeners
on the event target chain for the focused element. This is needed because we
cannot do async scrolling when this is the case.

MozReview-Commit-ID: FhSyF6ffZ4

--HG--
extra : rebase_source : 3e7e8e88ddda1a6b9e8542c131fdbb37e578d7e1
2017-06-05 19:22:16 -05:00
Olli Pettay 8d489930b6 Bug 1374416 - don't dispatch the selectionchange event for pages that don't have such a listener registered, r=mystor
--HG--
extra : rebase_source : 7fb95e7f3c766b9de3a00175a0133093e2d194b1
2017-06-22 21:01:27 +03:00
Ryan Hunt fd8c1c280d Bug 1373285 - Remove keyboard apz telemetry probes. r=smaug
These are no longer needed as we have the data we were looking for.

MozReview-Commit-ID: 3WlPng3mAwt

--HG--
extra : rebase_source : 73a390f85f5c0894d53a5e8ee10b19278af58282
extra : amend_source : 6a2b9ff4191715d0ac6e43f92af1e64c59123ac6
2017-06-15 13:55:26 -05:00
Ryan Hunt d5bf64b9d4 Bug 1357880 - Add a telemetry probe for mousemove event listeners r=smaug, data-review=bsmedberg
This commit adds a telemetry probe to determine the percentage of pages
that ever have a 'mousemove' event listener added to the DOM. This is for
determining how often APZ key scrolling could handle interleaved mousemove
events.

A flag is added to nsPIDOMWindow to track whether a qualifying event
listener was ever added to the DOM for this window, and is updated by
EventListenerManager. There are several other similar flags to this.

The probe is reported in nsGlobalWindow::FreeInnerObjects() so that it
can be compared exactly with the non-passive keyboard listener APZ probe.

MozReview-Commit-ID: DqqCfrdRCGp

--HG--
extra : rebase_source : fad8159c28b587572a4191f7cbde1e97e166639c
2017-04-26 18:56:51 -04:00
Ryan Hunt ebd2c4d010 Bug 1357880 - Add a telemetry probe for non-passive keyboard event listeners r=smaug, data-review=bsmedberg
This commit adds a telemetry probe to track the percentage of pages that ever
have a non-passive 'keydown' or 'keypress' event that could preventDefault()
APZ key scrolling of the root of a page.

A flag is added to each EventListenerManager to track whether it ever had
a qualifying event listener, and then in nsGlobalWindow::FreeInnerObjects()
the event targets that could preventDefault() a scroll are checked for this
flag. This check is done at nsGlobalWindow::FreeInnerObjects() so that the
DOM is still alive.

MozReview-Commit-ID: EkK3vxehZA5

--HG--
extra : rebase_source : 4642189d0065254cf74dfe8475403f0bf8210bca
2017-04-27 18:32:08 -04:00
Andrea Marchesini b623ab29ec Bug 1354599 - Implement DOMEventTargetHelper::KeepAliveIfHasListenersFor, r=smaug 2017-04-18 13:51:27 +02:00
Xidorn Quan a622a4ba48 Bug 1287706 part 7 - Add support of AddEventListenerOptions.once. r=smaug
MozReview-Commit-ID: BzuhPtNW29u

--HG--
extra : source : edb9d160b5f567c97b307b465f4a575f2210d5d4
2016-07-28 12:00:06 +10:00
Xidorn Quan 55d860ca4a Bug 1287706 part 6 - Separate notifying listener removal to an independent method. r=smaug
MozReview-Commit-ID: EE4fp4eqzqK

--HG--
extra : source : 51a979be13f77f84e69ea202ddb2838612b324c0
2016-07-28 12:00:06 +10:00
Xidorn Quan 6ed5e7d57e Bug 1287706 part 3 - Make EventListenerHandler::Listener movable. r=smaug
MozReview-Commit-ID: F86qndZHNxB

--HG--
extra : source : 310aecf4285e01270ab639a4ada66c893e01ae77
2016-07-28 12:00:06 +10:00
Xidorn Quan 707f2d70a0 Bug 1287706 part 2 - Remove useless runtime check of EventListenerManager::Listener. r=smaug
MozReview-Commit-ID: 3XEfeF03Umx

--HG--
extra : source : de7346c106bd2716de7b3ab5068ef6604dd6d826
2016-07-28 12:00:06 +10:00
Xidorn Quan 31f5ebf083 Bug 1287706 part 1 - Make CallbackObjectHolder movable (and actually move-only). r=smaug
So that we can avoid unnecessary refcount changes.

MozReview-Commit-ID: 4Mk9SJTj6AS

--HG--
extra : source : c35643f76ef33b6cdce115c8de0dfae8abccd644
2016-07-28 12:00:06 +10:00
Kartikaya Gupta eb68bbaaa8 Bug 970346 - Add a DocShell attribute to override the default touch event options to a tab. r=bz
MozReview-Commit-ID: 4BdhwQRBavd
2016-07-18 10:26:38 -04:00
Blake Kaplan 166fd4584a Bug 1281072 - Fix a typo in this function name. r=smaug 2016-06-21 13:46:02 -07:00
Kartikaya Gupta b867e298b4 Bug 1266066 - Ignore passive event listeners for APZ purposes. r=botond,smaug
MozReview-Commit-ID: 1F41jHsVOyY
2016-05-12 14:50:58 -04:00
Kartikaya Gupta a412581b20 Bug 1266066 - Implement DOM support for the 'passive' event listener flag. r=smaug
MozReview-Commit-ID: EvSCDxYC7g6
2016-05-12 14:50:22 -04:00
Xidorn Quan 7854a13c5b Bug 1268749 part 5 - Avoid dispatching unprefixed fullscreen events to content if unprefixed API is disabled. r=smaug
MozReview-Commit-ID: BLL7xr0EJu8

--HG--
extra : rebase_source : 9c41673bb69de10203c334e216773a23d1e7de53
2016-05-04 13:29:14 +10: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
Masayuki Nakano e88a0f30fa Bug 1259656 part.3 Rename WidgetEvent::userType to WidgetEvent::mSpecifiedEventType r=smaug
MozReview-Commit-ID: 5ef5lEQ1fZJ

--HG--
extra : rebase_source : 0d0f8b7e29db15b41ff6ac68db24b3e7d3df6afc
2016-04-18 23:53:03 +09:00
Masayuki Nakano 399cac9177 Bug 1256589 part.7 Add PropagationStopped() to WidgetEvent r=smaug
MozReview-Commit-ID: 3eLDURWr6d9

--HG--
extra : rebase_source : 058ab0d76512622a63c792cb91eb83700743549a
extra : source : 5fda4309b3413d8227828dcfce585500290c0a04
2016-03-17 16:21:57 +09:00
Timothy Nikkel 144bb37d6e Bug 1210057. Schedule a paint when an apz aware event listener is added so that event regions on the layer tree get updated. r=smaug 2016-02-10 17:47:59 -06:00
Daniel Holbert bbdaa0ddbd Bug 1236979 part 3: If there are no listeners for a transition or animation event, check listeners again using a webkit-prefixed event name. r=smaug 2016-02-02 10:03:49 -08:00
Daniel Holbert 2eb04f5120 backout bug 1236979 (changesets 2f4de652525e, d7136545a16e, f62e6638add1, f8b1e085b161) for xpcshell test failures 2016-02-01 21:57:38 -08:00
Daniel Holbert 054ab955e4 Bug 1236979 part 3: If there are no listeners for a transition or animation event, check listeners again using a webkit-prefixed event name. r=smaug 2016-02-01 19:05:12 -08:00
Kyle Huey 91efc5a86c Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
Olli Pettay 68663347da Bug 1205466, make HasApzAwareListeners check faster, r=masayuki
--HG--
extra : rebase_source : 41c94b02117a09785938349dc9ad513af9bf048b
2015-09-17 13:16:20 +03:00
Masayuki Nakano 35cc2a0a26 Bug 895274 part.149 Rename NS_USER_DEFINED_EVENT to eUnidentifiedEvent r=smaug 2015-09-10 10:40:04 +09:00
Masayuki Nakano 0d22745cda Bug 895274 part.3 Make the enum of event messages a named enum IGNORE IDL r=smaug 2015-08-26 21:56:59 +09:00
Masayuki Nakano 66f2c27305 Bug 895274 part.1 Rename WidgetEvent::message to WidgetEvent::mMessage r=smaug 2015-08-22 10:34:51 +09:00
Jim Chen 337c08cab7 Bug 1112212 - Add may-have flags for key event and input event listeners; r=smaug 2015-06-16 19:02: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