| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2009, 2010, 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2009, 2010, 2011 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 1548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1559 // what comes after and prevent that from happening. | 1559 // what comes after and prevent that from happening. |
| 1560 VisiblePosition endOfInsertedContent = positionAtEndOfInsertedContent(); | 1560 VisiblePosition endOfInsertedContent = positionAtEndOfInsertedContent(); |
| 1561 if (startOfParagraph(endOfInsertedContent).deepEquivalent() == | 1561 if (startOfParagraph(endOfInsertedContent).deepEquivalent() == |
| 1562 startOfParagraphToMovePosition.position()) { | 1562 startOfParagraphToMovePosition.position()) { |
| 1563 insertNodeAt(HTMLBRElement::create(document()), | 1563 insertNodeAt(HTMLBRElement::create(document()), |
| 1564 endOfInsertedContent.deepEquivalent(), editingState); | 1564 endOfInsertedContent.deepEquivalent(), editingState); |
| 1565 if (editingState->isAborted()) | 1565 if (editingState->isAborted()) |
| 1566 return; | 1566 return; |
| 1567 // Mutation events (bug 22634) triggered by inserting the <br> might have | 1567 // Mutation events (bug 22634) triggered by inserting the <br> might have |
| 1568 // removed the content we're about to move | 1568 // removed the content we're about to move |
| 1569 if (!startOfParagraphToMovePosition.position().isConnected()) | 1569 if (!startOfParagraphToMovePosition.isConnected()) |
| 1570 return; | 1570 return; |
| 1571 } | 1571 } |
| 1572 | 1572 |
| 1573 document().updateStyleAndLayoutIgnorePendingStylesheets(); | 1573 document().updateStyleAndLayoutIgnorePendingStylesheets(); |
| 1574 | 1574 |
| 1575 // Making the two VisiblePositions valid again. | 1575 // Making the two VisiblePositions valid again. |
| 1576 startOfParagraphToMove = | 1576 startOfParagraphToMove = |
| 1577 createVisiblePosition(startOfParagraphToMovePosition); | 1577 createVisiblePosition(startOfParagraphToMovePosition); |
| 1578 destination = createVisiblePosition(destinationPosition); | 1578 destination = createVisiblePosition(destinationPosition); |
| 1579 | 1579 |
| (...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2075 visitor->trace(m_startOfInsertedContent); | 2075 visitor->trace(m_startOfInsertedContent); |
| 2076 visitor->trace(m_endOfInsertedContent); | 2076 visitor->trace(m_endOfInsertedContent); |
| 2077 visitor->trace(m_insertionStyle); | 2077 visitor->trace(m_insertionStyle); |
| 2078 visitor->trace(m_documentFragment); | 2078 visitor->trace(m_documentFragment); |
| 2079 visitor->trace(m_startOfInsertedRange); | 2079 visitor->trace(m_startOfInsertedRange); |
| 2080 visitor->trace(m_endOfInsertedRange); | 2080 visitor->trace(m_endOfInsertedRange); |
| 2081 CompositeEditCommand::trace(visitor); | 2081 CompositeEditCommand::trace(visitor); |
| 2082 } | 2082 } |
| 2083 | 2083 |
| 2084 } // namespace blink | 2084 } // namespace blink |
| OLD | NEW |