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

Unified Diff: third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.cpp

Issue 2955823002: Make VisiblePosition::FirstPositionInNode() to take const Node& instead of Node* (Closed)
Patch Set: 2017-06-26T13:57:23 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/commands/DeleteSelectionCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.cpp b/third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.cpp
index c3d742efee6cddec3b66f3168d3f3b984da88eff..3e00ab7063cacb72f1fb9bcfb46497d774d170b8 100644
--- a/third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/DeleteSelectionCommand.cpp
@@ -48,7 +48,7 @@ using namespace HTMLNames;
static bool IsTableCellEmpty(Node* cell) {
tkent 2017/06/26 08:08:22 Please make the |cell| argument |Node&|, or add |D
yosin_UTC9 2017/06/26 08:53:52 Done.
DCHECK(IsTableCell(cell)) << cell;
- return VisiblePosition::FirstPositionInNode(cell).DeepEquivalent() ==
+ return VisiblePosition::FirstPositionInNode(*cell).DeepEquivalent() ==
VisiblePosition::LastPositionInNode(cell).DeepEquivalent();
}
@@ -513,7 +513,7 @@ void DeleteSelectionCommand::RemoveNode(
GetDocument().UpdateStyleAndLayoutIgnorePendingStylesheets();
if (node == start_block_) {
VisiblePosition previous = PreviousPositionOf(
- VisiblePosition::FirstPositionInNode(start_block_.Get()));
+ VisiblePosition::FirstPositionInNode(*start_block_.Get()));
if (previous.IsNotNull() && !IsEndOfBlock(previous))
need_placeholder_ = true;
}

Powered by Google App Engine
This is Rietveld 408576698