OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r
ights reserved. | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r
ights reserved. |
3 * Copyright (C) 2005 Alexey Proskuryakov. | 3 * Copyright (C) 2005 Alexey Proskuryakov. |
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 692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
703 } | 703 } |
704 | 704 |
705 if (m_behavior & TextIteratorCollapseTrailingSpace) { | 705 if (m_behavior & TextIteratorCollapseTrailingSpace) { |
706 if (m_lastTextNode) { | 706 if (m_lastTextNode) { |
707 String str = m_lastTextNode->layoutObject()->text(); | 707 String str = m_lastTextNode->layoutObject()->text(); |
708 if (m_lastTextNodeEndedWithCollapsedSpace && m_offset > 0 && str[m_o
ffset - 1] == ' ') { | 708 if (m_lastTextNodeEndedWithCollapsedSpace && m_offset > 0 && str[m_o
ffset - 1] == ' ') { |
709 spliceBuffer(spaceCharacter, Strategy::parent(*m_lastTextNode),
m_lastTextNode, 1, 1); | 709 spliceBuffer(spaceCharacter, Strategy::parent(*m_lastTextNode),
m_lastTextNode, 1, 1); |
710 return false; | 710 return false; |
711 } | 711 } |
712 } | 712 } |
713 } else if (m_lastTextNodeEndedWithCollapsedSpace) { | 713 } else if (m_lastTextNodeEndedWithCollapsedSpace && !isHTMLIFrameElement(toH
TMLElement(*m_node))) { |
714 spliceBuffer(spaceCharacter, Strategy::parent(*m_lastTextNode), m_lastTe
xtNode, 1, 1); | 714 spliceBuffer(spaceCharacter, Strategy::parent(*m_lastTextNode), m_lastTe
xtNode, 1, 1); |
715 return false; | 715 return false; |
716 } | 716 } |
717 | 717 |
718 if (entersTextControls() && layoutObject->isTextControl()) { | 718 if (entersTextControls() && layoutObject->isTextControl()) { |
719 // The shadow tree should be already visited. | 719 // The shadow tree should be already visited. |
720 return true; | 720 return true; |
721 } | 721 } |
722 | 722 |
723 if (emitsCharactersBetweenAllVisiblePositions()) { | 723 if (emitsCharactersBetweenAllVisiblePositions()) { |
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1203 | 1203 |
1204 String plainText(const EphemeralRangeInFlatTree& range, TextIteratorBehaviorFlag
s behavior) | 1204 String plainText(const EphemeralRangeInFlatTree& range, TextIteratorBehaviorFlag
s behavior) |
1205 { | 1205 { |
1206 return createPlainText<EditingInFlatTreeStrategy>(range, behavior); | 1206 return createPlainText<EditingInFlatTreeStrategy>(range, behavior); |
1207 } | 1207 } |
1208 | 1208 |
1209 template class CORE_TEMPLATE_EXPORT TextIteratorAlgorithm<EditingStrategy>; | 1209 template class CORE_TEMPLATE_EXPORT TextIteratorAlgorithm<EditingStrategy>; |
1210 template class CORE_TEMPLATE_EXPORT TextIteratorAlgorithm<EditingInFlatTreeStrat
egy>; | 1210 template class CORE_TEMPLATE_EXPORT TextIteratorAlgorithm<EditingInFlatTreeStrat
egy>; |
1211 | 1211 |
1212 } // namespace blink | 1212 } // namespace blink |
OLD | NEW |