RenderedPosition::RenderedPosition(const VisiblePosition& position) : m_layoutObject(nullptr) , m_inlineBox(nullptr) , m_offset(0) , m_prevLeafChild(uncachedInlineBox()) , m_nextLeafChild(uncachedInlineBox()) { if (position.isNull()) return; InlineBoxPosition boxPosition = position.computeInlineBoxPosition(); m_inlineBox = boxPosition.inlineBox; m_offset = boxPosition.offsetInBox; if (m_inlineBox) m_layoutObject = &m_inlineBox->layoutObject(); else m_layoutObject = layoutObjectFromPosition(position.deepEquivalent()); }