| 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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 if (!endingSelection().isContentRichlyEditable()) { | 182 if (!endingSelection().isContentRichlyEditable()) { |
| 183 switch (editingAction()) { | 183 switch (editingAction()) { |
| 184 case EditActionTyping: | 184 case EditActionTyping: |
| 185 case EditActionPaste: | 185 case EditActionPaste: |
| 186 case EditActionDrag: | 186 case EditActionDrag: |
| 187 case EditActionSetWritingDirection: | 187 case EditActionSetWritingDirection: |
| 188 case EditActionCut: | 188 case EditActionCut: |
| 189 case EditActionUnspecified: | 189 case EditActionUnspecified: |
| 190 break; | 190 break; |
| 191 default: | 191 default: |
| 192 ASSERT_NOT_REACHED(); | 192 NOTREACHED(); |
| 193 return false; | 193 return false; |
| 194 } | 194 } |
| 195 } | 195 } |
| 196 ensureComposition(); | 196 ensureComposition(); |
| 197 | 197 |
| 198 // Changes to the document may have been made since the last editing operati
on that require a layout, as in <rdar://problem/5658603>. | 198 // Changes to the document may have been made since the last editing operati
on that require a layout, as in <rdar://problem/5658603>. |
| 199 // Low level operations, like RemoveNodeCommand, don't require a layout beca
use the high level operations that use them perform one | 199 // Low level operations, like RemoveNodeCommand, don't require a layout beca
use the high level operations that use them perform one |
| 200 // if one is necessary (like for the creation of VisiblePositions). | 200 // if one is necessary (like for the creation of VisiblePositions). |
| 201 document().updateStyleAndLayoutIgnorePendingStylesheets(); | 201 document().updateStyleAndLayoutIgnorePendingStylesheets(); |
| 202 | 202 |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 574 } | 574 } |
| 575 | 575 |
| 576 Position CompositeEditCommand::positionOutsideTabSpan(const Position& pos) | 576 Position CompositeEditCommand::positionOutsideTabSpan(const Position& pos) |
| 577 { | 577 { |
| 578 if (!isTabHTMLSpanElementTextNode(pos.anchorNode())) | 578 if (!isTabHTMLSpanElementTextNode(pos.anchorNode())) |
| 579 return pos; | 579 return pos; |
| 580 | 580 |
| 581 switch (pos.anchorType()) { | 581 switch (pos.anchorType()) { |
| 582 case PositionAnchorType::BeforeChildren: | 582 case PositionAnchorType::BeforeChildren: |
| 583 case PositionAnchorType::AfterChildren: | 583 case PositionAnchorType::AfterChildren: |
| 584 ASSERT_NOT_REACHED(); | 584 NOTREACHED(); |
| 585 return pos; | 585 return pos; |
| 586 case PositionAnchorType::OffsetInAnchor: | 586 case PositionAnchorType::OffsetInAnchor: |
| 587 break; | 587 break; |
| 588 case PositionAnchorType::BeforeAnchor: | 588 case PositionAnchorType::BeforeAnchor: |
| 589 return Position::inParentBeforeNode(*pos.anchorNode()); | 589 return Position::inParentBeforeNode(*pos.anchorNode()); |
| 590 case PositionAnchorType::AfterAnchor: | 590 case PositionAnchorType::AfterAnchor: |
| 591 return Position::inParentAfterNode(*pos.anchorNode()); | 591 return Position::inParentAfterNode(*pos.anchorNode()); |
| 592 } | 592 } |
| 593 | 593 |
| 594 HTMLSpanElement* tabSpan = tabSpanElement(pos.computeContainerNode()); | 594 HTMLSpanElement* tabSpan = tabSpanElement(pos.computeContainerNode()); |
| (...skipping 1022 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 |