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

197 Коммитов

Автор SHA1 Сообщение Дата
Boris Zbarsky d5a8a4a595 Bug 1557793 part 3. Change the signatures of various nsContentUtils localization methods to play nicer with the new stringbundle API. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D34201

--HG--
extra : moz-landing-system : lando
2019-06-08 21:26:12 +00:00
Masayuki Nakano 663f37d827 Bug 1547618 - Make dom use mozilla::PresShell rather than via nsIPresShell r=smaug
Additionally, this patch makes `nsContentUtils::DispatchXULCommand()` because
it guarantees the lifetime of **only** `PresShell` in it.  So, we need to check
the lifetime of each argument at each caller here.

Differential Revision: https://phabricator.services.mozilla.com/D29199

--HG--
extra : moz-landing-system : lando
2019-04-30 01:35:30 +00:00
Henri Sivonen 95281be87c Bug 1532901 - Fix event.screenX and event.screenY inside out-of-process iframes. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D25582

--HG--
extra : moz-landing-system : lando
2019-04-09 10:26:31 +00:00
Masayuki Nakano 9165a150a1 Bug 1540930 - Make nsPresContext use mozilla::PresShell directly rather than via nsIPresShell r=emilio
`nsPresContext` should use `mozilla::PresShell` directly instead of
`nsIPresShell`.  This patch makes it.

Unfortunately, `nsPresContext` and `nsIFrame` have `PresShell()`.  Therefore,
we cannot use `PresShell*` in its methods so that this patch uses `mozilla::`
namespace prefix.

It might be better to rename them as `PresShellPtr()` in another bug.

Differential Revision: https://phabricator.services.mozilla.com/D25721

--HG--
extra : moz-landing-system : lando
2019-04-03 12:40:26 +00:00
Masayuki Nakano e705b3211c Bug 1540015 - part 1: Make Document.h stop including nsIPresShell.h r=smaug
If `Document::GetShell()` returns `PresShell*` rather than `nsIPresShell`, it's
a good step to deCOMTaminate `PresShell`.

This patch makes `Document.h` stop including `nsIPresShell.h` since
`nsIPresShell.h` includes `Document.h` indirectly and that causes bustage
when we make `Document::GetShell()` return `PresShell*`.

Differential Revision: https://phabricator.services.mozilla.com/D25332

--HG--
extra : moz-landing-system : lando
2019-03-29 15:11:04 +00:00
Dorel Luca 5a0fa68b78 Backed out 3 changesets (bug 1540015) for build bustage. CLOSED TREE
Backed out changeset 7b71c9da0214 (bug 1540015)
Backed out changeset 5723ddbc5c44 (bug 1540015)
Backed out changeset 9561d2c36fa5 (bug 1540015)
2019-03-29 16:14:26 +02:00
Masayuki Nakano 854606257b Bug 1540015 - part 1: Make Document.h stop including nsIPresShell.h r=smaug
If `Document::GetShell()` returns `PresShell*` rather than `nsIPresShell`, it's
a good step to deCOMTaminate `PresShell`.

This patch makes `Document.h` stop including `nsIPresShell.h` since
`nsIPresShell.h` includes `Document.h` indirectly and that causes bustage
when we make `Document::GetShell()` return `PresShell*`.

Differential Revision: https://phabricator.services.mozilla.com/D25332

--HG--
extra : moz-landing-system : lando
2019-03-29 12:12:20 +00:00
Josef Citrine dde7723c68 Bug 1485264 - Removed dom.event.highrestimestamp.enabled pref r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D21580

--HG--
extra : moz-landing-system : lando
2019-03-01 18:49:44 +00:00
Masayuki Nakano 6eadee9e6c Bug 998941 - part 2-1: Implement InputEvent.dataTransfer declared by Input Events r=smaug
InputEvent.dataTransfer is declared by Input Events Level 1 and Level 2 (i.e.,
not UI Events).  It's necessary for "beforeinput" event on contenteditable
elements because of with some InputEvent.inputType values on contenteditable,
InputEvent.dataTransfer is used instead of InputEvent.data.

According to the Chrome's behavior, if InputEvent.dataTransfer is created by
web apps, the DataTransfer object is mutable.  Otherwise, i.e., the event
represents user input, the DataTransfer object is read only.  We should follow
this behavior.

