Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(647)

Unified Diff: Source/core/testing/Internals.cpp

Issue 374133002: Remove remaining callers of deprecatedShadowAncestorNode (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/page/FocusController.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/testing/Internals.cpp
diff --git a/Source/core/testing/Internals.cpp b/Source/core/testing/Internals.cpp
index a9a177bf06a15e21e88355c1056a5739c267f57c..107e3bb01e5a5802f8bd006706e35089a1d3a6af 100644
--- a/Source/core/testing/Internals.cpp
+++ b/Source/core/testing/Internals.cpp
@@ -1498,8 +1498,12 @@ PassRefPtrWillBeRawPtr<StaticNodeList> Internals::nodesFromRect(Document* docume
if (!topPadding && !rightPadding && !bottomPadding && !leftPadding) {
HitTestResult result(point);
renderView->hitTest(request, result);
- if (result.innerNode())
- matches.append(result.innerNode()->deprecatedShadowAncestorNode());
+
+ if (Node* innerNode = result.innerNode()) {
+ if (innerNode->isInShadowTree())
+ innerNode = innerNode->shadowHost();
+ matches.append(innerNode);
+ }
} else {
HitTestResult result(point, topPadding, rightPadding, bottomPadding, leftPadding);
renderView->hitTest(request, result);
« no previous file with comments | « Source/core/page/FocusController.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698