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

Side by Side Diff: Source/core/editing/commands/DeleteSelectionCommand.cpp

Issue 1309423002: Make DeleteSelectionCommand to use VisibleSelection::toNormalizedEphemeralRange() instead of toNorma (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-25T15:26:16 Created 5 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2005 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2005 Apple Computer, Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 updatePositionForTextRemoval(node.get(), offset, count, m_endingPosition); 419 updatePositionForTextRemoval(node.get(), offset, count, m_endingPosition);
420 updatePositionForTextRemoval(node.get(), offset, count, m_leadingWhitespace) ; 420 updatePositionForTextRemoval(node.get(), offset, count, m_leadingWhitespace) ;
421 updatePositionForTextRemoval(node.get(), offset, count, m_trailingWhitespace ); 421 updatePositionForTextRemoval(node.get(), offset, count, m_trailingWhitespace );
422 updatePositionForTextRemoval(node.get(), offset, count, m_downstreamEnd); 422 updatePositionForTextRemoval(node.get(), offset, count, m_downstreamEnd);
423 423
424 CompositeEditCommand::deleteTextFromNode(node, offset, count); 424 CompositeEditCommand::deleteTextFromNode(node, offset, count);
425 } 425 }
426 426
427 void DeleteSelectionCommand::makeStylingElementsDirectChildrenOfEditableRootToPr eventStyleLoss() 427 void DeleteSelectionCommand::makeStylingElementsDirectChildrenOfEditableRootToPr eventStyleLoss()
428 { 428 {
429 RefPtrWillBeRawPtr<Range> range = m_selectionToDelete.toNormalizedRange(); 429 RefPtrWillBeRawPtr<Range> range = createRange(m_selectionToDelete.toNormaliz edEphemeralRange());
430 RefPtrWillBeRawPtr<Node> node = range->firstNode(); 430 RefPtrWillBeRawPtr<Node> node = range->firstNode();
431 while (node && node != range->pastLastNode()) { 431 while (node && node != range->pastLastNode()) {
432 RefPtrWillBeRawPtr<Node> nextNode = NodeTraversal::next(*node); 432 RefPtrWillBeRawPtr<Node> nextNode = NodeTraversal::next(*node);
433 if (isHTMLStyleElement(*node) || isHTMLLinkElement(*node)) { 433 if (isHTMLStyleElement(*node) || isHTMLLinkElement(*node)) {
434 nextNode = NodeTraversal::nextSkippingChildren(*node); 434 nextNode = NodeTraversal::nextSkippingChildren(*node);
435 RefPtrWillBeRawPtr<Element> rootEditableElement = node->rootEditable Element(); 435 RefPtrWillBeRawPtr<Element> rootEditableElement = node->rootEditable Element();
436 if (rootEditableElement.get()) { 436 if (rootEditableElement.get()) {
437 removeNode(node); 437 removeNode(node);
438 appendNode(node, rootEditableElement); 438 appendNode(node, rootEditableElement);
439 } 439 }
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
899 visitor->trace(m_deleteIntoBlockquoteStyle); 899 visitor->trace(m_deleteIntoBlockquoteStyle);
900 visitor->trace(m_startRoot); 900 visitor->trace(m_startRoot);
901 visitor->trace(m_endRoot); 901 visitor->trace(m_endRoot);
902 visitor->trace(m_startTableRow); 902 visitor->trace(m_startTableRow);
903 visitor->trace(m_endTableRow); 903 visitor->trace(m_endTableRow);
904 visitor->trace(m_temporaryPlaceholder); 904 visitor->trace(m_temporaryPlaceholder);
905 CompositeEditCommand::trace(visitor); 905 CompositeEditCommand::trace(visitor);
906 } 906 }
907 907
908 } // namespace blink 908 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698