void RenderTextLineBoxes::remove(InlineTextBox& box) { checkConsistency(); if (&box == m_first) m_first = box.nextTextBox(); if (&box == m_last) m_last = box.prevTextBox(); if (box.nextTextBox()) box.nextTextBox()->setPreviousTextBox(box.prevTextBox()); if (box.prevTextBox()) box.prevTextBox()->setNextTextBox(box.nextTextBox()); checkConsistency(); }
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(); }