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

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

Issue 1611953002: Rename editableRootElementForPosition() to rootEditableElementOf() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-01-21T18:23:57 Created 4 years, 11 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 c0c782d05229538a0e83f5cada41032c03ecd736..088a6df8bd61fff9180c7cc203c282279048378b 100644
--- a/third_party/WebKit/Source/core/editing/VisibleUnits.cpp
+++ b/third_party/WebKit/Source/core/editing/VisibleUnits.cpp
@@ -126,7 +126,7 @@ static PositionType canonicalPosition(const PositionType& passedPosition)
if (node && node->document().documentElement() == node && !node->hasEditableStyle() && node->document().body() && node->document().body()->hasEditableStyle())
return next.isNotNull() ? next : prev;
- Element* editingRoot = editableRootElementForPosition(position);
+ Element* editingRoot = rootEditableElementOf(position);
// If the html element is editable, descending into its body will look like
// a descent from non-editable to editable content since
@@ -134,8 +134,8 @@ static PositionType canonicalPosition(const PositionType& passedPosition)
if ((editingRoot && editingRoot->document().documentElement() == editingRoot) || position.anchorNode()->isDocumentNode())
return next.isNotNull() ? next : prev;
- bool prevIsInSameEditableElement = prevNode && editableRootElementForPosition(prev) == editingRoot;
- bool nextIsInSameEditableElement = nextNode && editableRootElementForPosition(next) == editingRoot;
+ bool prevIsInSameEditableElement = prevNode && rootEditableElementOf(prev) == editingRoot;
+ bool nextIsInSameEditableElement = nextNode && rootEditableElementOf(next) == editingRoot;
if (prevIsInSameEditableElement && !nextIsInSameEditableElement)
return prev;

Powered by Google App Engine
This is Rietveld 408576698