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

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

Issue 307353002: Use Position instead of VisiblePosition for SurroundingText. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: review comments Created 6 years, 6 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/editing/SurroundingTextTest.cpp ('k') | Source/web/WebSurroundingText.cpp » ('j') | 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 eb48a0c2f7d3ad6bb64d350b5536b3d8d0067ee8..62848d52a30f726370512b3a89922bd0d87cb1ce 100644
--- a/Source/core/testing/Internals.cpp
+++ b/Source/core/testing/Internals.cpp
@@ -2339,7 +2339,7 @@ String Internals::textSurroundingNode(Node* node, int x, int y, unsigned long ma
if (!node)
return String();
blink::WebPoint point(x, y);
- SurroundingText surroundingText(VisiblePosition(node->renderer()->positionForPoint(static_cast<IntPoint>(point))), maxLength);
+ SurroundingText surroundingText(VisiblePosition(node->renderer()->positionForPoint(static_cast<IntPoint>(point))).deepEquivalent().parentAnchoredEquivalent(), maxLength);
return surroundingText.content();
}
« no previous file with comments | « Source/core/editing/SurroundingTextTest.cpp ('k') | Source/web/WebSurroundingText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698