This is enabled by default.

Differential Revision: https://phabricator.services.mozilla.com/D19296

--HG--
extra : moz-landing-system : lando
2019-02-19 06:32:11 +00:00
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
Olli Pettay b977d23eb2 Bug 1089326, make <button> hit testing similar to other elements which may have some content, and for click target find the common (interactive) ancestor, r=masayuki
--HG--
extra : rebase_source : 80caab4e074d552c38b62842fe3102fb6735dfd9
2018-12-11 23:35:40 +02: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
Tim Huang 0a30f56cd5 Bug 1363508 - Part 1: Spoofing pen/touch pointer events into mouse pointer events when fingerprinting resistance is on r=arthuredelstein,masayuki,smaug
The pointerType field in the pointer event will reveal the details of
users' hardware; this is a fingerprinting vector. So, we would spoof all
types of pointer events into mouse type pointer events for protecting
users from browser fingerprinting when fingerprinting resistance is on.

In this patch, we would spoof the pointerType as well as other fields
that mouse pointer events don't support, like pressure, tiltX/Y and so
on when fingerprinting resistance is on.

Differential Revision: https://phabricator.services.mozilla.com/D6003

--HG--
extra : moz-landing-system : lando
2018-10-09 11:55:43 +00:00
Andrew McCreight 837f0af066 Bug 1493737 - Fix many trivial calls to do_QueryInterface r=smaug
If class A is derived from class B, then an instance of class A can be
converted to B via a static cast, so a slower QI is not needed.

Differential Revision: https://phabricator.services.mozilla.com/D6861

--HG--
extra : moz-landing-system : lando
2018-10-01 21:38:01 +00:00
Xidorn Quan 35bf576e96 Bug 1375319 part 1 - Make DispatchTrustedEvent able to dispatch composed event and have fullscreen events composed. r=smaug
Depends on D5394

Differential Revision: https://phabricator.services.mozilla.com/D5414

--HG--
extra : moz-landing-system : lando
2018-09-14 00:05:39 +00:00
Alphan Chen 38831149e3 Bug 1452569 - Implement Event's returnValue. r=smaug
Add retrunValue into Event's interface

Differential Revision: https://phabricator.services.mozilla.com/D4084

--HG--
extra : moz-landing-system : lando
2018-08-28 06:28:56 +00:00
Cosmin Sabou 96b1175919 Backed out changeset 8427667b7c9a (bug 1452569) for wpt failures on /dom/interfaces.html. CLOSED TREE 2018-08-27 12:23:22 +03:00
Alphan Chen 11a043ad55 Bug 1452569 - Implement Event's returnValue. r=smaug
Add retrunValue into Event's interface

Differential Revision: https://phabricator.services.mozilla.com/D4084

--HG--
extra : moz-landing-system : lando
2018-08-27 08:08:11 +00:00
Henri Sivonen 3edc601325 Bug 1402247 - Use encoding_rs for XPCOM string encoding conversions. r=Nika,erahm,froydnj.
Correctness improvements:

 * UTF errors are handled safely per spec instead of dangerously truncating
   strings.

 * There are fewer converter implementations.

Performance improvements:

 * The old code did exact buffer length math, which meant doing UTF math twice
   on each input string (once for length calculation and another time for
   conversion). Exact length math is more complicated when handling errors
   properly, which the old code didn't do. The new code does UTF math on the
   string content only once (when converting) but risks allocating more than
   once. There are heuristics in place to lower the probability of
   reallocation in cases where the double math avoidance isn't enough of a
   saving to absorb an allocation and memcpy.

 * Previously, in UTF-16 <-> UTF-8 conversions, an ASCII prefix was optimized
   but a single non-ASCII code point pessimized the rest of the string. The
   new code tries to get back on the fast ASCII path.

 * UTF-16 to Latin1 conversion guarantees less about handling of out-of-range
   input to eliminate an operation from the inner loop on x86/x86_64.

 * When assigning to a pre-existing string, the new code tries to reuse the
   old buffer instead of first releasing the old buffer and then allocating a
   new one.

 * When reallocating from the new code, the memcpy covers only the data that
   is part of the logical length of the old string instead of memcpying the
   whole capacity. (For old callers old excess memcpy behavior is preserved
   due to bogus callers. See bug 1472113.)

 * UTF-8 strings in XPConnect that are in the Latin1 range are passed to
   SpiderMonkey as Latin1.

