void RenderInline::absoluteRects(QValueList<QRect>& rects, int _tx, int _ty) { for (InlineRunBox* curr = firstLineBox(); curr; curr = curr->nextLineBox()) rects.append(QRect(_tx + curr->xPos(), _ty + curr->yPos(), curr->width(), curr->height())); for (RenderObject* curr = firstChild(); curr; curr = curr->nextSibling()) if (!curr->isText()) curr->absoluteRects(rects, _tx + curr->xPos(), _ty + curr->yPos()); if (continuation()) continuation()->absoluteRects(rects, _tx - containingBlock()->xPos() + continuation()->xPos(), _ty - containingBlock()->yPos() + continuation()->yPos()); }
void RenderInline::absoluteRects(Vector<IntRect>& rects, int tx, int ty, bool topLevel) { for (InlineRunBox* curr = firstLineBox(); curr; curr = curr->nextLineBox()) rects.append(IntRect(tx + curr->xPos(), ty + curr->yPos(), curr->width(), curr->height())); for (RenderObject* curr = firstChild(); curr; curr = curr->nextSibling()) { if (!curr->isText()) curr->absoluteRects(rects, tx + curr->xPos(), ty + curr->yPos(), false); } if (continuation() && topLevel) continuation()->absoluteRects(rects, tx - containingBlock()->xPos() + continuation()->xPos(), ty - containingBlock()->yPos() + continuation()->yPos(), topLevel); }
void RenderContainer::addLineBoxRects(Vector<IntRect>& rects, unsigned start, unsigned end, bool) { if (!children()->firstChild() && (isInline() || isAnonymousBlock())) { FloatPoint absPos = localToAbsolute(FloatPoint()); absoluteRects(rects, absPos.x(), absPos.y()); return; } if (!children()->firstChild()) return; unsigned offset = start; for (RenderObject* child = childAt(start); child && offset < end; child = child->nextSibling(), ++offset) { if (child->isText() || child->isInline() || child->isAnonymousBlock()) { FloatPoint absPos = child->localToAbsolute(FloatPoint()); child->absoluteRects(rects, absPos.x(), absPos.y()); } } }
void RenderContainer::addLineBoxRects(Vector<IntRect>& rects, unsigned start, unsigned end, bool) { if (!m_firstChild && (isInline() || isAnonymousBlock())) { int x, y; absolutePositionForContent(x, y); absoluteRects(rects, x, y); return; } if (!m_firstChild) return; unsigned offset = start; for (RenderObject* child = childAt(start); child && offset < end; child = child->nextSibling(), ++offset) { if (child->isText() || child->isInline() || child->isAnonymousBlock()) { int x, y; child->absolutePositionForContent(x, y); child->absoluteRects(rects, x, y); } } }