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

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

Issue 2140733003: [Editing][CodeHealth] Make Node::rootEditableElement static (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
Index: third_party/WebKit/Source/core/editing/VisibleUnits.cpp
diff --git a/third_party/WebKit/Source/core/editing/VisibleUnits.cpp b/third_party/WebKit/Source/core/editing/VisibleUnits.cpp
index 797c2e7516347a9a0e929e5c4afda5182c7816d0..ddeb95123a48ee7c751f3511bd7ca1697601f1e0 100644
--- a/third_party/WebKit/Source/core/editing/VisibleUnits.cpp
+++ b/third_party/WebKit/Source/core/editing/VisibleUnits.cpp
@@ -1336,7 +1336,7 @@ VisiblePosition previousLinePosition(const VisiblePosition& visiblePosition, Lay
// Could not find a previous line. This means we must already be on the first line.
// Move to the start of the content in this block, which effectively moves us
// to the start of the line we're on.
- Element* rootElement = node->hasEditableStyle(editableType) ? node->rootEditableElement(editableType) : node->document().documentElement();
+ Element* rootElement = node->hasEditableStyle(editableType) ? rootEditableElement(*node, editableType) : node->document().documentElement();
if (!rootElement)
return VisiblePosition();
return VisiblePosition::firstPositionInNode(rootElement);
@@ -1392,7 +1392,7 @@ VisiblePosition nextLinePosition(const VisiblePosition& visiblePosition, LayoutU
// Could not find a next line. This means we must already be on the last line.
// Move to the end of the content in this block, which effectively moves us
// to the end of the line we're on.
- Element* rootElement = node->hasEditableStyle(editableType) ? node->rootEditableElement(editableType) : node->document().documentElement();
+ Element* rootElement = node->hasEditableStyle(editableType) ? rootEditableElement(*node, editableType) : node->document().documentElement();
if (!rootElement)
return VisiblePosition();
return VisiblePosition::lastPositionInNode(rootElement);

Powered by Google App Engine
This is Rietveld 408576698