コード例 #1
0
bool DeferredLegacyStyleInterpolation::interpolationRequiresStyleResolve(const CSSQuadValue& quad)
{
    return interpolationRequiresStyleResolve(*quad.top())
        || interpolationRequiresStyleResolve(*quad.right())
        || interpolationRequiresStyleResolve(*quad.bottom())
        || interpolationRequiresStyleResolve(*quad.left());
}
コード例 #2
0
void CSSToStyleMap::mapNinePieceImageSlice(StyleResolverState&, const CSSValue& value, NinePieceImage& image)
{
    if (!value.isBorderImageSliceValue())
        return;

    // Retrieve the border image value.
    const CSSBorderImageSliceValue& borderImageSlice = toCSSBorderImageSliceValue(value);

    // Set up a length box to represent our image slices.
    LengthBox box;
    CSSQuadValue* slices = borderImageSlice.slices();
    box.m_top = convertBorderImageSliceSide(*slices->top());
    box.m_bottom = convertBorderImageSliceSide(*slices->bottom());
    box.m_left = convertBorderImageSliceSide(*slices->left());
    box.m_right = convertBorderImageSliceSide(*slices->right());
    image.setImageSlices(box);

    // Set our fill mode.
    image.setFill(borderImageSlice.m_fill);
}
コード例 #3
0
ファイル: CSSToStyleMap.cpp プロジェクト: techtonik/chromium
void CSSToStyleMap::mapNinePieceImageSlice(StyleResolverState&, const CSSValue& value, NinePieceImage& image)
{
    if (!value.isBorderImageSliceValue())
        return;

    // Retrieve the border image value.
    const CSSBorderImageSliceValue& borderImageSlice = toCSSBorderImageSliceValue(value);

    // Set up a length box to represent our image slices.
    LengthBox box;
    CSSQuadValue* slices = borderImageSlice.slices();
    if (slices->top()->isPercentage())
        box.m_top = Length(slices->top()->getDoubleValue(), Percent);
    else
        box.m_top = Length(slices->top()->getIntValue(), Fixed);
    if (slices->bottom()->isPercentage())
        box.m_bottom = Length(slices->bottom()->getDoubleValue(), Percent);
    else
        box.m_bottom = Length(slices->bottom()->getIntValue(), Fixed);
    if (slices->left()->isPercentage())
        box.m_left = Length(slices->left()->getDoubleValue(), Percent);
    else
        box.m_left = Length(slices->left()->getIntValue(), Fixed);
    if (slices->right()->isPercentage())
        box.m_right = Length(slices->right()->getDoubleValue(), Percent);
    else
        box.m_right = Length(slices->right()->getIntValue(), Fixed);
    image.setImageSlices(box);

    // Set our fill mode.
    image.setFill(borderImageSlice.m_fill);
}