本文整理汇总了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();
}
示例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);
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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()));
}
示例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()));
}
示例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);
}
示例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);
}
示例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);
}
示例12: jsCSSRuleConstructor
JSValue jsCSSRuleConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
{
JSCSSRule* domObject = static_cast<JSCSSRule*>(asObject(slotBase));
return JSCSSRule::getConstructor(exec, domObject->globalObject());
}