Exemplo n.º 1
0
LayoutState::LayoutState(LayoutObject& root)
    : m_isPaginated(false)
    , m_pageLogicalHeightChanged(false)
    , m_containingBlockLogicalWidthChanged(false)
    , m_flowThread(nullptr)
    , m_next(root.view()->layoutState())
    , m_layoutObject(root)
{
    ASSERT(!m_next);
    // We'll end up pushing in LayoutView itself, so don't bother adding it.
    if (root.isLayoutView())
        return;

    root.view()->pushLayoutState(*this);

    LayoutObject* container = root.container();
    FloatPoint absContentPoint = container->localToAbsolute(FloatPoint(), UseTransforms);
    m_layoutOffset = LayoutSize(absContentPoint.x(), absContentPoint.y());
}