OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |