Commit 3ca78684 authored by yosin@chromium.org's avatar yosin@chromium.org

Make DeleteSelectionCommand to use...

Make DeleteSelectionCommand to use VisibleSelection::toNormalizedEphemeralRange() instead of toNormalizedRange()

This patch changes |DeleteSelectionCommand| class to use |toNormalizedEphemeralRange()|
in |VisibleSelection| class instead of |toNormalizedRange()| as a preparation
of templatizing |VisibleSelection| to use templatized positions instead of
DOM position to represent range.

This patch is a preparation of making selection to handle granularity for web
component, http://crrev.com/1277863002

BUG=513568
TEST=n/a; no behavior changes

Review URL: https://codereview.chromium.org/1309423002

git-svn-id: svn://svn.chromium.org/blink/trunk@201178 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 2c763141
......@@ -426,7 +426,7 @@ void DeleteSelectionCommand::deleteTextFromNode(PassRefPtrWillBeRawPtr<Text> nod
void DeleteSelectionCommand::makeStylingElementsDirectChildrenOfEditableRootToPreventStyleLoss()
{
RefPtrWillBeRawPtr<Range> range = m_selectionToDelete.toNormalizedRange();
RefPtrWillBeRawPtr<Range> range = createRange(m_selectionToDelete.toNormalizedEphemeralRange());
RefPtrWillBeRawPtr<Node> node = range->firstNode();
while (node && node != range->pastLastNode()) {
RefPtrWillBeRawPtr<Node> nextNode = NodeTraversal::next(*node);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment