| 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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 case InputEvent::InputType::DeleteComposedCharacterForward: | 199 case InputEvent::InputType::DeleteComposedCharacterForward: |
| 200 case InputEvent::InputType::DeleteComposedCharacterBackward: | 200 case InputEvent::InputType::DeleteComposedCharacterBackward: |
| 201 case InputEvent::InputType::DeleteWordBackward: | 201 case InputEvent::InputType::DeleteWordBackward: |
| 202 case InputEvent::InputType::DeleteWordForward: | 202 case InputEvent::InputType::DeleteWordForward: |
| 203 case InputEvent::InputType::DeleteLineBackward: | 203 case InputEvent::InputType::DeleteLineBackward: |
| 204 case InputEvent::InputType::DeleteLineForward: | 204 case InputEvent::InputType::DeleteLineForward: |
| 205 case InputEvent::InputType::DeleteContentBackward: | 205 case InputEvent::InputType::DeleteContentBackward: |
| 206 case InputEvent::InputType::DeleteContentForward: | 206 case InputEvent::InputType::DeleteContentForward: |
| 207 case InputEvent::InputType::DeleteByCut: | 207 case InputEvent::InputType::DeleteByCut: |
| 208 case InputEvent::InputType::DeleteByDrag: | 208 case InputEvent::InputType::DeleteByDrag: |
| 209 case InputEvent::InputType::SetWritingDirection: | |
| 210 case InputEvent::InputType::None: | 209 case InputEvent::InputType::None: |
| 211 break; | 210 break; |
| 212 default: | 211 default: |
| 213 NOTREACHED(); | 212 NOTREACHED(); |
| 214 return false; | 213 return false; |
| 215 } | 214 } |
| 216 } | 215 } |
| 217 ensureComposition(); | 216 ensureComposition(); |
| 218 | 217 |
| 219 // Changes to the document may have been made since the last editing operation | 218 // Changes to the document may have been made since the last editing operation |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 CompositeEditCommand* command) { | 307 CompositeEditCommand* command) { |
| 309 ensureComposition()->append(command->ensureComposition()); | 308 ensureComposition()->append(command->ensureComposition()); |
| 310 command->m_composition = nullptr; | 309 command->m_composition = nullptr; |
| 311 command->setParent(this); | 310 command->setParent(this); |
| 312 m_commands.append(command); | 311 m_commands.append(command); |
| 313 } | 312 } |
| 314 | 313 |
| 315 void CompositeEditCommand::applyStyle(const EditingStyle* style, | 314 void CompositeEditCommand::applyStyle(const EditingStyle* style, |
| 316 EditingState* editingState) { | 315 EditingState* editingState) { |
| 317 applyCommandToComposite( | 316 applyCommandToComposite( |
| 318 ApplyStyleCommand::create(document(), style, | 317 ApplyStyleCommand::create(document(), style, InputEvent::InputType::None), |
| 319 InputEvent::InputType::ChangeAttributes), | |
| 320 editingState); | 318 editingState); |
| 321 } | 319 } |
| 322 | 320 |
| 323 void CompositeEditCommand::applyStyle(const EditingStyle* style, | 321 void CompositeEditCommand::applyStyle(const EditingStyle* style, |
| 324 const Position& start, | 322 const Position& start, |
| 325 const Position& end, | 323 const Position& end, |
| 326 EditingState* editingState) { | 324 EditingState* editingState) { |
| 327 applyCommandToComposite( | 325 applyCommandToComposite( |
| 328 ApplyStyleCommand::create(document(), style, start, end), editingState); | 326 ApplyStyleCommand::create(document(), style, start, end), editingState); |
| 329 } | 327 } |
| (...skipping 1696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2026 return node; | 2024 return node; |
| 2027 } | 2025 } |
| 2028 | 2026 |
| 2029 DEFINE_TRACE(CompositeEditCommand) { | 2027 DEFINE_TRACE(CompositeEditCommand) { |
| 2030 visitor->trace(m_commands); | 2028 visitor->trace(m_commands); |
| 2031 visitor->trace(m_composition); | 2029 visitor->trace(m_composition); |
| 2032 EditCommand::trace(visitor); | 2030 EditCommand::trace(visitor); |
| 2033 } | 2031 } |
| 2034 | 2032 |
| 2035 } // namespace blink | 2033 } // namespace blink |
| OLD | NEW |