From 06bb7fabca6e344eaddd47de1e398f90c1a526b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Fri, 15 Nov 2019 16:18:06 +0000 Subject: [PATCH] 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 --HG-- extra : moz-landing-system : lando --- layout/generic/nsFrame.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layout/generic/nsFrame.cpp b/layout/generic/nsFrame.cpp index 2a4f140d5957..4e21b14ffe25 100644 --- a/layout/generic/nsFrame.cpp +++ b/layout/generic/nsFrame.cpp @@ -2357,7 +2357,7 @@ bool nsDisplaySelectionOverlay::CreateWebRenderCommands( 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()) {