Ejemplo n.º 1
0
LayoutState::LayoutState(RenderObject* root)
    : m_clipped(false)
{
    RenderObject* container = root->container();
    int x = 0;
    int y = 0;
    container->absolutePositionForContent(x, y);
    m_offset = IntSize(x, y);
    m_next = 0;
}
Ejemplo n.º 2
0
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);
        }
    }
}