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

77017 Коммитов

Автор SHA1 Сообщение Дата
Narcis Beleuzu 1e60ae6690 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-08-30 20:08:44 +03:00
Narcis Beleuzu 05d91d3e02 Merge inbound to mozilla-central. a=merge 2018-08-30 19:58:52 +03:00
Henri Sivonen 7753be203b Bug 1484990 - Use BulkWrite instead of write past length via BeginWriting() in XHR. r=baku
The old code assumes that it's OK to use nsAString::BeginWriting() to write
past the string's logical length if the string has enough capacity. This is
bogus, because the string doesn't know of data written past its logical
length.

The BulkWrite API has been created precisely for this purpose and allows
orderly capacity-aware low-level writes to the string.

MozReview-Commit-ID: BYQHl8Z9Fbd

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

--HG--
extra : moz-landing-system : lando
2018-08-30 14:24:58 +00:00
Narcis Beleuzu 1bb581bc8f Merge mozilla-central to inbound.
--HG--
extra : rebase_source : 063f3df7ad6d834fa3e72cd6825c31792716586b
2018-08-30 16:09:37 +03:00
Andrew Osmond 9322f6a4fb Bug 1486318 - Actually apply transform from canvas pattern when drawing text to a canvas. r=lsalzman 2018-08-30 09:09:06 -04:00
Narcis Beleuzu a4ec006bb0 Backed out changeset 4e195f7b2d6b (bug 1486824) for clipboard failures on OSX browser_editcontrols_update. a=backout 2018-08-30 15:59:59 +03:00
Narcis Beleuzu 78f15dbb01 Merge mozilla-central to autoland. a=merge 2018-08-30 16:08:00 +03:00
arthur.iakab 5c9e5bd8cc Merge mozilla-central to autoland 2018-08-30 07:37:51 +03:00
arthur.iakab 044707fc78 Merge inbound to mozilla-central a=merge 2018-08-30 07:37:00 +03:00
Imanol Fernandez 424bea6436 Bug 1487079 - Fix hasOrientation and hasPosition are switched on WebVR GamepadPose r=qdot,kip
Differential Revision: https://phabricator.services.mozilla.com/D4534

--HG--
extra : moz-landing-system : lando
2018-08-29 22:09:48 +00:00
Emilio Cobos Álvarez 20da0ddffb Bug 1487135 - Make the allocation of AuthorStyles for ShadowRoot lazy. r=xidorn,firefox-style-system-reviewers
So that we don't waste a bunch of memory with stuff like <svg:use>. I
plan to shrink AuthorStyles further, but this should help regardless, and isn't
very complex.

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

--HG--
extra : moz-landing-system : lando
2018-08-30 12:00:00 +00:00
Masayuki Nakano be86e183fd Bug 1486370 - Change nsAutoCopyListener to a static class r=smaug
nsAutoCopyListener is a singleton class but refcountable and a selection
listener.  nsFrameSelection adds it to only normal Selection when it's on
macOS or it's enabled by the pref.  Additionally, it's always first selection
listener since it's added immediately after Selection instance is created.

So, we can make it a static class, and normal Selection instance should have
a bool to decide whether it should notify nsAutoCopyListener of its changes.
Then, we can save the cost of grabbing it with local RefPtr and the virtual
call.

Additionally, this patch renames nsAutoCopyListener to mozilla::AutoCopyListener
and optimizes constructor of nsFrameSelection (using bool var cache to retrieve
the pref, avoid retrieving the pref on macOS).

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

--HG--
rename : layout/generic/nsAutoCopyListener.h => layout/generic/AutoCopyListener.h
extra : moz-landing-system : lando
2018-08-30 07:36:23 +00:00
Emilio Cobos Álvarez 872e125c91 Bug 1487198 - Measure memory usage of the identifier map in ShadowRoot as well. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D4615

--HG--
extra : moz-landing-system : lando
2018-08-29 22:49:04 +00:00
Emilio Cobos Álvarez 2537e52ca0 Bug 1486728 - Report memory usage of Shadow DOM style data. r=njn
This is on top of bug 1486623.

While at it removed the 'stale computed styles' report, since it was unused
since I removed the undisplayed maps.

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

