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

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

Issue 1317053004: Make VisiblePosition constructor private (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-09-02T12:44:47 Rebase Created 5 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
« no previous file with comments | « Source/core/editing/EditingUtilities.cpp ('k') | Source/core/editing/FrameSelection.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/Editor.cpp
diff --git a/Source/core/editing/Editor.cpp b/Source/core/editing/Editor.cpp
index 29ce3c945d4d161b89d18e152f0d7719b6149d5f..c2b3ea246632a19ddb2ae67eb0399c769f6c6d83 100644
--- a/Source/core/editing/Editor.cpp
+++ b/Source/core/editing/Editor.cpp
@@ -255,7 +255,7 @@ bool Editor::canDeleteRange(const EphemeralRange& range) const
return false;
if (range.isCollapsed()) {
- VisiblePosition start(range.startPosition());
+ VisiblePosition start = createVisiblePosition(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() || previous.deepEquivalent().anchorNode()->rootEditableElement() != startContainer->rootEditableElement())
@@ -1085,11 +1085,11 @@ IntRect Editor::firstRectForRange(const EphemeralRange& range) const
LayoutUnit extraWidthToEndOfLine = 0;
ASSERT(range.isNotNull());
- IntRect startCaretRect = RenderedPosition(VisiblePosition(range.startPosition()).deepEquivalent(), TextAffinity::Downstream).absoluteRect(&extraWidthToEndOfLine);
+ IntRect startCaretRect = RenderedPosition(createVisiblePosition(range.startPosition()).deepEquivalent(), TextAffinity::Downstream).absoluteRect(&extraWidthToEndOfLine);
if (startCaretRect.isEmpty())
return IntRect();
- IntRect endCaretRect = RenderedPosition(VisiblePosition(range.endPosition()).deepEquivalent(), TextAffinity::Upstream).absoluteRect();
+ IntRect endCaretRect = RenderedPosition(createVisiblePosition(range.endPosition()).deepEquivalent(), TextAffinity::Upstream).absoluteRect();
if (endCaretRect.isEmpty())
return IntRect();
« no previous file with comments | « Source/core/editing/EditingUtilities.cpp ('k') | Source/core/editing/FrameSelection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698