bool SimplifiedBackwardsTextIteratorAlgorithm<Strategy>::handleTextNode() { int startOffset; int offsetInNode; LayoutText* layoutObject = handleFirstLetter(startOffset, offsetInNode); if (!layoutObject) return true; String text = layoutObject->text(); if (!layoutObject->firstTextBox() && text.length() > 0) return true; m_positionEndOffset = m_offset; m_offset = startOffset + offsetInNode; m_positionNode = m_node; m_positionStartOffset = m_offset; ASSERT(0 <= m_positionStartOffset - offsetInNode && m_positionStartOffset - offsetInNode <= static_cast<int>(text.length())); ASSERT(1 <= m_positionEndOffset - offsetInNode && m_positionEndOffset - offsetInNode <= static_cast<int>(text.length())); ASSERT(m_positionStartOffset <= m_positionEndOffset); m_textLength = m_positionEndOffset - m_positionStartOffset; m_textOffset = m_positionStartOffset - offsetInNode; m_textContainer = text; m_singleCharacterBuffer = 0; RELEASE_ASSERT(static_cast<unsigned>(m_textOffset + m_textLength) <= text.length()); return !m_shouldHandleFirstLetter; }
static inline void writeSVGInlineTextBoxes(TextStream& ts, const LayoutText& text, int indent) { for (InlineTextBox* box = text.firstTextBox(); box; box = box->nextTextBox()) { if (!box->isSVGInlineTextBox()) continue; writeSVGInlineTextBox(ts, toSVGInlineTextBox(box), indent); } }