Bug 1596768 - Remove GetBindingParent usage in layout. r=smaug
authorEmilio Cobos Álvarez <emilio@crisal.io>
Fri, 15 Nov 2019 16:18:06 +0000
changeset 502216 85ae973aca6e5d2d924a2448b2687a58f6574308
parent 502215 d7d66b80b6e5ca09a275ed0dc91e1d83fbd642ab
child 502217 0b2de590fde9951b3438f0c3681fe9907acc0f80
push id114172
push userdluca@mozilla.com
push dateTue, 19 Nov 2019 11:31:10 +0000
treeherdermozilla-inbound@b5c5ba07d3db [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1596768
milestone72.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 1596768 - Remove GetBindingParent usage in layout. r=smaug We only use it to escape out of NAC trees for ::selection pseudo-element. Differential Revision: https://phabricator.services.mozilla.com/D53216
layout/generic/nsFrame.cpp
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -2352,17 +2352,17 @@ bool nsDisplaySelectionOverlay::CreateWe
   aBuilder.PushRect(bounds, bounds, !BackfaceIsHidden(),
                     wr::ToColorF(ComputeColor()));
   return true;
 }
 
 static Element* FindElementAncestorForMozSelection(nsIContent* aContent) {
   NS_ENSURE_TRUE(aContent, nullptr);
   while (aContent && aContent->IsInNativeAnonymousSubtree()) {
-    aContent = aContent->GetBindingParent();
+    aContent = aContent->GetClosestNativeAnonymousSubtreeRootParent();
   }
   NS_ASSERTION(aContent, "aContent isn't in non-anonymous tree?");
   while (aContent && !aContent->IsElement()) {
     aContent = aContent->GetParent();
   }
   return aContent ? aContent->AsElement() : nullptr;
 }