| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006, 2007, 2008 Apple 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 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 581 DocumentMarkerController& markerController = document().markers(); | 581 DocumentMarkerController& markerController = document().markers(); |
| 582 Vector<DocumentMarker::MarkerType> types; | 582 Vector<DocumentMarker::MarkerType> types; |
| 583 Vector<String> descriptions; | 583 Vector<String> descriptions; |
| 584 copyMarkerTypesAndDescriptions(markerController.markersInRange(EphemeralRang
e(Position(node, offset), Position(node, offset + count)), DocumentMarker::AllMa
rkers()), types, descriptions); | 584 copyMarkerTypesAndDescriptions(markerController.markersInRange(EphemeralRang
e(Position(node, offset), Position(node, offset + count)), DocumentMarker::AllMa
rkers()), types, descriptions); |
| 585 | 585 |
| 586 replaceTextInNode(node, offset, count, replacementText); | 586 replaceTextInNode(node, offset, count, replacementText); |
| 587 | 587 |
| 588 // Re-adding markers requires a clean tree. | 588 // Re-adding markers requires a clean tree. |
| 589 document().updateStyleAndLayout(); | 589 document().updateStyleAndLayout(); |
| 590 | 590 |
| 591 DocumentLifecycle::DisallowTransitionScope(document().lifecycle()); | 591 DocumentLifecycle::DisallowTransitionScope disallowTransition(document().lif
ecycle()); |
| 592 Position startPosition(node, offset); | 592 Position startPosition(node, offset); |
| 593 Position endPosition(node, offset + replacementText.length()); | 593 Position endPosition(node, offset + replacementText.length()); |
| 594 DCHECK_EQ(types.size(), descriptions.size()); | 594 DCHECK_EQ(types.size(), descriptions.size()); |
| 595 | 595 |
| 596 for (size_t i = 0; i < types.size(); ++i) | 596 for (size_t i = 0; i < types.size(); ++i) |
| 597 markerController.addMarker(startPosition, endPosition, types[i], descrip
tions[i]); | 597 markerController.addMarker(startPosition, endPosition, types[i], descrip
tions[i]); |
| 598 } | 598 } |
| 599 | 599 |
| 600 Position CompositeEditCommand::positionOutsideTabSpan(const Position& pos) | 600 Position CompositeEditCommand::positionOutsideTabSpan(const Position& pos) |
| 601 { | 601 { |
| (...skipping 1052 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1654 } | 1654 } |
| 1655 | 1655 |
| 1656 DEFINE_TRACE(CompositeEditCommand) | 1656 DEFINE_TRACE(CompositeEditCommand) |
| 1657 { | 1657 { |
| 1658 visitor->trace(m_commands); | 1658 visitor->trace(m_commands); |
| 1659 visitor->trace(m_composition); | 1659 visitor->trace(m_composition); |
| 1660 EditCommand::trace(visitor); | 1660 EditCommand::trace(visitor); |
| 1661 } | 1661 } |
| 1662 | 1662 |
| 1663 } // namespace blink | 1663 } // namespace blink |
| OLD | NEW |