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 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 | 372 |
373 return false; | 373 return false; |
374 } | 374 } |
375 | 375 |
376 void CompositeEditCommand::insertNodeBefore( | 376 void CompositeEditCommand::insertNodeBefore( |
377 Node* insertChild, | 377 Node* insertChild, |
378 Node* refChild, | 378 Node* refChild, |
379 EditingState* editingState, | 379 EditingState* editingState, |
380 ShouldAssumeContentIsAlwaysEditable shouldAssumeContentIsAlwaysEditable) { | 380 ShouldAssumeContentIsAlwaysEditable shouldAssumeContentIsAlwaysEditable) { |
381 DCHECK_NE(document().body(), refChild); | 381 DCHECK_NE(document().body(), refChild); |
| 382 // TODO(editing-dev): Use of updateStyleAndLayoutIgnorePendingStylesheets |
| 383 // needs to be audited. See http://crbug.com/590369 for more details. |
| 384 document().updateStyleAndLayoutIgnorePendingStylesheets(); |
382 ABORT_EDITING_COMMAND_IF(!hasEditableStyle(*refChild->parentNode()) && | 385 ABORT_EDITING_COMMAND_IF(!hasEditableStyle(*refChild->parentNode()) && |
383 refChild->parentNode()->inActiveDocument()); | 386 refChild->parentNode()->inActiveDocument()); |
384 applyCommandToComposite( | 387 applyCommandToComposite( |
385 InsertNodeBeforeCommand::create(insertChild, refChild, | 388 InsertNodeBeforeCommand::create(insertChild, refChild, |
386 shouldAssumeContentIsAlwaysEditable), | 389 shouldAssumeContentIsAlwaysEditable), |
387 editingState); | 390 editingState); |
388 } | 391 } |
389 | 392 |
390 void CompositeEditCommand::insertNodeAfter(Node* insertChild, | 393 void CompositeEditCommand::insertNodeAfter(Node* insertChild, |
391 Node* refChild, | 394 Node* refChild, |
(...skipping 1646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2038 return node; | 2041 return node; |
2039 } | 2042 } |
2040 | 2043 |
2041 DEFINE_TRACE(CompositeEditCommand) { | 2044 DEFINE_TRACE(CompositeEditCommand) { |
2042 visitor->trace(m_commands); | 2045 visitor->trace(m_commands); |
2043 visitor->trace(m_composition); | 2046 visitor->trace(m_composition); |
2044 EditCommand::trace(visitor); | 2047 EditCommand::trace(visitor); |
2045 } | 2048 } |
2046 | 2049 |
2047 } // namespace blink | 2050 } // namespace blink |
OLD | NEW |