gecko-dev/dom
Emilio Cobos Álvarez c2bb091273 Bug 1579181 - Don't keep <use> shadow trees which we know we'll never render. r=longsonr
This partially addresses the regression, but not fully. With this patch we don't
maintain shadow trees for nodes that we know won't get rendered.

This works fast in WebKit / Blink because of a bug in their implementation which
doesn't synchronize style attributes, introduced in [1].

You can see this clearly if you click on the bug's test-case and inspect the
<use> shadow trees (there's no style="stroke:orange" whatsoever).

They can kinda get away with it because they don't properly implement SVG 2. In
particular, in Blink / WebKit, the style of the element in the <use> shadow tree
is the style of the referenced element, which means that even if the style
attribute isn't properly synced it's ~ok since it doesn't end up mattering for
styling.

Easiest test-case for the behavior difference is:

```
<!doctype html>
<style>
  rect:hover {
    fill: green;
  }
</style>
<svg width=300 height=300>
  <g id="canvas">
    <rect fill=red width=100 height=100></rect>
  </g>
  <g>
    <use x=200 href="#canvas"></use>
  </g>
</svg>
```

Where Firefox will properly update each square independently when hovered, but
Blink / WebKit won't.

This used to work faster because in this particular test-case we have 3 hidden
<use> elements whose href is the #canvas, which is basically everything.

Before moving to shadow trees we'd do it using anonymous content, and since we
never got a frame we'd never clone the subtree in the first case.

This case was faster before bug 1450250, but this approach makes other cases
slow that were fixed by that bug, like bug 1485402.

So I'll try to optimize shadow tree syncing instead, I guess, but there's no
good reason not to land this in the meantime IMHO.

[1]: f4b022e64b%5E%21/third_party/WebKit/WebCore/svg/SVGElement.cpp

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

--HG--
extra : moz-landing-system : lando
2019-09-15 16:09:28 +00:00
..
abort Backed out 22 changesets (bug 1231213) for Browser-chrome failures on /workers/remoteworkers/RemoteWorkerChild.cpp 2019-08-15 01:04:46 +03:00
animation Bug 1541705 - Factor out functionalities for obsversing animation style counts into testcommon.js. r=boris 2019-09-12 08:08:20 +00:00
audiochannel Bug 1579588 - part2 : create media controller for media element only. r=chunmin 2019-09-12 23:13:04 +00:00
base Bug 1573281 - Disable 1419902.html on asan builds, r=smaug. 2019-09-13 21:21:57 +00:00
battery
bindings Bug 1578173 part 8. Remove support for [Constructor] from the Web IDL parser. r=edgar 2019-09-12 18:45:33 +00:00
broadcastchannel
browser-element Bug 1574915 - Fix useless try-catch issues in dom/. r=hsivonen 2019-08-19 17:02:54 +00:00
cache Bug 1581127 - Add IsShuttingDown checks to DOM Cache origin initialization; r=asuth 2019-09-13 16:43:30 +00:00
canvas Bug 1561046 - remove android_version == '19' from test manifests r=gbrown 2019-09-13 14:12:27 +00:00
chrome-webidl Bug 1580907 - Remove transferables attribute for SendAsyncMessage and SendQuery in JSWindowActor; r=nika 2019-09-13 16:51:23 +00:00
clients Bug 1556489 - P23 - Only create new ClientSource objects in the content, but use the recreated info from redirects in the parent. r=asuth 2019-09-03 10:19:53 +10:00
commandhandler Bug 1574627 - Fix some "disbaled" typos. DONTBUILD r=njn 2019-08-16 23:23:05 +00:00
console Bug 1578623 move principal-related data from LoadInfo to WorkletImpl r=baku 2019-09-09 00:42:05 +00:00
credentialmanagement
crypto
debugger
docs Bug 1580907 - Remove transferables attribute for SendAsyncMessage and SendQuery in JSWindowActor; r=nika 2019-09-13 16:51:23 +00:00
encoding Bug 1578173 part 6. Remove remaining uses of [Constructor] from bindings. r=edgar 2019-09-12 11:01:17 +00:00
events Bug 1578173 part 6. Remove remaining uses of [Constructor] from bindings. r=edgar 2019-09-12 11:01:17 +00:00
fetch Bug 1580082. Align Response constructor IDL with spec. r=baku 2019-09-11 11:06:58 +00:00
file Bug 1578173 part 6. Remove remaining uses of [Constructor] from bindings. r=edgar 2019-09-12 11:01:17 +00:00
filehandle
filesystem
flex Bug 1563163 Part 1: Make Flex::Flex gracefully handle frames without FlexContainerInfo structures. r=mats 2019-08-30 23:16:09 +00:00
gamepad Bug 1579492 - Check if nullptr in DarwinGamepadService::ReportChangedCallback(). r=baku 2019-09-09 11:58:01 +00:00
geolocation Backed out changeset 493061169650 (bug 1529591) for build bustages on nsGeolocation.cpp. CLOSED TREE 2019-09-09 17:35:39 +03:00
grid Bug 1308587 Part 1 - Manually remove "-moz" prefixed multi-column properties in some tests. r=dholbert 2019-09-05 21:32:05 +00:00
html Bug 1578973 - Don't do autofocus process if the target node of 'autofocus' is in a cross-origin document. r=nika 2019-09-13 01:44:59 +00:00
imptests Bug 1556637 - Replace all mozDumpDebugInfo calls r=jya,jib 2019-08-14 20:32:31 +00:00
indexedDB Bug 1580195 - Exclude calls of open(name, {}) and open(name) from telemetry. r=ttung,asuth 2019-09-13 16:55:13 +00:00
interfaces Bug 1529068 - Implementation of the navigate-to CSP directive as defined in CSP Level 3. r=ckerschb,mccr8 2019-09-10 22:33:51 +00:00
ipc Bug 1580848 - Clean up some review feedback on the browser_crash_oopiframe.js test. r=kmag 2019-09-13 09:16:19 +00:00
jsurl
l10n Bug 1580991 - Trigger DOMLocalization::OnChange from Localization::Observe. r=smaug 2019-09-13 10:08:26 +00:00
locales Bug 1529068 - Implementation of the navigate-to CSP directive as defined in CSP Level 3. r=ckerschb,mccr8 2019-09-10 22:33:51 +00:00
localstorage Bug 1576260 - Make LSValue initialization fallible; r=asuth 2019-09-14 05:33:01 +00:00
manifest Bug 1575140 - Manifest ImageResource sizes should be an array r=baku 2019-08-21 10:29:16 +00:00
mathml Bug 1579602 - Rename nsMathMLElement to dom::MathMLElement. r=bzbarsky 2019-09-13 16:27:54 +00:00
media Bug 1580600 - rename setRates() to setBitrate() and pass the value in bps. r=jya 2019-09-13 23:38:32 +00:00
messagechannel Bug 1577746 - Enable ESLint rule object-shorthand for dom/. r=baku 2019-09-02 11:22:27 +00:00
midi
network Bug 1577746 - Enable ESLint rule object-shorthand for dom/. r=baku 2019-09-02 11:22:27 +00:00
notification Bug 1578173 part 4. Switch event subclasses to constructor operations. r=smaug 2019-09-11 14:35:28 +00:00
offline
payments Bug 1578173 part 4. Switch event subclasses to constructor operations. r=smaug 2019-09-11 14:35:28 +00:00
performance Bug 1571904 - disabled test on all platforms r=bc 2019-09-08 15:00:52 +00:00
permission
plugins Bug 1580282 - Remove checks for plugins that are part of extensions and support for loading plugins from the app and profile dir, r=mconley,mixedpuppy 2019-09-12 23:15:49 +00:00
power
presentation Bug 1571466 - Cleanup unnecessary ESLint global definitions. r=mossop 2019-08-19 07:11:56 +00:00
prio
promise Bug 1580220: Fix unhandled rejection logging for cross-origin objects. r=smaug 2019-09-11 14:10:06 +00:00
prototype Bug 1575620 - Fix refreshing session restore when using prototype cache. r=smaug 2019-09-06 20:27:09 +00:00
push Backed out changeset a956d11fef6e (bug 1369436) for XPCshell failure on dom/push/test/xpcshell/test_notification_http2.js 2019-09-13 00:42:28 +03:00
quota Bug 1581127 - Add IsShuttingDown checks to DOM Cache origin initialization; r=asuth 2019-09-13 16:43:30 +00:00
reporting Bug 1578173 part 6. Remove remaining uses of [Constructor] from bindings. r=edgar 2019-09-12 11:01:17 +00:00
res
script Bug 1568171. Fix handling of load events if document.open() is called while async scripts are still loading for the original pageload. r=smaug 2019-09-10 20:43:56 +00:00
security Bug 1561964 - Re-enable all tests in dom/security/test on Android. r=ckerschb 2019-09-13 03:31:57 +00:00
serviceworkers Backed out changeset c47f550abd3e (bug 1578337) for failing bc at browser_bug629172.js on a CLOSED TREE 2019-09-13 14:59:14 +03:00
simpledb Bug 1563023 - Part 3: Change client usage type to support the null value; r=asuth 2019-08-22 20:52:09 +00:00
smil Bug 1574222 - Serialize getComputedStyle on text-decoration properly. r=emilio,dholbert 2019-09-10 21:52:26 +00:00
storage Bug 1570644 - Part 1: Fix a regression caused by bug 1556812; r=asuth 2019-08-19 10:24:39 +02:00
svg Bug 1579181 - Don't keep <use> shadow trees which we know we'll never render. r=longsonr 2019-09-15 16:09:28 +00:00
system Bug 1576465. Fix nsDeviceSensors's cross-origin check for Fission. r=kmag 2019-09-10 10:33:13 +00:00
tests Bug 1580506, fix incorrect pointerlock message names, r=Gijs 2019-09-12 12:08:41 +00:00
u2f Bug 1577746 - Enable ESLint rule object-shorthand for dom/. r=baku 2019-09-02 11:22:27 +00:00
url
vr Bug 1578173 part 6. Remove remaining uses of [Constructor] from bindings. r=edgar 2019-09-12 11:01:17 +00:00
webauthn Bug 1577746 - Enable ESLint rule dot-notation for dom/. r=baku 2019-09-02 11:23:05 +00:00
webbrowserpersist Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-08-13 07:15:25 +00:00
webgpu
webidl Bug 1580082. Align Response constructor IDL with spec. r=baku 2019-09-11 11:06:58 +00:00
websocket Bug 1579820 - Handle window.open() from remote subframes. r=nika 2019-09-10 09:04:17 +00:00
workers Bug 1578173 part 4. Switch event subclasses to constructor operations. r=smaug 2019-09-11 14:35:28 +00:00
worklet Bug 1578623 use an opaque origin for WorkletGlobalScope r=baku 2019-09-09 00:42:01 +00:00
xbl Bug 1550058: Move most keyboard shortcut handling out of XBL. r=masayuki 2019-09-06 17:10:40 +00:00
xhr Bug 1548373: Report Open stacks for XHR responses. r=mayhemer,julienw 2019-09-11 15:33:00 +00:00
xml Bug 1575620 - Fix refreshing session restore when using prototype cache. r=smaug 2019-09-06 20:27:09 +00:00
xslt Bug 1578173 part 6. Remove remaining uses of [Constructor] from bindings. r=edgar 2019-09-12 11:01:17 +00:00
xul Bug 1550058: Move most keyboard shortcut handling out of XBL. r=masayuki 2019-09-06 17:10:40 +00:00
jar.mn
moz.build Bug 1575420 - Replace MOZ_WIDGET_TOOLKIT value of "gtk3" with "gtk". r=froydnj 2019-08-21 12:25:42 +00:00