void InlineElementBox::attachLine() { setExtracted(false); if (is<RenderBox>(renderer())) downcast<RenderBox>(renderer()).setInlineBoxWrapper(this); else if (is<RenderLineBreak>(renderer())) downcast<RenderLineBreak>(renderer()).setInlineBoxWrapper(this); }
void InlineElementBox::extractLine() { setExtracted(true); if (is<RenderBox>(renderer())) downcast<RenderBox>(renderer()).setInlineBoxWrapper(nullptr); else if (is<RenderLineBreak>(renderer())) downcast<RenderLineBreak>(renderer()).setInlineBoxWrapper(nullptr); }
void RenderTextLineBoxes::extract(InlineTextBox& box) { checkConsistency(); m_last = box.prevTextBox(); if (&box == m_first) m_first = nullptr; if (box.prevTextBox()) box.prevTextBox()->setNextTextBox(nullptr); box.setPreviousTextBox(nullptr); for (auto current = &box; current; current = current->nextTextBox()) current->setExtracted(); checkConsistency(); }
void RenderTextLineBoxes::attach(InlineTextBox& box) { checkConsistency(); if (m_last) { m_last->setNextTextBox(&box); box.setPreviousTextBox(m_last); } else m_first = &box; InlineTextBox* last = nullptr; for (auto current = &box; current; current = current->nextTextBox()) { current->setExtracted(false); last = current; } m_last = last; checkConsistency(); }