本文整理汇总了C++中StyleSheet::parentStyleSheet方法的典型用法代码示例。如果您正苦于以下问题:C++ StyleSheet::parentStyleSheet方法的具体用法?C++ StyleSheet::parentStyleSheet怎么用?C++ StyleSheet::parentStyleSheet使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StyleSheet
的用法示例。
在下文中一共展示了StyleSheet::parentStyleSheet方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: parentStyleSheetAttrGetter
static v8::Handle<v8::Value> parentStyleSheetAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
StyleSheet* imp = V8StyleSheet::toNative(info.Holder());
RefPtr<StyleSheet> result = imp->parentStyleSheet();
v8::Handle<v8::Value> wrapper = result.get() ? v8::Handle<v8::Value>(DOMDataStore::getWrapper(result.get(), info.GetIsolate())) : v8Undefined();
if (wrapper.IsEmpty()) {
wrapper = toV8(result.get(), info.Holder(), info.GetIsolate());
if (!wrapper.IsEmpty())
V8DOMWrapper::setNamedHiddenReference(info.Holder(), "parentStyleSheet", wrapper);
}
return wrapper;
}
示例2: parentStyleSheetAttrGetter
static v8::Handle<v8::Value> parentStyleSheetAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.StyleSheet.parentStyleSheet._get");
StyleSheet* imp = V8StyleSheet::toNative(info.Holder());
RefPtr<StyleSheet> result = imp->parentStyleSheet();
v8::Handle<v8::Value> wrapper = result.get() ? getDOMObjectMap().get(result.get()) : v8::Handle<v8::Value>();
if (wrapper.IsEmpty()) {
wrapper = toV8(result.get());
if (!wrapper.IsEmpty())
V8DOMWrapper::setHiddenReference(info.Holder(), wrapper);
}
return wrapper;
}
示例3: getValueProperty
JSValue* JSStyleSheet::getValueProperty(ExecState* exec, int token) const
{
switch (token) {
case TypeAttrNum: {
StyleSheet* imp = static_cast<StyleSheet*>(impl());
return jsStringOrNull(exec, imp->type());
}
case DisabledAttrNum: {
StyleSheet* imp = static_cast<StyleSheet*>(impl());
return jsBoolean(imp->disabled());
}
case OwnerNodeAttrNum: {
StyleSheet* imp = static_cast<StyleSheet*>(impl());
return toJS(exec, WTF::getPtr(imp->ownerNode()));
}
case ParentStyleSheetAttrNum: {
StyleSheet* imp = static_cast<StyleSheet*>(impl());
return toJS(exec, WTF::getPtr(imp->parentStyleSheet()));
}
case HrefAttrNum: {
StyleSheet* imp = static_cast<StyleSheet*>(impl());
return jsStringOrNull(exec, imp->href());
}
case TitleAttrNum: {
StyleSheet* imp = static_cast<StyleSheet*>(impl());
return jsStringOrNull(exec, imp->title());
}
case MediaAttrNum: {
StyleSheet* imp = static_cast<StyleSheet*>(impl());
return toJS(exec, WTF::getPtr(imp->media()));
}
case ConstructorAttrNum:
return getConstructor(exec);
}
return 0;
}