--HG--
extra : moz-landing-system : lando
2018-08-29 22:24:29 +00:00
Emilio Cobos Álvarez 75bea4ec60 Bug 1486623 - Skip less nodes when reporting memory, and report ShadowRoot's StyleSheets. r=bzbarsky
This moves all the node-specific reporting to nsIDocument.

OrphanReporter delegates all the reporting to that and then returns the sum of
all sizes, which is not ideal but was pre-existing.

Also, I moved the main mStyleSheets size reporting to DocumentOrShadowRoot for
it to be shared between document and ShadowRoot.

I'll add memory reporting for the computed stylesheet maps and such in the
ShadowRoot in a followup.

I went through all the XBL bindings, though it seems I could just use
GetBindingWithContent(), since according to:

  https://searchfox.org/mozilla-central/rev/55da592d85c2baf8d8818010c41d9738c97013d2/dom/xbl/nsXBLBinding.cpp#615

We don't allow multiple bindings to contribute anon content. Anyway it was the
same amount of code...

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

--HG--
extra : moz-landing-system : lando
2018-08-29 22:19:42 +00:00
Gijs Kruitbosch a8e2b8e702 Bug 1486824 - change BrowserTestUtils to just call OpenBrowserWindow so it does the same thing as opening a window normally, r=mconley,nhnt11
Differential Revision: https://phabricator.services.mozilla.com/D4466

--HG--
extra : moz-landing-system : lando
2018-08-29 17:58:25 +00:00
Imanol Fernandez 01d16686d3 Bug 1487115 - Fix navigator.Gamepads returns empty VR array after a page load when using gfxVRExternal r=qdot,kip
Differential Revision: https://phabricator.services.mozilla.com/D4570

--HG--
extra : moz-landing-system : lando
2018-08-29 19:10:55 +00:00
Gabriele Svelto 6bddc0a55e Bug 1486772 - Refactor the screen-orientation types and headers r=smaug
This patch removes the 'ScreenOrientationInternal' type from
dom/base/ScreenOrientation.h and moves it into the
HalScreenConfiguration.h header, renaming it simply to 'ScreenOrientation'
in the process. This has several knock-off effects:

- It allows files that needed ScreenOrientationInternal to include a much
  smaller header than before

- It greatly reduces the number of headers pulled in when including Hal.h

- It clarifies the role of the type. The 'Internal' part in the name had
  nothing to do with it being part of the implementation. The type was public
  and called that way only to avoid clashing with the 'ScreenOrientation'
  class. Since we moved it into a different namespace it can be renamed
  safely.

- It allows a file that was manually re-declaring 'ScreenConfigurationInternal'
  type to use the original one

- Finally this fixes a few files which were missing headers they actually
  required but that would still build because unified compilation put them into
  units that already had those headers thanks to ScreenConfiguration.h

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

--HG--
extra : moz-landing-system : lando
2018-08-29 20:54:56 +00:00
Daniel Holbert ed94d8a8f4 Bug 1487168: Give ShouldShowFocusRingIfFocusedByMouse() an #ifndef guard to match its caller & to avoid -Wunused-function build warning. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D4583

--HG--
extra : moz-landing-system : lando
2018-08-29 18:01:12 +00:00
Cosmin Sabou 27822f2d77 Merge mozilla-central to autoland. a=merge 2018-08-29 21:04:28 +03:00
Cosmin Sabou 55bf096f3d Merge mozilla-inbound to mozilla-central. a=merge 2018-08-29 20:34:13 +03:00
shindli 3ec63f1901 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-08-30 14:22:59 +03: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
Alexander Surkov b27e40d606 Bug 1486674 - get rid of nsIDOMXULCheckboxElement, r=smaug 2018-08-30 08:17:11 +08:00
Henri Sivonen c33fde86d8 Bug 1485722 - Improve thread assertions in EventSourceImpl. r=smaug.
MozReview-Commit-ID: Aq7vVSronYg

Differential Revision: https://phabricator.services.mozilla.com/D4245
2018-08-30 12:25:26 +03:00
arthur.iakab c9d7c4fa05 Merge mozilla-central to mozilla-inbound 2018-08-30 01:16:38 +03:00
Rob Wu 88ec13510d Bug 1465388 - Resume about:blank parser upon unblocking the document r=hsivonen
When `document.blockParsing()` is called, the nsIParser is suspended
until the document is unblocked. For about:blank documents, this is a
nsParser.

