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

Unified Diff: third_party/WebKit/Source/core/editing/VisibleSelection.cpp

Issue 2747333002: Make makeSearchRange() in VisibleSelection to handle BeforeAnchor and AfterAnchor position type (Closed)
Patch Set: 2017-03-15T12:54:02 Created 3 years, 9 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
Index: third_party/WebKit/Source/core/editing/VisibleSelection.cpp
diff --git a/third_party/WebKit/Source/core/editing/VisibleSelection.cpp b/third_party/WebKit/Source/core/editing/VisibleSelection.cpp
index 0fe46f85336be16229ab5af3fc49cd081a99a77f..16e1ebd73ce8071fbeea9747e67769126d56093e 100644
--- a/third_party/WebKit/Source/core/editing/VisibleSelection.cpp
+++ b/third_party/WebKit/Source/core/editing/VisibleSelection.cpp
@@ -182,7 +182,7 @@ VisibleSelectionTemplate<Strategy>::toNormalizedEphemeralRange() const {
template <typename Strategy>
static EphemeralRangeTemplate<Strategy> makeSearchRange(
const PositionTemplate<Strategy>& pos) {
- Node* node = pos.anchorNode();
+ Node* node = pos.computeContainerNode();
if (!node)
return EphemeralRangeTemplate<Strategy>();
Document& document = node->document();

Powered by Google App Engine
This is Rietveld 408576698