bool DeferredLegacyStyleInterpolation::interpolationRequiresStyleResolve(const CSSValue& value)
{
    switch (value.cssValueType()) {
    case CSSValue::CSS_INHERIT:
        return true;
    case CSSValue::CSS_PRIMITIVE_VALUE:
        return interpolationRequiresStyleResolve(toCSSPrimitiveValue(value));
    case CSSValue::CSS_VALUE_LIST:
        return interpolationRequiresStyleResolve(toCSSValueList(value));
    case CSSValue::CSS_CUSTOM:
        if (value.isImageValue())
            return interpolationRequiresStyleResolve(toCSSImageValue(value));
        if (value.isShadowValue())
            return interpolationRequiresStyleResolve(toCSSShadowValue(value));
        if (value.isSVGDocumentValue())
            return interpolationRequiresStyleResolve(toCSSSVGDocumentValue(value));
        // FIXME: consider other custom types.
        return true;
    case CSSValue::CSS_INITIAL:
        // FIXME: should not require resolving styles for initial.
        return true;
    default:
        ASSERT_NOT_REACHED();
        return true;
    }
}
Ejemplo n.º 2
0
JSValue jsCSSValueCssValueType(ExecState* exec, JSValue slotBase, const Identifier&)
{
    JSCSSValue* castedThis = static_cast<JSCSSValue*>(asObject(slotBase));
    UNUSED_PARAM(exec);
    CSSValue* imp = static_cast<CSSValue*>(castedThis->impl());
    JSValue result = jsNumber(exec, imp->cssValueType());
    return result;
}
Ejemplo n.º 3
0
static v8::Handle<v8::Value> cssValueTypeAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
    INC_STATS("DOM.CSSValue.cssValueType._get");
    CSSValue* imp = V8CSSValue::toNative(info.Holder());
    return v8::Integer::New(imp->cssValueType());
}