Commit Graph

2921 Commits

Author SHA1 Message Date
Xidorn Quan
04533463d7 Bug 1489387 - Have fullscreenerror event aligned to refresh driver tick. r=smaug
Depends on D5235

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

--HG--
extra : moz-landing-system : lando
2018-09-09 23:33:40 +00:00
Csoregi Natalia
ef2ff61afa Backed out changeset 4ed98e49718c (bug 1489387) for element-request-fullscreen-active-document.html failures. CLOSED TREE 2018-09-08 04:37:09 +03:00
Xidorn Quan
38f40d8252 Bug 1489387 - Have fullscreenerror event aligned to refresh driver tick. r=smaug
Depends on D5235

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

--HG--
extra : moz-landing-system : lando
2018-09-07 19:00:03 +00:00
Xidorn Quan
afd201db11 Bug 1489385 part 2 - Make the refresh driver event dispatching specific to fullscreen events. r=smaug
The mechanism was added in bug 1168705 for fullscreen, and is only used
for this since then. The spec now has a specific step for this in the
event loop, so specialize this mechanism to match the spec closer.

This patch also changes the caller type of the fullscreenchange event
from non-system to system (via using DispatchTrustedEvent rather than
EventTarget::DispatchEvent(Event&)).

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

--HG--
extra : source : 179f5fbd9db08518804b613f5e3fefa659c1e0a2
2018-09-08 08:53:33 +10:00
Mike Hommey
32627430f6 Bug 1489363 - Replace some string.Append* with AppendLiteral. r=froydnj
Depends on D5224

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

--HG--
extra : moz-landing-system : lando
2018-09-07 22:12:04 +00:00
Mike Hommey
117e48720c Bug 1489363 - Replace some string.Assign* with AssignLiteral. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D5224

--HG--
extra : moz-landing-system : lando
2018-09-07 22:12:01 +00:00
Sylvestre Ledru
aa37bde79b Bug 1489454 - Remove all trailing whitespaces (again) r=Ehsan
This also includes moving some files to the regular format.

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

--HG--
extra : moz-landing-system : lando
2018-09-07 14:47:51 +00:00
Edgar Chen
08067b0f64 Bug 1488728 - Remove PresShell::GetEventTargetFrame; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D5025

--HG--
extra : moz-landing-system : lando
2018-09-05 13:36:35 +00:00
Paolo Amadini
5aaf848c8b Bug 1457218 - Part 3 - Remove the "menu-button" binding. r=surkov,bgrins
Differential Revision: https://phabricator.services.mozilla.com/D4531

--HG--
extra : rebase_source : 502aa0ff24d0e3d46ef60c7a14498e25c66d1c81
2018-08-29 14:04:25 +01:00
Nicholas Nethercote
ac5efebb4b Bug 1486690 - Remove unnecessary checks after moz_xmalloc() calls. r=glandium
There are surprisingly many of them.

(Plus a couple of unnecessary checks after `new` calls that were nearby.)

--HG--
extra : rebase_source : 47b6d5d7c5c99b1b50b396daf7a3b67abfd74fc1
2018-08-28 15:56:01 +10: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
Anny Gakhokidze
edf3cdbd07 Bug 1453153 - Initial removal of moz* APIs in DataTransfer, r=enndeakin,r=nika
In DataTransfer, change mozItemCount, mozTypesAt, mozClearDataAt, mozSetDataAt,
mozGetDataAt APIs to be ChromeOnly.

