| 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 1711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1722 | 1722 |
| 1723 HTMLBRElement* br = HTMLBRElement::Create(GetDocument()); | 1723 HTMLBRElement* br = HTMLBRElement::Create(GetDocument()); |
| 1724 // We want to replace this quoted paragraph with an unquoted one, so insert a | 1724 // We want to replace this quoted paragraph with an unquoted one, so insert a |
| 1725 // br to hold the caret before the highest blockquote. | 1725 // br to hold the caret before the highest blockquote. |
| 1726 InsertNodeBefore(br, highest_blockquote, editing_state); | 1726 InsertNodeBefore(br, highest_blockquote, editing_state); |
| 1727 if (editing_state->IsAborted()) | 1727 if (editing_state->IsAborted()) |
| 1728 return false; | 1728 return false; |
| 1729 | 1729 |
| 1730 GetDocument().UpdateStyleAndLayoutIgnorePendingStylesheets(); | 1730 GetDocument().UpdateStyleAndLayoutIgnorePendingStylesheets(); |
| 1731 | 1731 |
| 1732 VisiblePosition at_br = VisiblePosition::BeforeNode(br); | 1732 VisiblePosition at_br = VisiblePosition::BeforeNode(*br); |
| 1733 // If the br we inserted collapsed, for example: | 1733 // If the br we inserted collapsed, for example: |
| 1734 // foo<br><blockquote>...</blockquote> | 1734 // foo<br><blockquote>...</blockquote> |
| 1735 // insert a second one. | 1735 // insert a second one. |
| 1736 if (!IsStartOfParagraph(at_br)) { | 1736 if (!IsStartOfParagraph(at_br)) { |
| 1737 InsertNodeBefore(HTMLBRElement::Create(GetDocument()), br, editing_state); | 1737 InsertNodeBefore(HTMLBRElement::Create(GetDocument()), br, editing_state); |
| 1738 if (editing_state->IsAborted()) | 1738 if (editing_state->IsAborted()) |
| 1739 return false; | 1739 return false; |
| 1740 GetDocument().UpdateStyleAndLayoutIgnorePendingStylesheets(); | 1740 GetDocument().UpdateStyleAndLayoutIgnorePendingStylesheets(); |
| 1741 } | 1741 } |
| 1742 SetEndingSelection(SelectionInDOMTree::Builder() | 1742 SetEndingSelection(SelectionInDOMTree::Builder() |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1974 | 1974 |
| 1975 DEFINE_TRACE(CompositeEditCommand) { | 1975 DEFINE_TRACE(CompositeEditCommand) { |
| 1976 visitor->Trace(commands_); | 1976 visitor->Trace(commands_); |
| 1977 visitor->Trace(starting_selection_); | 1977 visitor->Trace(starting_selection_); |
| 1978 visitor->Trace(ending_selection_); | 1978 visitor->Trace(ending_selection_); |
| 1979 visitor->Trace(undo_step_); | 1979 visitor->Trace(undo_step_); |
| 1980 EditCommand::Trace(visitor); | 1980 EditCommand::Trace(visitor); |
| 1981 } | 1981 } |
| 1982 | 1982 |
| 1983 } // namespace blink | 1983 } // namespace blink |
| OLD | NEW |