New features:

 * Conversion between UTF-8 and Latin1 is added in order to enable faster
   future interop between Rust code (or otherwise UTF-8-using code) and text
   node and SpiderMonkey code that uses Latin1.

MozReview-Commit-ID: JaJuExfILM9
2018-08-14 14:43:42 +03:00
Anny Gakhokidze 469c8c4a94 Bug 1461465 - Implement async Clipboard APIs, r=nika,r=enndeakin
MozReview-Commit-ID: 3vCxbaGZtiv
2018-07-31 13:13:02 -04: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
Brindusan Cristian dcbbf37b84 Backed out changeset 7b42110e827b (bug 1461465) for android mochitest failures on test_ext_async_clipboard.html. CLOSED TREE 2018-07-23 22:11:26 +03:00
Anny Gakhokidze 05520e664b Bug 1461465 - Implement async Clipboard APIs, r=nika,enndeakin
MozReview-Commit-ID: 3vCxbaGZtiv
2018-07-23 13:41:07 -04:00
Cosmin Sabou 3144e04a98 Backed out changeset 86bce8df5152 (bug 1461465) for build bustages on dom/Clipboard.h. CLOSED TREE 2018-07-23 19:16:37 +03:00
Anny Gakhokidze 2e0358b999 Bug 1461465 - Part 1: Implement async Clipboard APIs, r=nika,enndeakin
MozReview-Commit-ID: 3vCxbaGZtiv
2018-07-23 11:59:13 -04:00
Jeff Gilbert 5b753da289 Bug 1470325 - s/FooBinding/Foo_Binding/g - r=qdot
MozReview-Commit-ID: JtTcLL5OPF0
2018-06-26 17:05:01 -07:00
Emilio Cobos Álvarez c7d35aa526 Bug 1470930: Use enums for passing arguments for event dispatch. r=smaug
MozReview-Commit-ID: DsNuF7GAflJ
2018-06-26 18:22:06 +02:00
Boris Zbarsky cb7c822801 Bug 453968. Enable event.srcElement on all channels. r=smaug
I could keep using BinaryName to make the IDL look more like the spec, but this
is a bit more efficient...
2018-05-08 13:52:42 -04:00
Boris Zbarsky 5415ab3858 Bug 1455052 part 13. Remove nsIDOMEvent. r=masayuki
MozReview-Commit-ID: 3gmGy4URet3
2018-04-20 12:55:31 -04:00
Boris Zbarsky 367b5456ea Bug 1455052 part 11. Remove nsIDOMEvent::InternalDOMEvent. r=masayuki
MozReview-Commit-ID: 2ytv7CjkPGz
2018-04-20 12:55:31 -04:00
Boris Zbarsky a81bb92f43 Bug 1455052 part 10. Remove various unused nsIDOMEvent bits. r=masayuki
MozReview-Commit-ID: Fzckal7RGUv
2018-04-20 12:55:31 -04:00
Boris Zbarsky a3ea17eac1 Bug 1455052 part 9. Stop using nsIDOMEvent in DataTransferItem. r=masayuki
I couldn't figure out a way to do this without giving Event an IID....

