コード例 #1
0
LayoutUnit ShapeOutsideInfo::logicalLeftOffset() const
{
    switch (referenceBox(*m_renderer.style()->shapeOutside())) {
    case MarginBox: return -m_renderer.marginStart(m_renderer.containingBlock()->style());
    case BorderBox: return LayoutUnit();
    case PaddingBox: return borderStartWithStyleForWritingMode(m_renderer, m_renderer.containingBlock()->style());
    case ContentBox: return borderAndPaddingStartWithStyleForWritingMode(m_renderer, m_renderer.containingBlock()->style());
    case BoxMissing: break;
    }

    ASSERT_NOT_REACHED();
    return LayoutUnit();
}
コード例 #2
0
ファイル: ShapeInfo.cpp プロジェクト: boska/webkit
LayoutUnit ShapeInfo<RenderType>::logicalLeftOffset() const
{
    if (m_renderer.isRenderRegion())
        return LayoutUnit();

    switch (referenceBox()) {
    case MarginBox: return -m_renderer.marginStart(&styleForWritingMode());
    case BorderBox: return LayoutUnit();
    case PaddingBox: return borderStartWithStyleForWritingMode(m_renderer, styleForWritingMode());
    case ContentBox: return borderAndPaddingStartWithStyleForWritingMode(m_renderer, styleForWritingMode());
    case Fill: break;
    case Stroke: break;
    case ViewBox: break;
    case BoxMissing: break;
    }

    ASSERT_NOT_REACHED();
    return LayoutUnit();
}