gecko-dev/dom
Emilio Cobos Álvarez 2dd6a71b3e Bug 1531333 - Fix <svg:use> cycle detection. r=longsonr
With the current code we'll eventually detect the cycle, but will take much
more, creating many shadow trees unnecessarily. Take for example the following:

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="133" height="232774">
    <style>
      symbol { display: block }
    </style>
    <symbol id="svg-sprite" viewBox="0 0 133 230866">
        <title>svg-sprite</title>
        <symbol id="svg-sprite" viewBox="0 0 133 230866">
            <title>svg-sprite</title>
            <use xlink:href="#svg-sprite" width="500" height="500" />
        </symbol>
        <use xlink:href="#svg-sprite" y="1601" width="133" height="228958" />
    </symbol>
    <use xlink:href="#svg-sprite" y="1601" width="133" height="230866" />
</svg>

Before this patch, we'd create an svg use element subtree for #svg-sprite. That
subtree will contain two other <use> elements, one under the <symbol>, one not
under it.

Both point to #svg-sprite, but we fail to detect we're an ancestor since the
element #svg-sprite we're looking at is the clone of the #svg-sprite element.

Thus we need to take a look at mOriginal instead (which is the <use> element
under #svg-sprite) rather than at the clone.

Yeah, I had to draw the trees, it's messy :)

Blink and WebKit do something slightly different (they check the element id
directly[1]). That's not 100% correct, since you can have multiple elements with
the same ID.

[1]: https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/svg/svg_use_element.cc?l=560&rcl=861855dcb8c39ba8d42497247d433277858df79b

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

--HG--
extra : moz-landing-system : lando
2019-03-22 22:26:53 +00:00
..
abort Bug 1535784 - disable all instances of test_event_listener_leaks.html r=jmaher 2019-03-18 18:15:46 +00:00
animation Bug 1536586 - Simplify a bit our generated bindings by getting rid of FooBorrowed and FooBorrowedMut. r=heycam 2019-03-21 17:00:27 +00:00
asmjscache Bug 1423917 - P9 - Remove asmjs client in the 2_1to2_2 upgrade for QuotaManager; r=luke 2019-03-13 15:59:34 +00:00
audiochannel Bug 1535353 - update Core :: DOM: * bugzilla product and component meta data in moz.build files after reorganization in bug 1533440 r=hsinyi 2019-03-17 23:13:22 +00:00
base Backed out 2 changesets (bug 1500314) for android mochitest failures on gfx/layers/apz/test/mochitest/test_bug982141.html. CLOSED TREE 2019-03-23 01:18:49 +02:00
battery
bindings Bug 1535124 part 2. Mark Web IDL callbacks MOZ_CAN_RUN_SCRIPT by default. r=qdot 2019-03-19 12:59:54 +00:00
broadcastchannel Bug 1535784 - disable all instances of test_event_listener_leaks.html r=jmaher 2019-03-18 18:15:46 +00:00
browser-element Bug 1508823 - Enable ESLint for dom/browser-element (manual changes). r=mccr8 2019-03-19 20:56:24 +00:00
cache Bug 1533458 - replace OrVoid cache IPDL types with native maybe syntax; r=ttung 2019-03-21 11:09:44 +00:00
canvas Bug 1535384 part 1. Eliminate some easy cases of MOZ_CAN_RUN_SCRIPT_BOUNDARY on webidl callbacks. r=mccr8 2019-03-19 05:24:39 +00:00
chrome-webidl Bug 1524065 - part1 : implement the way to resume delayed autoplay media via browsing context. r=farre 2019-03-20 03:15:36 +00:00
clients Bug 1533066 - replace OptionalIPCClientInfo with IPCClientInfo? in IPDL; r=valentin 2019-03-06 17:57:04 +00:00
commandhandler Bug 1534370 part 1. Annotate doCommandWithParams as MOZ_CAN_RUN_SCRIPT. r=masayuki 2019-03-13 00:43:48 +00:00
console Bug 1535384 part 3. Eliminate MOZ_CAN_RUN_SCRIPT_BOUNDARY on console callbacks. r=baku 2019-03-19 04:33:32 +00:00
credentialmanagement
crypto Bug 1523969 part 6 - Move method definition inline comments to new line in 'dom/'. r=nika 2019-02-25 16:05:29 -06:00
encoding
events Bug 1536730 - Avoid using keyboard focus for routing mouse events meant for a sidebar. r=nika 2019-03-21 15:59:02 +00:00
fetch Bug 1535353 - update Core :: DOM: * bugzilla product and component meta data in moz.build files after reorganization in bug 1533440 r=hsinyi 2019-03-17 23:13:22 +00:00
file Bug 1532253 - Hold lock in mozilla::dom::IsType() r=baku 2019-03-19 15:14:04 +00:00
filehandle Bug 1535353 - update Core :: DOM: * bugzilla product and component meta data in moz.build files after reorganization in bug 1533440 r=hsinyi 2019-03-17 23:13:22 +00:00
filesystem Bug 1536336. Change MOZ_CAN_RUN_SCRIPT analysis to allow const members of "this" in addition to stack refptrs. r=andi 2019-03-21 11:47:22 +00:00
flex
gamepad Bug 1532411 - Pass a document pointer to nsContentUtils::ShouldResistFingerprinting() callers in the gamepad API; r=baku 2019-03-05 12:42:51 +00:00
geolocation Bug 1536719. Fix handling of member method calls in the MOZ_CAN_RUN_SCRIPT analysis. r=andi 2019-03-21 11:48:33 +00:00
grid
html Bug 1446722: set default value for 'mFocusedValue' for the html input elements 'date' and 'time'. r=smaug 2019-03-22 10:52:06 +00:00
imptests Bug 1535353 - update Core :: DOM: * bugzilla product and component meta data in moz.build files after reorganization in bug 1533440 r=hsinyi 2019-03-17 23:13:22 +00:00
indexedDB Bug 1513911 - Part 3 - replace PIndexedDBPermissionRequest with async returns in IPC; r=asuth 2019-03-22 19:14:01 +00:00
interfaces Bug 1535124 part 3. Add MOZ_CAN_RUN_SCRIPT annotations to geolocation code as needed. r=jdm 2019-03-20 18:05:09 +00:00
ipc Bug 1513911 - Part 3 - replace PIndexedDBPermissionRequest with async returns in IPC; r=asuth 2019-03-22 19:14:01 +00:00
jsurl Bug 1532253 - Add NS_NewURIOnAnyThread r=baku 2019-03-19 15:11:31 +00:00
locales Merge mozilla-central to autoland. a=merge CLOSED TREE 2019-03-22 00:58:41 +02:00
localstorage Bug 1535221 - Add more robust logging including more detailed logging for CheckClosingDatastore and DirectoryOpenPending state; r=asuth 2019-03-21 21:08:00 +01:00
manifest Bug 1522451 - Resolve named CSS colors to RGB in Web Manifests r=marcosc 2019-03-20 14:44:29 +00:00
mathml Bug 1523969 part 6 - Move method definition inline comments to new line in 'dom/'. r=nika 2019-02-25 16:05:29 -06:00
media Bug 1537567 - disable tests in mochitest-media that are failing (intermittent or permafail) on windows10-aarch64 r=jmaher 2019-03-22 09:04:26 +00:00
messagechannel Bug 1535784 - disable all instances of test_event_listener_leaks.html r=jmaher 2019-03-18 18:15:46 +00:00
midi Bug 1527505 - Part 9: Make nsIPermissionManager accept ACString arguments for permission types instead of raw C strings; r=nika 2019-02-21 22:54:28 +00:00
network Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-03-13 10:19:06 +01:00
notification Backed out changeset 8b50a00d1d22 (bug 1515094) for failures in browser_all_files_referenced.js CLOSED TREE 2019-03-22 00:07:02 +02:00
offline
payments Bug 1525959 - Skip some mochitests tests under GeckoView r=geckoview-reviewers,esawin 2019-02-27 15:01:43 +00:00
performance Bug 1535384 part 1. Eliminate some easy cases of MOZ_CAN_RUN_SCRIPT_BOUNDARY on webidl callbacks. r=mccr8 2019-03-19 05:24:39 +00:00
permission Bug 1535353 - update Core :: DOM: * bugzilla product and component meta data in moz.build files after reorganization in bug 1533440 r=hsinyi 2019-03-17 23:13:22 +00:00
plugins Bug 1536163 - Part 3 - use native Maybe syntax in place of OptionalShmem in IPDL; r=nika 2019-03-21 06:52:48 +02:00
power Bug 1535353 - update Core :: DOM: * bugzilla product and component meta data in moz.build files after reorganization in bug 1533440 r=hsinyi 2019-03-17 23:13:22 +00:00
presentation Bug 1535353 - update Core :: DOM: * bugzilla product and component meta data in moz.build files after reorganization in bug 1533440 r=hsinyi 2019-03-17 23:13:22 +00:00
prio Bug 1530481 - Refactor PrioEncoder to be usable from C++. r=rhelmer 2019-03-22 12:51:22 +00:00
promise Bug 1535384 part 7. Get rid of MOZ_CAN_RUN_SCRIPT_BOUNDARY for filesystem callbacks. r=mccr8 2019-03-19 15:53:43 +00:00
prototype Bug 1527977 - Share XUL prototype cache with XUL and XHTML. r=smaug 2019-03-09 01:00:23 +00:00
push Bug 1524619 - Part 4 - Set user interaction flag in push notification permission requests. r=lina 2019-03-19 00:11:36 +01:00
quota Merge mozilla-inbound to mozilla-central. a=merge 2019-03-22 18:44:45 +02:00
reporting Bug 1535384 part 4. Eliminate MOZ_CAN_RUN_SCRIPT_BOUNDARY for the reporting observer callback. r=baku 2019-03-19 04:33:54 +00:00
res
script Bug 1535353 - update Core :: DOM: * bugzilla product and component meta data in moz.build files after reorganization in bug 1533440 r=hsinyi 2019-03-17 23:13:22 +00:00
security Bug 1534971: Add helper function within CSP to check if two CSPs are equal. r=jkt 2019-03-15 12:20:52 +00:00
serviceworkers Bug 1531293 - Enable javascript.options.bigint on Nightly r=jandem,kmag 2019-03-22 08:57:44 +00:00
simpledb Bug 1532005 - Implement a new js/public/ArrayBuffer.h header to centralize functionality for creating and interacting with ArrayBuffers. r=sfink 2019-03-04 15:19:16 -08:00
smil Bug 1535388: Don't fire PageShow from nsDocumentViewer::LoadComplete, if onload caused a new viewer to replace us. r=bzbarsky 2019-03-22 06:16:14 +00:00
storage Bug 1525245 - Stabilize cookiePolicy/cookiePermission for live documents - part 3 - LocalStorage and SessionStorage, r=asuth 2019-03-08 09:00:46 +00:00
svg Bug 1531333 - Fix <svg:use> cycle detection. r=longsonr 2019-03-22 22:26:53 +00:00
system Bug 1535124 part 3. Add MOZ_CAN_RUN_SCRIPT annotations to geolocation code as needed. r=jdm 2019-03-20 18:05:09 +00:00
tests Bug 1531293 - Enable javascript.options.bigint on Nightly r=jandem,kmag 2019-03-22 08:57:44 +00:00
u2f Bug 1536719. Fix handling of member method calls in the MOZ_CAN_RUN_SCRIPT analysis. r=andi 2019-03-21 11:48:33 +00:00
url Bug 1535353 - update Core :: DOM: * bugzilla product and component meta data in moz.build files after reorganization in bug 1533440 r=hsinyi 2019-03-17 23:13:22 +00:00
vr Bug 1537899 - Add neck model capability for VRPose position. r=kip 2019-03-21 19:38:18 +00:00
webauthn Bug 1536097 - Part 5 - convert AttestationConveyancePreference to use ParamTraits for deserialization; r=jcj 2019-03-19 23:25:35 +00:00
webbrowserpersist Bug 1535353 - update Core :: DOM: * bugzilla product and component meta data in moz.build files after reorganization in bug 1533440 r=hsinyi 2019-03-17 23:13:22 +00:00
webgpu Bug 1523969 part 6 - Move method definition inline comments to new line in 'dom/'. r=nika 2019-02-25 16:05:29 -06:00
webidl Bug 1535124 part 3. Add MOZ_CAN_RUN_SCRIPT annotations to geolocation code as needed. r=jdm 2019-03-20 18:05:09 +00:00
websocket Bug 1535784 - disable all instances of test_event_listener_leaks.html r=jmaher 2019-03-18 18:15:46 +00:00
workers Bug 1531293 - Enable javascript.options.bigint on Nightly r=jandem,kmag 2019-03-22 08:57:44 +00:00
worklet Bug 1535384 part 5. Eliminate MOZ_CAN_RUN_SCRIPT_BOUNDARY for mutation callbacks. r=mccr8 2019-03-19 15:14:11 +00:00
xbl Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-03-13 10:19:06 +01:00
xhr Bug 980902 - log a warning recommending the use of sendBeacon during unload instead of synchronous XMLHttpRequest; r=Ehsan 2019-03-21 18:40:03 +00:00
xml Bug 1525245 - Stabilize cookiePolicy/cookiePermission for live documents - part 12 - nsICookieSettings for the channel creation, r=ckerschb,asuth,Ehsan 2019-03-08 09:04:11 +00:00
xslt Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-03-13 10:19:06 +01:00
xul Bug 1322645. Fix intermittent test timeout by making sure our prefs are set before we start doing parts of the test. r=jmaher 2019-03-21 13:56:05 +00:00
jar.mn
moz.build Bug 1535353 - update Core :: DOM: * bugzilla product and component meta data in moz.build files after reorganization in bug 1533440 r=hsinyi 2019-03-17 23:13:22 +00:00