MozReview-Commit-ID: 9uJ9ncrcBL2
2018-08-22 15:10:31 -04:00
Olli Pettay
ddda29dcf1 Bug 1484371 - make *enter/*leave events uncomposed, r=masayuki
--HG--
extra : rebase_source : 508dc487915b352682887e1a4650fc396564d532
2018-08-22 16:08:17 +03:00
Kris Maglione
7f10bb1ced Bug 1484363: Treat FrameMessageManagers as chrome event targets. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D3663

--HG--
extra : rebase_source : aad2e4c00e6635658c736cf9400f2fb3ce5809ac
2018-08-17 15:11:11 -07:00
Kris Maglione
f84c2cf454 Bug 1480244: Part 1c - Rename TabChildGlobal to TabChildMessageManager. r=bz
MozReview-Commit-ID: ECtFjFV7dZa

--HG--
extra : rebase_source : 50e64fa4da1099ca2bd9e14c8679bb87c354015e
2018-08-10 14:04:23 -07:00
Andreea Pavel
fba9b7255c Merge mozilla-central to mozilla-inbound. a=merge on a CLOSED TREE 2018-08-14 19:19:03 +03:00
Andreea Pavel
5d75e43adc Merge mozilla-inbound to mozilla-central. a=merge 2018-08-14 19:15:33 +03: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
Margareta Eliza Balazs
9575863d77 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-08-14 12:35:25 +03:00
Xidorn Quan
33b8a6dacd Bug 1483090 - Rename StyleUserInterface to StyleUI. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D3276

--HG--
extra : moz-landing-system : lando
2018-08-14 08:37:37 +00:00
Daniel Varga
9355025fd5 Merge mozilla-central to mozilla-inbound 2018-08-14 01:09:48 +03:00
Ting-Yu Lin
48d02834a5 Bug 1482665 Part 2 - Remove nsPresContext::AppUnitsPerCSSPixel() and replace it with mozilla::AppUnitsPerCSSPixel(). r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D3155
2018-08-13 14:29:28 -07:00
Adrian Wielgosik
be0c1a4f55 Bug 1481645 - Remove some redundant uses of do_QueryInterface. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D2893

--HG--
extra : moz-landing-system : lando
2018-08-13 09:05:19 +00:00
Bogdan Tara
b6dabcd8c5 Backed out changeset 485fdf8e37e8 (bug 1453153) for clipboard failures on test_findbar.xul CLOSED TREE 2018-08-11 03:21:43 +03:00
Anny Gakhokidze
be49493caf Bug 1453153 - Initial removal of moz* APIs in DataTransfer, r=enndeakin,nika
In DataTransfer, change mozItemCount, mozTypesAt, mozClearDataAt, mozSetDataAt,
mozGetDataAt APIs to be ChromeOnly.

MozReview-Commit-ID: 9uJ9ncrcBL2
2018-08-10 11:57:06 -04:00
Kris Maglione
57d6fb6016 Bug 1472491: Part 1 - Add [ChromeOnly] wantUntrusted event listener option. r=bz
This is the same as the non-standard 4th addEventListener argument, but in a
more standard place. Aside from being easier for readers to understand, this
makes it much easier to define a set of DOM events an IPC actor needs to
handle, without adding extra hacks to handle untrusted listeners.

MozReview-Commit-ID: H6KxjSHtQrY

--HG--
extra : rebase_source : 2d07a77f0cc22df59e19740d8ef538da06e763d3
2018-07-29 18:51:00 -07:00
Jan de Mooij
dc6c0b33da Bug 1472976 part 2 - Use the callback global instead of the callback in JSEventHandler::HandleEvent. r=smaug
The callback and the global here must be same-compartment, but the callback might be a CCW.
2018-08-10 11:57:39 +02:00
Gabriele Svelto
15adf94f4d Bug 1348273 - Convert crash annotations into a machine-readable list of constants; r=ted.mielczarek,njn,dholbert,mak,cpearce,mcmanus,froydnj,Dexter,jrmuizel,jchen,jimm,bz,surkov
This introduces the machinery needed to generate crash annotations from a YAML
file. The relevant C++ functions are updated to take a typed enum. JavaScript
calls are unaffected but they will throw if the string argument does not
correspond to one of the known entries in the C++ enum. The existing whitelists
and blacklists of annotations are also generated from the YAML file and all
duplicate code related to them has been consolidated. Once written out to the
.extra file the annotations are converted in string form and are no different
than the existing ones.

All existing annotations have been included in the list (and some obsolete ones
have been removed) and all call sites have been updated including tests where
appropriate.

--HG--
extra : source : 4f6c43f2830701ec5552e08e3f1b06fe6d045860
2018-07-05 15:42:11 +02:00
Neil Deakin
03caccfe9e Bug 1473029, remove the region arguments from InvokeDragSession and InvokeDragSessionWithImage, r=mstange 2018-08-07 09:32:07 -04:00
Neil Deakin
5c09ea7e66 Bug 1473029, move the tree drag region handling into nsBaseDragService::InvokeDragSessionWithImage, r=mstange 2018-08-07 09:32:07 -04:00
Csoregi Natalia
0f4d50ff52 Merge inbound to mozilla-central. a=merge 2018-08-08 12:58:36 +03:00
Masayuki Nakano
dde0996690 Bug 1481292 - part 2: Make ContentEventHandler::GetLastFrameInRangeForTextRect() and ContentEventHandler::AdjustCollapsedRangeMaybeIntoTextNode() use RangeBoundary when they treat start or end of range r=smaug
ContentEventHandler::GetLastFrameInRangeForTextRect() and
ContentEventHandler::AdjustCollapsedRangeMaybeIntoTextNode() use
nsINode::GetChildAt_Deprecated() directly. They use this method when they
treat start or end of a range. So, we can make them use RangeBoundary instead.

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

--HG--
extra : moz-landing-system : lando
2018-08-08 01:43:31 +00:00
Masayuki Nakano
9f4492d17d Bug 1481292 - part 1: Get rid of ContentEventHandler::GetNodePositionHavingFlatText() because of unused r=smaug
ContentEventHandler::GetNodePositionHavingFlatText() is not used by anybody.
So, we should just get rid of it.

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

--HG--
extra : moz-landing-system : lando
2018-08-07 13:50:23 +00:00
arthur.iakab
f0c15db995 Merge inbound to mozilla-central a=merge 2018-08-07 18:42:40 +03:00
Jan de Mooij
4af62d6c9e Bug 1480678 part 7 - Use CallbackObject's callback global for realm entering in more places. r=bz 2018-08-07 14:06:44 +02:00
Edgar Chen
1a8c36d58a Bug 1127588 - Fix the DOMNodeRemoved mutation event isn't fired when updating document.title; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D2774

--HG--
extra : moz-landing-system : lando
2018-08-07 07:47:00 +00:00
Jeremy Lempereur
96d35f35bd Bug 1471708 - Rename the "scroll-position clamping scroll port size" to "visual viewport size". r=botond
MozReview-Commit-ID: IWPzXSF5jfR

--HG--
extra : rebase_source : f67d64ef18a643077d5019048399e68acc722337
2018-07-22 21:49:38 +02:00
Emilio Cobos Álvarez
f3e5678c1a Bug 1481514: Teach some places in ESM to walk the flattened tree. r=smaug
PresShell does this already.

I updated the scroll / drag code as well, but I need to admit I didn't figure
out how to write a test for it. The rest of the codepaths are needed for the
added test to pass.

Differential Revision: https://phabricator.services.mozilla.com/D2871
2018-08-07 22:43:23 +02:00
Emilio Cobos Álvarez
82a8b81f17 Bug 1481500: Teach EnterLeaveDispatcher about the flattened tree. r=smaug
We shouldn't fire mouseenter / leave based on the light tree, but the
flattened tree, the same way as the rest of the hover code works.

Differential Revision: https://phabricator.services.mozilla.com/D2866
2018-08-07 22:42:10 +02:00
Cosmin Sabou
7cf1ac297e Backed out changeset 542243f5f600 (bug 1471708) for failling reftest on gfx/layers/apz/test/reftest/async-scrollbar-1. 2018-08-05 07:57:50 +03:00
Jeremy Lempereur
e591a6945a Bug 1471708 - Rename the "scroll-position clamping scroll port size" to "visual viewport size". r=botond
MozReview-Commit-ID: IWPzXSF5jfR

--HG--
extra : rebase_source : 9d13a680ebf76a5f86c9040a5a16981514435dc8
2018-07-22 21:49:38 +02:00
Noemi Erli
23c8a3a9f3 Backed out changeset 1e9ecba54e7b (bug 1348273) for failing on widget/tests/test_bug1123480.xul 2018-08-04 12:39:40 +03:00
Boris Zbarsky
f771d7e529 Bug 1477923. Make WebIDL callbacks store a global in addition to the object that's used as a callback. r=mccr8
We want to be able to enter the Realm we were in when the callback was created
before calling it, but if the callback stores a cross-compartment wrapper we
don't really have a good way to find that Realm.  So we store it explicitly by
storing a global when the callback is created.

The changes to the constructor signatures to use JSObject* instead of
JS::Handle<JSObject*> are so we can avoid having to root the global for these
calls.  These changes make two of the constructors ambiguous when nullptr is
being passed for the first arg; this patch adds casts to disambiguate.
2018-08-03 17:11:39 -04:00
Gabriele Svelto
50ba13cce4 Bug 1348273 - Convert crash annotations into a machine-readable list of constants; r=ted.mielczarek,njn,dholbert,mak,cpearce,mcmanus,froydnj,Dexter,jrmuizel,jchen,jimm,bz,surkov
This introduces the machinery needed to generate crash annotations from a YAML
file. The relevant functions are updated to take a typed enum (in C++) and an
integer constant (in JavaScript). A JavaScript wrapper around the crash
reporter service is provided to hold the constants. The existing whitelists
and blacklists of annotations are also generated from the YAML file and the
existing duplicate code has been consolidated. Once written out to the .extra
file the annotations are converted in string form and are no different than
the existing ones.

All existing annotations have been included (and some obsolete ones removed)
and all call sites have been updated including tests.

--HG--
extra : rebase_source : b4f0d4bf83c64851028c271d3fab3ebcb6fbcd3e
2018-07-05 15:42:11 +02:00
Coroiu Cristina
1ba19a32ac Backed out changeset 86471a18672f (bug 1348273) for ESlint failure at toolkit/modules/WebNavigationChild.jsm
--HG--
extra : rebase_source : e0c94f49ddc1f1b119b72c06fccc1b4363b9d340
2018-08-03 22:48:51 +03:00
Gabriele Svelto
eff24befbd Bug 1348273 - Convert crash annotations into a machine-readable list of constants; r=ted.mielczarek,njn,dholbert,mak,cpearce,mcmanus,froydnj,Dexter,jrmuizel,jchen,jimm,bz,surkov
This introduces the machinery needed to generate crash annotations from a YAML
file. The relevant functions are updated to take a typed enum (in C++) and an
integer constant (in JavaScript). A JavaScript wrapper around the crash
reporter service is provided to hold the constants. The existing whitelists
and blacklists of annotations are also generated from the YAML file and the
existing duplicate code has been consolidated. Once written out to the .extra
file the annotations are converted in string form and are no different than
the existing ones.

All existing annotations have been included (and some obsolete ones removed)
and all call sites have been updated including tests.

--HG--
extra : rebase_source : f0e8d229581ac5c0daa0e0454cb258746108e28d
2018-07-05 15:42:11 +02:00
Boris Zbarsky
e4b74becff Bug 1479569 part 2. Use the new messageManager getter on docshell. r=kmag
I generally tried to preserve the behavior of consumers where they treated an
exception from getInterface(Ci.nsIContentFrameMessageManager) as a signal to use
some sort of fallback.

I did change the behavior of consumers that walked up to the root same-type
docshell before getting the message manager to just get it directly from the
docshell they have.  Please review those parts carefully, and let me know if you
want me to ask some subject area experts to review those.
2018-08-02 23:49:09 -04:00
Csoregi Natalia
08c950712e Backed out 3 changesets (bug 1479569) for devtools/client/responsive.html failures. CLOSED TREE
Backed out changeset e123d0aa911c (bug 1479569)
Backed out changeset b828a58404e5 (bug 1479569)
Backed out changeset 97041ef8f311 (bug 1479569)
2018-08-03 10:39:12 +03:00