void LayoutTextFragment::updateHitTestResult(HitTestResult& result, const LayoutPoint& point) { if (result.innerNode()) return; LayoutObject::updateHitTestResult(result, point); // If we aren't part of a first-letter element, or if we // are part of first-letter but we're the remaining text then return. if (m_isRemainingTextLayoutObject || !firstLetterPseudoElement()) return; result.setInnerNode(firstLetterPseudoElement()); }
void LayoutTextFragment::setText(PassRefPtr<StringImpl> text, bool force) { LayoutText::setText(std::move(text), force); m_start = 0; m_fragmentLength = textLength(); // If we're the remaining text from a first letter then we have to tell the // first letter pseudo element to reattach itself so it can re-calculate the // correct first-letter settings. if (isRemainingTextLayoutObject()) { ASSERT(firstLetterPseudoElement()); firstLetterPseudoElement()->updateTextFragments(); } }