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

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

Issue 2351533005: Prune CreateVisiblePositionDeprecated from DOMSelection (Closed)
Patch Set: Address comments 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/FrameSelection.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/editing/DOMSelection.cpp
diff --git a/third_party/WebKit/Source/core/editing/DOMSelection.cpp b/third_party/WebKit/Source/core/editing/DOMSelection.cpp
index 832f6e12a446aaa80374eaedcc3cc3facde9f969..4f688e40bd0ae465f54d15350336c56a711d28ea 100644
--- a/third_party/WebKit/Source/core/editing/DOMSelection.cpp
+++ b/third_party/WebKit/Source/core/editing/DOMSelection.cpp
@@ -243,7 +243,7 @@ void DOMSelection::collapseToEnd(ExceptionState& exceptionState)
return;
}
- m_frame->selection().moveTo(createVisiblePositionDeprecated(selection.end()));
+ m_frame->selection().moveTo(selection.end(), SelDefaultAffinity);
}
void DOMSelection::collapseToStart(ExceptionState& exceptionState)
@@ -258,7 +258,7 @@ void DOMSelection::collapseToStart(ExceptionState& exceptionState)
return;
}
- m_frame->selection().moveTo(createVisiblePositionDeprecated(selection.start()));
+ m_frame->selection().moveTo(selection.start(), SelDefaultAffinity);
}
void DOMSelection::empty()
@@ -289,10 +289,10 @@ void DOMSelection::setBaseAndExtent(Node* baseNode, int baseOffset, Node* extent
if (!isValidForPosition(baseNode) || !isValidForPosition(extentNode))
return;
- VisiblePosition visibleBase = createVisiblePositionDeprecated(createPosition(baseNode, baseOffset));
- VisiblePosition visibleExtent = createVisiblePositionDeprecated(createPosition(extentNode, extentOffset));
+ Position base = createPosition(baseNode, baseOffset);
+ Position extent = createPosition(extentNode, extentOffset);
const bool selectionHasDirection = true;
- m_frame->selection().setSelection(VisibleSelection(visibleBase, visibleExtent, selectionHasDirection));
+ m_frame->selection().setSelection(VisibleSelection(base, extent, SelDefaultAffinity, selectionHasDirection));
}
void DOMSelection::modify(const String& alterString, const String& directionString, const String& granularityString)
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/FrameSelection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698