Beispiel #1
0
void CSSToStyleMap::mapFillAttachment(CSSPropertyID, FillLayer& layer, const CSSValue& value)
{
    if (value.isInitialValue()) {
        layer.setAttachment(FillLayer::initialFillAttachment(layer.type()));
        return;
    }

    if (!is<CSSPrimitiveValue>(value))
        return;

    switch (downcast<CSSPrimitiveValue>(value).getValueID()) {
    case CSSValueFixed:
        layer.setAttachment(FixedBackgroundAttachment);
        break;
    case CSSValueScroll:
        layer.setAttachment(ScrollBackgroundAttachment);
        break;
    case CSSValueLocal:
        layer.setAttachment(LocalBackgroundAttachment);
        break;
    default:
        return;
    }
}