| 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 1796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1807 if (editingState->isAborted()) | 1807 if (editingState->isAborted()) |
| 1808 return false; | 1808 return false; |
| 1809 } | 1809 } |
| 1810 | 1810 |
| 1811 appendBlockPlaceholder(newBlock, editingState); | 1811 appendBlockPlaceholder(newBlock, editingState); |
| 1812 if (editingState->isAborted()) | 1812 if (editingState->isAborted()) |
| 1813 return false; | 1813 return false; |
| 1814 | 1814 |
| 1815 document().updateStyleAndLayoutIgnorePendingStylesheets(); | 1815 document().updateStyleAndLayoutIgnorePendingStylesheets(); |
| 1816 setEndingSelection(createVisibleSelection( | 1816 setEndingSelection(createVisibleSelection( |
| 1817 Position::firstPositionInNode(newBlock), TextAffinity::Downstream, | 1817 SelectionInDOMTree::Builder() |
| 1818 endingSelection().isDirectional())); | 1818 .collapse(Position::firstPositionInNode(newBlock)) |
| 1819 .setIsDirectional(endingSelection().isDirectional()) |
| 1820 .build())); |
| 1819 | 1821 |
| 1820 style->prepareToApplyAt(endingSelection().start()); | 1822 style->prepareToApplyAt(endingSelection().start()); |
| 1821 if (!style->isEmpty()) { | 1823 if (!style->isEmpty()) { |
| 1822 applyStyle(style, editingState); | 1824 applyStyle(style, editingState); |
| 1823 if (editingState->isAborted()) | 1825 if (editingState->isAborted()) |
| 1824 return false; | 1826 return false; |
| 1825 } | 1827 } |
| 1826 | 1828 |
| 1827 return true; | 1829 return true; |
| 1828 } | 1830 } |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2025 return node; | 2027 return node; |
| 2026 } | 2028 } |
| 2027 | 2029 |
| 2028 DEFINE_TRACE(CompositeEditCommand) { | 2030 DEFINE_TRACE(CompositeEditCommand) { |
| 2029 visitor->trace(m_commands); | 2031 visitor->trace(m_commands); |
| 2030 visitor->trace(m_composition); | 2032 visitor->trace(m_composition); |
| 2031 EditCommand::trace(visitor); | 2033 EditCommand::trace(visitor); |
| 2032 } | 2034 } |
| 2033 | 2035 |
| 2034 } // namespace blink | 2036 } // namespace blink |
| OLD | NEW |