Bug 1480224: It's not needed to explicitly exclude <use> trees from XBL scopes anymore. r=smaug
authorEmilio Cobos Álvarez <emilio@crisal.io>
Wed, 15 Aug 2018 14:25:09 +0200
changeset 431695 22c19ba1a3955746f361f8d9d9431e180616a1e4
parent 431694 4d191bd81bbea9db56246856e9b09b11e2a6b4be
child 431696 002de34fa751b8333784f0681615b809f42f31ef
push id34451
push userebalazs@mozilla.com
push dateThu, 16 Aug 2018 09:25:15 +0000
treeherdermozilla-central@161817e6d127 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1480224
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1480224: It's not needed to explicitly exclude <use> trees from XBL scopes anymore. r=smaug Now that the content is not anonymous we don't need to exclude them explicitly. This happens because anonymous content inside the shadow tree does report to be inside the shadow tree, which is true but at the same time slightly footgunny. In any case the other uses of the use shadow tree stuff are base-uri related, and changing anon content's base uri in that case sounds like the right thing, even though anon content shouldn't rely on those anyway. Differential Revision: https://phabricator.services.mozilla.com/D3409
dom/base/nsIDocument.h
layout/svg/crashtests/1480224.html
layout/svg/crashtests/crashtests.list
--- a/dom/base/nsIDocument.h
+++ b/dom/base/nsIDocument.h
@@ -4655,18 +4655,17 @@ nsINode::OwnerDocAsNode() const
 // (because this header does not include nsIContent) and we can't put it in
 // nsIContent.h, because the definition of nsIContent::IsInAnonymousSubtree is
 // in nsIContentInlines.h.  And then we get include hell from people trying to
 // call nsINode::GetParentObject but not including nsIContentInlines.h and with
 // no really good way to include it.
 template<typename T>
 inline bool ShouldUseXBLScope(const T* aNode)
 {
-  // TODO(emilio): Is the <svg:use> shadow tree check needed now?
-  return aNode->IsInAnonymousSubtree() && !aNode->IsInSVGUseShadowTree();
+  return aNode->IsInAnonymousSubtree();
 }
 
 inline mozilla::dom::ParentObject
 nsINode::GetParentObject() const
 {
   mozilla::dom::ParentObject p(OwnerDoc());
     // Note that mUseXBLScope is a no-op for chrome, and other places where we
     // don't use XBL scopes.
new file mode 100644
--- /dev/null
+++ b/layout/svg/crashtests/1480224.html
@@ -0,0 +1,6 @@
+<svg>
+<symbol id="a">
+<foreignObject>
+<input type="file">
+</symbol>
+<use xlink:href="#a">
--- a/layout/svg/crashtests/crashtests.list
+++ b/layout/svg/crashtests/crashtests.list
@@ -208,8 +208,9 @@ load 1421807-1.html
 pref(dom.webcomponents.shadowdom.enabled,true) load 1421807-2.html
 load 1422226.html
 load 1443092.html
 load 1467552-1.html
 load conditional-outer-svg-nondirty-reflow-assert.xhtml
 load extref-test-1.xhtml
 load blob-merging-and-retained-display-list.html
 load grouping-empty-bounds.html
+load 1480224.html