当前位置: 首页>>代码示例>>C++>>正文


C++ JSCSSRule类代码示例

本文整理汇总了C++中JSCSSRule的典型用法代码示例。如果您正苦于以下问题:C++ JSCSSRule类的具体用法?C++ JSCSSRule怎么用?C++ JSCSSRule使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了JSCSSRule类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: finalize

void JSCSSRuleOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
{
    JSCSSRule* jsCSSRule = jsCast<JSCSSRule*>(handle.get().asCell());
    DOMWrapperWorld& world = *static_cast<DOMWrapperWorld*>(context);
    uncacheWrapper(world, &jsCSSRule->impl(), jsCSSRule);
    jsCSSRule->releaseImpl();
}
开发者ID:Happy-Ferret,项目名称:webkit.js,代码行数:7,代码来源:JSCSSRule.cpp

示例2: setJSCSSRuleCssText

void setJSCSSRuleCssText(ExecState* exec, JSObject* thisObject, JSValue value)
{
    JSCSSRule* castedThis = static_cast<JSCSSRule*>(thisObject);
    CSSRule* imp = static_cast<CSSRule*>(castedThis->impl());
    ExceptionCode ec = 0;
    imp->setCssText(valueToStringWithNullCheck(exec, value), ec);
    setDOMException(exec, ec);
}
开发者ID:mulriple,项目名称:Webkit-Projects,代码行数:8,代码来源:JSCSSRule.cpp

示例3: isReachableFromOpaqueRoots

bool JSCSSRuleOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
{
    JSCSSRule* jsCSSRule = jsCast<JSCSSRule*>(handle.get().asCell());
    if (!isObservable(jsCSSRule))
        return false;
    void* root = WebCore::root(&jsCSSRule->impl());
    return visitor.containsOpaqueRoot(root);
}
开发者ID:Happy-Ferret,项目名称:webkit.js,代码行数:8,代码来源:JSCSSRule.cpp

示例4: jsCSSRuleParentRule

JSValue jsCSSRuleParentRule(ExecState* exec, JSValue slotBase, const Identifier&)
{
    JSCSSRule* castedThis = static_cast<JSCSSRule*>(asObject(slotBase));
    UNUSED_PARAM(exec);
    CSSRule* imp = static_cast<CSSRule*>(castedThis->impl());
    JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->parentRule()));
    return result;
}
开发者ID:mulriple,项目名称:Webkit-Projects,代码行数:8,代码来源:JSCSSRule.cpp

示例5: jsCSSRuleCssText

JSValue jsCSSRuleCssText(ExecState* exec, JSValue slotBase, const Identifier&)
{
    JSCSSRule* castedThis = static_cast<JSCSSRule*>(asObject(slotBase));
    UNUSED_PARAM(exec);
    CSSRule* imp = static_cast<CSSRule*>(castedThis->impl());
    JSValue result = jsStringOrNull(exec, imp->cssText());
    return result;
}
开发者ID:mulriple,项目名称:Webkit-Projects,代码行数:8,代码来源:JSCSSRule.cpp

示例6: jsCSSRuleType

JSValue jsCSSRuleType(ExecState* exec, JSValue slotBase, const Identifier&)
{
    JSCSSRule* castedThis = static_cast<JSCSSRule*>(asObject(slotBase));
    UNUSED_PARAM(exec);
    CSSRule* imp = static_cast<CSSRule*>(castedThis->impl());
    JSValue result = jsNumber(imp->type());
    return result;
}
开发者ID:mulriple,项目名称:Webkit-Projects,代码行数:8,代码来源:JSCSSRule.cpp

示例7: jsCSSRuleConstructor

EncodedJSValue jsCSSRuleConstructor(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue, PropertyName)
{
    JSCSSRule* domObject = jsDynamicCast<JSCSSRule*>(JSValue::decode(thisValue));
    if (!domObject)
        return throwVMTypeError(exec);
    if (!domObject)
        return throwVMTypeError(exec);
    return JSValue::encode(JSCSSRule::getConstructor(exec->vm(), domObject->globalObject()));
}
开发者ID:Happy-Ferret,项目名称:webkit.js,代码行数:9,代码来源:JSCSSRule.cpp

示例8: visitChildren

void JSCSSRule::visitChildren(JSCell* cell, SlotVisitor& visitor)
{
    JSCSSRule* thisObject = jsCast<JSCSSRule*>(cell);
    ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
    COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag);
    ASSERT(thisObject->structure()->typeInfo().overridesVisitChildren());
    Base::visitChildren(thisObject, visitor);
    visitor.addOpaqueRoot(root(thisObject->impl()));
}
开发者ID:CannedFish,项目名称:deepin-webkit,代码行数:9,代码来源:JSCSSRuleCustom.cpp

示例9: jsCSSRuleParentRule

EncodedJSValue jsCSSRuleParentRule(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
{
    JSCSSRule* castedThis = jsDynamicCast<JSCSSRule*>(JSValue::decode(thisValue));
    UNUSED_PARAM(slotBase);
    if (!castedThis)
        return throwVMTypeError(exec);
    UNUSED_PARAM(exec);
    CSSRule& impl = castedThis->impl();
    JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.parentRule()));
    return JSValue::encode(result);
}
开发者ID:Happy-Ferret,项目名称:webkit.js,代码行数:11,代码来源:JSCSSRule.cpp

示例10: jsCSSRuleCssText

EncodedJSValue jsCSSRuleCssText(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
{
    JSCSSRule* castedThis = jsDynamicCast<JSCSSRule*>(JSValue::decode(thisValue));
    UNUSED_PARAM(slotBase);
    if (!castedThis)
        return throwVMTypeError(exec);
    UNUSED_PARAM(exec);
    CSSRule& impl = castedThis->impl();
    JSValue result = jsStringOrNull(exec, impl.cssText());
    return JSValue::encode(result);
}
开发者ID:Happy-Ferret,项目名称:webkit.js,代码行数:11,代码来源:JSCSSRule.cpp

示例11: setJSCSSRuleCssText

void setJSCSSRuleCssText(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
    JSValue value = JSValue::decode(encodedValue);
    UNUSED_PARAM(exec);
    JSCSSRule* castedThis = jsDynamicCast<JSCSSRule*>(JSValue::decode(thisValue));
    if (!castedThis) {
        throwVMTypeError(exec);
        return;
    }
    CSSRule& impl = castedThis->impl();
    ExceptionCode ec = 0;
    const String& nativeValue(valueToStringWithNullCheck(exec, value));
    if (exec->hadException())
        return;
    impl.setCssText(nativeValue, ec);
    setDOMException(exec, ec);
}
开发者ID:Happy-Ferret,项目名称:webkit.js,代码行数:17,代码来源:JSCSSRule.cpp

示例12: jsCSSRuleConstructor

JSValue jsCSSRuleConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
{
    JSCSSRule* domObject = static_cast<JSCSSRule*>(asObject(slotBase));
    return JSCSSRule::getConstructor(exec, domObject->globalObject());
}
开发者ID:mulriple,项目名称:Webkit-Projects,代码行数:5,代码来源:JSCSSRule.cpp


注:本文中的JSCSSRule类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。