When a document is unblocked, nsParser::ContinueInterruptedParsingAsync
is invoked, which delegates its implementation to nsIContentSink, which
is a nsHTMLContentSink for about:blank documents. Due to a missing
implementation of nsHTMLContentSink::ContinueInterruptedParsingAsync,
the parser was never resumed, causing bug 1465388 and bug 1407501.

This patch fixes the problem, by implementing the required method (and
using a load blocker to ensure that the (about:blank) document does not
finish before the parser finishes).

This patch is tested through extension tests: Currently document_start
stylesheets always activate the parser blocker, and document_start
scripts trigger the parser blocker when the script has not been
preloaded yet (e.g. at the first run).
Before this patch, the test failed due to the assertion failure as
reported in the linked bugs. After this patch, the tests pass.

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

--HG--
extra : moz-landing-system : lando
2018-08-29 11:52:49 +00:00
Margareta Eliza Balazs 2fe43133db Merge inbound to mozilla-central. a=merge 2018-08-29 12:43:37 +03:00
Margareta Eliza Balazs 7bc4b7b684 Merge autoland to mozilla-central. a=merge 2018-08-29 12:42:34 +03:00
Andreea Pavel 65e947cc68 Backed out changeset 126368a5c3ec (bug 1465388) for causing topcrash bug 1487004 a=backout 2018-08-29 11:39:19 +03:00
Ciure Andrei d716a04e20 Merge inbound to mozilla-central. a=merge 2018-08-29 00:58:21 +03:00
alwu 490f94cf41 Bug 1453862 - Log to web console when autoplay blocked. r=flod,baku
Log to the web console when we block autoplay, in order to help web developers debug their sites.

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

--HG--
extra : moz-landing-system : lando
2018-08-29 16:51:24 +00:00
alwu 5f20aea27a Bug 1485189 - part1 : dispatch related events when play is not allowed. r=cpearce
"blocked" event is used for testing.

"MozAutoplayMediaBlocked" event is used for changing the control UI on Fennec.

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

--HG--
extra : moz-landing-system : lando
2018-08-28 22:03:15 +00:00
Andreas Farre 82694e9ac3 Bug 1481238 - Create WebIDL interface for BrowsingContext. r=peterv
Expose Chrome only WebIDL to interface with BrowsingContext from
script. The API consists of parent, firstChild and nextSibling
attributes for BrowsingContext, and the browsingContext attribute for
Window.

--HG--
extra : rebase_source : 772d25e8b4e5526453545ddb2b1607845f3b65ea
2018-08-29 05:00:00 +03:00
Robert Helmer 10b80b68fe bug 1485946 - skip building libprio on MSVC r=froydnj
libprio does not currently build with MSVC (since it only supports
C90 as a compiler), this is being worked on upstream at https://github.com/mozilla/libprio/issues/17

As we are almost certainly not going to ship Firefox build with MSVC anymore,
let's disable this to get it working on this Tier-2 platform.

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

--HG--
extra : moz-landing-system : lando
2018-08-27 20:07:51 +00:00
Margareta Eliza Balazs 7e09716763 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-08-29 12:49:17 +03:00
Andrea Marchesini b42fd5e8a5 Bug 1486900 - IPCBlobInputStreamChild should be able to shutdown before receiving the remote stream, r=smaug 2018-08-29 11:10:57 +02:00
Emilio Cobos Álvarez a1f03332c2 Bug 1486488 - Don't assume that SVGAnimationElement has a parent on bind. r=dholbert
This is a regression from bug 1450250, which removed a if (!GetCx()) early
return in this function.

That early return was wrong, both because it prevented elements that were in
shadow trees from targeting other elements, but also because that check was not
present in AfterSetAttr, which means that dynamic updates to the attribute would
work.

Pass the SVGAnimationElement itself to resolve references. That's what we do for
attribute mutations, and also it's the same behavior we have, since the ID
lookup IDTracker does only depends on containing shadow root and containing
document, and that's invariant between a kid and it's DOM parent.

Some other code has been updated to take references instead of pointers so the
null-safety of those methods is explicit.

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

