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

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

Issue 2950053002: Make Position::BeforeNode() to take const Node& instead of Node* (Closed)
Patch Set: 2017-06-21T17:56:36 Created 3 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
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 9dea0f96b5a20ccc48e85353118f38ce4590739b..602e54159587ec98020248ec1a12eaa86e594cbe 100644
--- a/third_party/WebKit/Source/core/editing/VisibleSelection.cpp
+++ b/third_party/WebKit/Source/core/editing/VisibleSelection.cpp
@@ -630,7 +630,7 @@ void VisibleSelectionTemplate<
Element* shadow_ancestor =
start_root ? start_root->OwnerShadowHost() : nullptr;
if (p.IsNull() && shadow_ancestor)
- p = PositionTemplate<Strategy>::BeforeNode(shadow_ancestor);
+ p = PositionTemplate<Strategy>::BeforeNode(*shadow_ancestor);
while (p.IsNotNull() &&
!(LowestEditableAncestor(p.ComputeContainerNode()) ==
base_editable_ancestor &&
@@ -642,7 +642,7 @@ void VisibleSelectionTemplate<
*p.ComputeContainerNode())
: NextVisuallyDistinctCandidate(p);
if (p.IsNull() && shadow_ancestor)
- p = PositionTemplate<Strategy>::BeforeNode(shadow_ancestor);
+ p = PositionTemplate<Strategy>::BeforeNode(*shadow_ancestor);
}
const VisiblePositionTemplate<Strategy> next = CreateVisiblePosition(p);

Powered by Google App Engine
This is Rietveld 408576698