| 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 1467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1478 // Only move forward if there's nothing before the caret, or if there's unqu
oted content before it. | 1478 // Only move forward if there's nothing before the caret, or if there's unqu
oted content before it. |
| 1479 if (enclosingNodeOfType(previous.deepEquivalent(), &isMailHTMLBlockquoteElem
ent)) | 1479 if (enclosingNodeOfType(previous.deepEquivalent(), &isMailHTMLBlockquoteElem
ent)) |
| 1480 return false; | 1480 return false; |
| 1481 | 1481 |
| 1482 HTMLBRElement* br = HTMLBRElement::create(document()); | 1482 HTMLBRElement* br = HTMLBRElement::create(document()); |
| 1483 // We want to replace this quoted paragraph with an unquoted one, so insert
a br | 1483 // We want to replace this quoted paragraph with an unquoted one, so insert
a br |
| 1484 // to hold the caret before the highest blockquote. | 1484 // to hold the caret before the highest blockquote. |
| 1485 insertNodeBefore(br, highestBlockquote, editingState); | 1485 insertNodeBefore(br, highestBlockquote, editingState); |
| 1486 if (editingState->isAborted()) | 1486 if (editingState->isAborted()) |
| 1487 return false; | 1487 return false; |
| 1488 VisiblePosition atBR = createVisiblePosition(positionBeforeNode(br)); | 1488 VisiblePosition atBR = createVisiblePosition(Position::beforeNode(br)); |
| 1489 // If the br we inserted collapsed, for example foo<br><blockquote>...</bloc
kquote>, insert | 1489 // If the br we inserted collapsed, for example foo<br><blockquote>...</bloc
kquote>, insert |
| 1490 // a second one. | 1490 // a second one. |
| 1491 if (!isStartOfParagraph(atBR)) { | 1491 if (!isStartOfParagraph(atBR)) { |
| 1492 insertNodeBefore(HTMLBRElement::create(document()), br, editingState); | 1492 insertNodeBefore(HTMLBRElement::create(document()), br, editingState); |
| 1493 if (editingState->isAborted()) | 1493 if (editingState->isAborted()) |
| 1494 return false; | 1494 return false; |
| 1495 } | 1495 } |
| 1496 setEndingSelection(VisibleSelection(atBR, endingSelection().isDirectional())
); | 1496 setEndingSelection(VisibleSelection(atBR, endingSelection().isDirectional())
); |
| 1497 | 1497 |
| 1498 // If this is an empty paragraph there must be a line break here. | 1498 // If this is an empty paragraph there must be a line break here. |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1617 } | 1617 } |
| 1618 | 1618 |
| 1619 DEFINE_TRACE(CompositeEditCommand) | 1619 DEFINE_TRACE(CompositeEditCommand) |
| 1620 { | 1620 { |
| 1621 visitor->trace(m_commands); | 1621 visitor->trace(m_commands); |
| 1622 visitor->trace(m_composition); | 1622 visitor->trace(m_composition); |
| 1623 EditCommand::trace(visitor); | 1623 EditCommand::trace(visitor); |
| 1624 } | 1624 } |
| 1625 | 1625 |
| 1626 } // namespace blink | 1626 } // namespace blink |
| OLD | NEW |