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

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

Issue 2341053002: Mark the createVisiblePosition overloads as deprecated (Closed)
Patch Set: minor revision Created 4 years, 3 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/Editor.cpp
diff --git a/third_party/WebKit/Source/core/editing/Editor.cpp b/third_party/WebKit/Source/core/editing/Editor.cpp
index 4df1cc2f0d6a1b0779cdbc10382a0e980ee3f7e8..953b683cc0b668b60db066f6bcafa80938b9961c 100644
--- a/third_party/WebKit/Source/core/editing/Editor.cpp
+++ b/third_party/WebKit/Source/core/editing/Editor.cpp
@@ -293,7 +293,7 @@ bool Editor::canDeleteRange(const EphemeralRange& range) const
return false;
if (range.isCollapsed()) {
- VisiblePosition start = createVisiblePosition(range.startPosition());
+ VisiblePosition start = createVisiblePositionDeprecated(range.startPosition());
VisiblePosition previous = previousPositionOf(start);
// FIXME: We sometimes allow deletions at the start of editable roots, like when the caret is in an empty list item.
if (previous.isNull() || rootEditableElement(*previous.deepEquivalent().anchorNode()) != rootEditableElement(*startContainer))
@@ -1181,11 +1181,11 @@ IntRect Editor::firstRectForRange(const EphemeralRange& range) const
LayoutUnit extraWidthToEndOfLine;
DCHECK(range.isNotNull());
- IntRect startCaretRect = RenderedPosition(createVisiblePosition(range.startPosition()).deepEquivalent(), TextAffinity::Downstream).absoluteRect(&extraWidthToEndOfLine);
+ IntRect startCaretRect = RenderedPosition(createVisiblePositionDeprecated(range.startPosition()).deepEquivalent(), TextAffinity::Downstream).absoluteRect(&extraWidthToEndOfLine);
if (startCaretRect.isEmpty())
return IntRect();
- IntRect endCaretRect = RenderedPosition(createVisiblePosition(range.endPosition()).deepEquivalent(), TextAffinity::Upstream).absoluteRect();
+ IntRect endCaretRect = RenderedPosition(createVisiblePositionDeprecated(range.endPosition()).deepEquivalent(), TextAffinity::Upstream).absoluteRect();
if (endCaretRect.isEmpty())
return IntRect();

Powered by Google App Engine
This is Rietveld 408576698