--HG--
extra : moz-landing-system : lando
2018-08-28 09:06:08 +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
Rob Wu 618a64cb28 Bug 1465388 - Resume about:blank parser upon unblocking the document r=hsivonen
When `document.blockParsing()` is called, the nsIParser is suspended
until the document is unblocked. For about:blank documents, this is a
nsParser.

When a document is unblocked, nsParser::ContinueInterruptedParsingAsync
is invoked, which delegates its implementation to nsIContentSink, which
is a nsHTMLContentSink for about:blank documents. Due to a missing
implementation of nsHTMLContentSink::ContinueInterruptedParsingAsync,
the parser was never resumed, causing bug 1465388 and bug 1407501.

This patch fixes the problem, by implementing the required method (and
using a load blocker to ensure that the (about:blank) document does not
finish before the parser finishes).

This patch is tested through extension tests: Currently document_start
stylesheets always activate the parser blocker, and document_start
scripts trigger the parser blocker when the script has not been
preloaded yet (e.g. at the first run).
Before this patch, the test failed due to the assertion failure as
reported in the linked bugs. After this patch, the tests pass.

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

--HG--
extra : moz-landing-system : lando
2018-08-28 05:28:21 +00:00
Margareta Eliza Balazs 350c943d93 Backed out changeset 9dc25841ff4f (bug 1486480) for causing Assertion failure: extendedSlots, at /builds/worker/workspace/build/src/dom/base/FragmentOrElement.cpp CLOSED TREE 2018-08-28 15:33:55 +03:00
Boris Zbarsky bd5c20d12e Bug 1486480. Add memory reporting for custom element data. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D4350

--HG--
extra : moz-landing-system : lando
2018-08-27 19:20:53 +00:00
Narcis Beleuzu eec002c6df Backed out changeset df602a252b66 (bug 1485946) for Linting failure. CLOSED TREE 2018-08-27 21:41:38 +03:00
Robert Helmer 70e2c73f5a bug 1485946 - skip building libprio on MSVC r=froydnj
libprio does not currently build with MSVC (since it only supports
C90 as a compiler), this is being worked on upstream at https://github.com/mozilla/libprio/issues/17

As we are almost certainly not going to ship Firefox build with MSVC anymore,
let's disable this to get it working on this Tier-2 platform.

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

--HG--
extra : moz-landing-system : lando
2018-08-27 15:39:46 +00:00
Cosmin Sabou 5d011e88d1 Merge mozilla-inbound to mozilla-central. a=merge 2018-08-27 18:51:27 +03:00
Jean-Yves Avenard 95343883e7 Bug 1486080 - Always allocate memory to pass extradata. r=padenot
Despite wording of the documentation to the contrary, we can't provide a static pointer to an immutable object.
Apparently, it's always been that way.

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

--HG--
extra : moz-landing-system : lando
2018-08-27 13:22:26 +00:00
Nathan Froyd ac6614c34b Bug 1486064 - don't cargo-cult AudioDeviceInfo.h in GraphDriver.cpp; r=padenot
When WebRTC is disabled, we get complaints about undefined AudioDeviceInfo.
2018-08-27 09:11:41 -04:00
Kris Maglione 670d3e0fff Bug 1486130: Follow-up: Ignore extra console message on OS-X. r=bustage,test-only 2018-08-28 11:21:57 -07:00
Kris Maglione 8c0ed09430 Bug 1486512: Fix compiling Promise-inl.h on MSVC. r=froydnj
For reasions which are unclear, MSVC does not recognize the declaration and
definition of ThenWithCycleCollectedArts as matching in their previous form.
Changing both to use the same template `using` declaration for the entire
return type fixes this.

MSVC also has problems with the previous use of std::forward, which is fixed
by explicitly coercing smart pointers to their equivalent pointer types, and
moving any other type.

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

--HG--
extra : rebase_source : 483fc7c33a0b10227b11862d176299813466ac95
2018-08-27 13:10:23 -07:00
Jean-Yves Avenard df2e2243b9 Bug 1485536 - Don't account frames dropped by the compositor as presented. r=bryce
We rename a method in FrameStatistics to better match what it's actually doing.

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

--HG--
extra : moz-landing-system : lando
2018-08-27 10:27:19 +00:00