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

Unified Diff: Source/core/dom/Range.cpp

Issue 1225233002: Remove Range.expand() method Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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
« no previous file with comments | « Source/core/dom/Range.h ('k') | Source/core/dom/Range.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Range.cpp
diff --git a/Source/core/dom/Range.cpp b/Source/core/dom/Range.cpp
index f9cb4fef91945ad16ed3263304134eb07c4c9f5d..6102fdd49f5ff9b3fedd32e0f268942bdbe43f82 100644
--- a/Source/core/dom/Range.cpp
+++ b/Source/core/dom/Range.cpp
@@ -1620,29 +1620,6 @@ void Range::didSplitTextNode(Text& oldNode)
ASSERT(boundaryPointsValid());
}
-void Range::expand(const String& unit, ExceptionState& exceptionState)
-{
- VisiblePosition start(startPosition());
- VisiblePosition end(endPosition());
- if (unit == "word") {
- start = startOfWord(start);
- end = endOfWord(end);
- } else if (unit == "sentence") {
- start = startOfSentence(start);
- end = endOfSentence(end);
- } else if (unit == "block") {
- start = startOfParagraph(start);
- end = endOfParagraph(end);
- } else if (unit == "document") {
- start = startOfDocument(start);
- end = endOfDocument(end);
- } else {
- return;
- }
- setStart(start.deepEquivalent().containerNode(), start.deepEquivalent().computeOffsetInContainerNode(), exceptionState);
- setEnd(end.deepEquivalent().containerNode(), end.deepEquivalent().computeOffsetInContainerNode(), exceptionState);
-}
-
ClientRectList* Range::getClientRects() const
{
m_ownerDocument->updateLayoutIgnorePendingStylesheets();
« no previous file with comments | « Source/core/dom/Range.h ('k') | Source/core/dom/Range.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698