MozReview-Commit-ID: LdXmsQSHeIc
2018-04-20 12:55:31 -04:00
Boris Zbarsky 0ba35d199f Bug 1455052 part 8. Stop using nsIDOMEvent in docshell and dom. r=masayuki
MozReview-Commit-ID: ASkuyN3xSwB
2018-04-20 12:55:30 -04:00
Boris Zbarsky 0ba5797320 Bug 1455052 part 3. Change GetEventPopupControlState to work with Event. r=masayuki
MozReview-Commit-ID: ArEfBOa7Pha
2018-04-20 12:53:17 -04:00
Boris Zbarsky 72f940dafe Bug 1429903 part 2. Stop using nsIDOMEventTarget in xpidl. r=mccr8
MozReview-Commit-ID: HQw7TyJUapY
2018-04-20 00:49:30 -04:00
Boris Zbarsky e3b983e73c Bug 1429903 part 1. Remove various target getters on nsIDOMEvent. r=mccr8
MozReview-Commit-ID: Ak0xdxxnSbI
2018-04-20 00:49:30 -04:00
Emilio Cobos Álvarez 9083c33e83 Bug 1453206: Fix IsInAnonymousSubtree to account for XBL in Shadow DOM. r=smaug
MozReview-Commit-ID: B2aYury8K7i
2018-04-14 11:59:06 +02:00
Andreea Pavel 4784e6b61b Backed out 2 changesets (bug 1453206) for crashtest failures on muliple files e.g. tests/reftest/tests/layout/base/crashtests/416107.xhtml on a CLOSED TREE
Backed out changeset 1844a120acda (bug 1453206)
Backed out changeset b12b7c5b8178 (bug 1453206)
2018-04-13 23:06:55 +03:00
Emilio Cobos Álvarez 1fe3a2d36a Bug 1453206: Fix IsInAnonymousSubtree to account for XBL in Shadow DOM. r=smaug
MozReview-Commit-ID: B2aYury8K7i
2018-04-13 21:05:48 +02:00
Tom Ritter 6ebcecc30e Bug 1440195 Add a random context seed to the Performance APIs r=baku
We attach it to WorkerPrivate and DOMNavigationTiming so it will be re-used
when it should.

WorkerPrivate is used in the Performance APIs, Performance Storage Worker,
and Event.

DOMNavigationTiming is used only in the Performance APIs, but the crucial
part is that when the individual DOMNavigationTiming object is re-used,
so will the context seed. This in particular came up with the
nav2_test_document_open.html Web Platform Test which illustrated the fact
that even if you .open() a new document, the performance navigation data
is not supposed to change.

MozReview-Commit-ID: GIv6biEo2jY

--HG--
extra : rebase_source : da2ad8d9d6e0172679c6af14dba72938e9d2012c
2018-03-13 12:36:34 -05:00
Tom Ritter d6e36d7aab Bug 1443943 Do not clamp/jitter event timestamps if it's a system principal r=baku
MozReview-Commit-ID: KvVJpvu4elN

--HG--
extra : rebase_source : fb2369944951ed9fbe9da6b6633b5dcf7f335449
2018-03-09 10:00:23 -06:00
Boris Zbarsky 8b2e5c1850 Bug 1444004. Implement Event.prototype.srcElement as an alias for .target, nightly-only. r=smaug
MozReview-Commit-ID: JhKdc07CVsL
2018-03-07 23:38:14 -05:00
Boris Zbarsky 15f6ca70fd Backed out changeset 52d86f152c2d because it included bits that shouldn't have been in there leading to a CLOSED TREE.
MozReview-Commit-ID: KWl43hdIGN2
2018-03-07 23:35:48 -05:00
Boris Zbarsky f524da36b5 Bug 1444004. Implement Event.prototype.srcElement as an alias for .target, nightly-only. r=smaug
MozReview-Commit-ID: 4UMNqUBfUnp
2018-03-07 23:15:32 -05:00
Hiroyuki Ikezoe 1b0cba9367 Bug 1417354 - Introduce nsIDocument::GetPresContext(). r=smaug
It would be convenient to get nsPresContext from nsIDocument.

MozReview-Commit-ID: Ei6V3UE8XGr

--HG--
extra : rebase_source : 8d2a917eb62cf341e4e1810451fd01c01dbc3bad
2018-02-21 07:00:10 +09:00
Olli Pettay b9ac198b01 Bug 1413102 - Ensure Shadow DOM boundaries are dealt properly in event handling, r=masayuki 2018-02-15 12:08:42 +02:00
Dorel Luca 12fe7a2577 Backed out changeset 2320b7fd9266 (bug 1413102) for Mochitest failure on dom/tests/mochitest/pointerlock/test_pointerlock-api.html 2018-02-14 20:44:19 +02:00
Olli Pettay 6a7af9eddf Bug 1413102 - Ensure Shadow DOM boundaries are dealt properly in event handling, r=masayuki
--HG--
extra : rebase_source : 72130abec4634f60f9c8f9b9bcd7630ef26097e1
2018-02-14 14:16:15 +02:00
Andrea Marchesini 8cdf705535 Bug 1435174 - Remove the renaming 'using namespace workers', r=bkelly 2018-02-05 19:55:07 +01:00