| 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 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 m_textBox = m_sortedTextBoxes.isEmpty() ? 0 : m_sortedTextBoxes[0]; | 478 m_textBox = m_sortedTextBoxes.isEmpty() ? 0 : m_sortedTextBoxes[0]; |
| 479 } | 479 } |
| 480 | 480 |
| 481 handleTextBox(); | 481 handleTextBox(); |
| 482 return true; | 482 return true; |
| 483 } | 483 } |
| 484 | 484 |
| 485 template<typename Strategy> | 485 template<typename Strategy> |
| 486 void TextIteratorAlgorithm<Strategy>::handleTextBox() | 486 void TextIteratorAlgorithm<Strategy>::handleTextBox() |
| 487 { | 487 { |
| 488 LayoutText* layoutObject = m_firstLetterText ? m_firstLetterText.get() : toL
ayoutText(m_node->layoutObject()); | 488 LayoutText* layoutObject = m_firstLetterText ? m_firstLetterText : toLayoutT
ext(m_node->layoutObject()); |
| 489 | 489 |
| 490 if (layoutObject->style()->visibility() != VISIBLE && !ignoresStyleVisibilit
y()) { | 490 if (layoutObject->style()->visibility() != VISIBLE && !ignoresStyleVisibilit
y()) { |
| 491 m_textBox = nullptr; | 491 m_textBox = nullptr; |
| 492 } else { | 492 } else { |
| 493 String str = layoutObject->text(); | 493 String str = layoutObject->text(); |
| 494 unsigned start = m_offset; | 494 unsigned start = m_offset; |
| 495 unsigned end = (m_node == m_endContainer) ? static_cast<unsigned>(m_endO
ffset) : INT_MAX; | 495 unsigned end = (m_node == m_endContainer) ? static_cast<unsigned>(m_endO
ffset) : INT_MAX; |
| 496 while (m_textBox) { | 496 while (m_textBox) { |
| 497 unsigned textBoxStart = m_textBox->start(); | 497 unsigned textBoxStart = m_textBox->start(); |
| 498 unsigned runStart = std::max(textBoxStart, start); | 498 unsigned runStart = std::max(textBoxStart, start); |
| (...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1101 | 1101 |
| 1102 String plainText(const PositionInComposedTree& start, const PositionInComposedTr
ee& end, TextIteratorBehaviorFlags behavior) | 1102 String plainText(const PositionInComposedTree& start, const PositionInComposedTr
ee& end, TextIteratorBehaviorFlags behavior) |
| 1103 { | 1103 { |
| 1104 return createPlainText<EditingInComposedTreeStrategy>(start, end, behavior); | 1104 return createPlainText<EditingInComposedTreeStrategy>(start, end, behavior); |
| 1105 } | 1105 } |
| 1106 | 1106 |
| 1107 template class CORE_TEMPLATE_EXPORT TextIteratorAlgorithm<EditingStrategy>; | 1107 template class CORE_TEMPLATE_EXPORT TextIteratorAlgorithm<EditingStrategy>; |
| 1108 template class CORE_TEMPLATE_EXPORT TextIteratorAlgorithm<EditingInComposedTreeS
trategy>; | 1108 template class CORE_TEMPLATE_EXPORT TextIteratorAlgorithm<EditingInComposedTreeS
trategy>; |
| 1109 | 1109 |
| 1110 } // namespace blink | 1110 } // namespace blink |
| OLD | NEW |