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

Side by Side Diff: third_party/WebKit/Source/core/dom/Range.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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * (C) 1999 Lars Knoll (knoll@kde.org) 2 * (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Gunnstein Lye (gunnstein@netcom.no) 3 * (C) 2000 Gunnstein Lye (gunnstein@netcom.no)
4 * (C) 2000 Frederik Holljen (frederik.holljen@hig.no) 4 * (C) 2000 Frederik Holljen (frederik.holljen@hig.no)
5 * (C) 2001 Peter Kelly (pmk@post.com) 5 * (C) 2001 Peter Kelly (pmk@post.com)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
7 * Copyright (C) 2011 Motorola Mobility. All rights reserved. 7 * Copyright (C) 2011 Motorola Mobility. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 1442 matching lines...) Expand 10 before | Expand all | Expand 10 after
1453 { 1453 {
1454 DCHECK_EQ(oldNode.document(), m_ownerDocument); 1454 DCHECK_EQ(oldNode.document(), m_ownerDocument);
1455 DCHECK(oldNode.parentNode()); 1455 DCHECK(oldNode.parentNode());
1456 DCHECK(oldNode.nextSibling()); 1456 DCHECK(oldNode.nextSibling());
1457 DCHECK(oldNode.nextSibling()->isTextNode()); 1457 DCHECK(oldNode.nextSibling()->isTextNode());
1458 boundaryTextNodeSplit(m_start, oldNode); 1458 boundaryTextNodeSplit(m_start, oldNode);
1459 boundaryTextNodeSplit(m_end, oldNode); 1459 boundaryTextNodeSplit(m_end, oldNode);
1460 DCHECK(boundaryPointsValid()); 1460 DCHECK(boundaryPointsValid());
1461 } 1461 }
1462 1462
1463 void Range::expand(const String& unit, ExceptionState& exceptionState) 1463 void Range::expand(const String& unit, ExceptionState& exceptionState)
yosin_UTC9 2016/09/16 02:01:21 We should get rid of Range#expand() since it is Bl
1464 { 1464 {
1465 VisiblePosition start = createVisiblePosition(startPosition()); 1465 VisiblePosition start = createVisiblePositionDeprecated(startPosition());
1466 VisiblePosition end = createVisiblePosition(endPosition()); 1466 VisiblePosition end = createVisiblePositionDeprecated(endPosition());
1467 if (unit == "word") { 1467 if (unit == "word") {
1468 start = startOfWord(start); 1468 start = startOfWord(start);
1469 end = endOfWord(end); 1469 end = endOfWord(end);
1470 } else if (unit == "sentence") { 1470 } else if (unit == "sentence") {
1471 start = startOfSentence(start); 1471 start = startOfSentence(start);
1472 end = endOfSentence(end); 1472 end = endOfSentence(end);
1473 } else if (unit == "block") { 1473 } else if (unit == "block") {
1474 start = startOfParagraph(start); 1474 start = startOfParagraph(start);
1475 end = endOfParagraph(end); 1475 end = endOfParagraph(end);
1476 } else if (unit == "document") { 1476 } else if (unit == "document") {
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
1574 if (range && range->boundaryPointsValid()) { 1574 if (range && range->boundaryPointsValid()) {
1575 LOG(INFO) << "\n" 1575 LOG(INFO) << "\n"
1576 << range->startContainer()->toMarkedTreeString(range->startContainer (), "S", range->endContainer(), "E").utf8().data() 1576 << range->startContainer()->toMarkedTreeString(range->startContainer (), "S", range->endContainer(), "E").utf8().data()
1577 << "start offset: " << range->startOffset() << ", end offset: " << r ange->endOffset(); 1577 << "start offset: " << range->startOffset() << ", end offset: " << r ange->endOffset();
1578 } else { 1578 } else {
1579 LOG(INFO) << "Cannot show tree if range is null, or if boundary points a re invalid."; 1579 LOG(INFO) << "Cannot show tree if range is null, or if boundary points a re invalid.";
1580 } 1580 }
1581 } 1581 }
1582 1582
1583 #endif 1583 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698