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


C++ JSHTMLElement::impl方法代码示例

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


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

示例1: runtimeObjectGetter

JSValue runtimeObjectGetter(ExecState* exec, const Identifier&, const PropertySlot& slot)
{
    JSHTMLElement* thisObj = static_cast<JSHTMLElement*>(asObject(slot.slotBase()));
    HTMLElement* element = static_cast<HTMLElement*>(thisObj->impl());
    RuntimeObjectImp* runtimeObject = getRuntimeObject(exec, element);
    return runtimeObject ? runtimeObject : jsUndefined();
}
开发者ID:flwh,项目名称:Alcatel_OT_985_kernel,代码行数:7,代码来源:JSPluginElementFunctions.cpp

示例2: jsHTMLElementInnerHTML

JSValue jsHTMLElementInnerHTML(ExecState* exec, JSValue slotBase, const Identifier&)
{
    JSHTMLElement* castedThis = static_cast<JSHTMLElement*>(asObject(slotBase));
    UNUSED_PARAM(exec);
    HTMLElement* imp = static_cast<HTMLElement*>(castedThis->impl());
    JSValue result = jsString(exec, imp->innerHTML());
#ifdef JSC_TAINTED
    if (imp->tainted()) {
        unsigned int tainted = imp->tainted();
        result.setTainted(imp->tainted());

        TaintedStructure trace_struct;
        trace_struct.taintedno = tainted;
        trace_struct.internalfunc = "jsHTMLElementInnerHTML";
        trace_struct.jsfunc = "htmlelement.innerHTML";
        trace_struct.action = "propagate";

	char msg[20];
	stringstream msgss;
	snprintf(msg, 20, "%s", result.toString(exec).utf8(true).data());
	msgss << msg;
	msgss >> trace_struct.value;

        TaintedTrace* trace = TaintedTrace::getInstance();
        trace->addTaintedTrace(trace_struct);
    }
开发者ID:dmitris,项目名称:tpjs,代码行数:26,代码来源:JSHTMLElement.cpp

示例3: jsHTMLElementChildren

JSValue jsHTMLElementChildren(ExecState* exec, JSValue slotBase, const Identifier&)
{
    JSHTMLElement* castedThis = static_cast<JSHTMLElement*>(asObject(slotBase));
    UNUSED_PARAM(exec);
    HTMLElement* imp = static_cast<HTMLElement*>(castedThis->impl());
    JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->children()));
    return result;
}
开发者ID:dpnishant,项目名称:tpjs,代码行数:8,代码来源:JSHTMLElement.cpp

示例4: jsHTMLElementHidden

JSValue jsHTMLElementHidden(ExecState* exec, JSValue slotBase, const Identifier&)
{
    JSHTMLElement* castedThis = static_cast<JSHTMLElement*>(asObject(slotBase));
    UNUSED_PARAM(exec);
    HTMLElement* imp = static_cast<HTMLElement*>(castedThis->impl());
    JSValue result = jsBoolean(imp->hasAttribute(WebCore::HTMLNames::hiddenAttr));
    return result;
}
开发者ID:dpnishant,项目名称:tpjs,代码行数:8,代码来源:JSHTMLElement.cpp

示例5: setJSHTMLElementContentEditable

void setJSHTMLElementContentEditable(ExecState* exec, JSObject* thisObject, JSValue value)
{
    JSHTMLElement* castedThis = static_cast<JSHTMLElement*>(thisObject);
    HTMLElement* imp = static_cast<HTMLElement*>(castedThis->impl());
    ExceptionCode ec = 0;
    imp->setContentEditable(valueToStringWithNullCheck(exec, value), ec);
    setDOMException(exec, ec);
}
开发者ID:dpnishant,项目名称:tpjs,代码行数:8,代码来源:JSHTMLElement.cpp

示例6: jsHTMLElementTabIndex

JSValue jsHTMLElementTabIndex(ExecState* exec, JSValue slotBase, const Identifier&)
{
    JSHTMLElement* castedThis = static_cast<JSHTMLElement*>(asObject(slotBase));
    UNUSED_PARAM(exec);
    HTMLElement* imp = static_cast<HTMLElement*>(castedThis->impl());
    JSValue result = jsNumber(imp->tabIndex());
    return result;
}
开发者ID:dpnishant,项目名称:tpjs,代码行数:8,代码来源:JSHTMLElement.cpp

示例7: jsHTMLElementClassName

JSValue jsHTMLElementClassName(ExecState* exec, JSValue slotBase, const Identifier&)
{
    JSHTMLElement* castedThis = static_cast<JSHTMLElement*>(asObject(slotBase));
    UNUSED_PARAM(exec);
    HTMLElement* imp = static_cast<HTMLElement*>(castedThis->impl());
    JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::classAttr));
    return result;
}
开发者ID:dpnishant,项目名称:tpjs,代码行数:8,代码来源:JSHTMLElement.cpp

示例8: jsHTMLElementContentEditable

JSValue jsHTMLElementContentEditable(ExecState* exec, JSValue slotBase, const Identifier&)
{
    JSHTMLElement* castedThis = static_cast<JSHTMLElement*>(asObject(slotBase));
    UNUSED_PARAM(exec);
    HTMLElement* imp = static_cast<HTMLElement*>(castedThis->impl());
    JSValue result = jsString(exec, imp->contentEditable());
    return result;
}
开发者ID:dpnishant,项目名称:tpjs,代码行数:8,代码来源:JSHTMLElement.cpp

示例9: jsHTMLElementSpellcheck

JSValue jsHTMLElementSpellcheck(ExecState* exec, JSValue slotBase, const Identifier&)
{
    JSHTMLElement* castedThis = static_cast<JSHTMLElement*>(asObject(slotBase));
    UNUSED_PARAM(exec);
    HTMLElement* imp = static_cast<HTMLElement*>(castedThis->impl());
    JSValue result = jsBoolean(imp->spellcheck());
    return result;
}
开发者ID:dpnishant,项目名称:tpjs,代码行数:8,代码来源:JSHTMLElement.cpp

示例10: nameGetter

JSValue* JSHTMLFrameSetElement::nameGetter(ExecState* exec, const Identifier& propertyName, const PropertySlot& slot)
{
    JSHTMLElement* thisObj = static_cast<JSHTMLElement*>(slot.slotBase());
    HTMLElement* element = static_cast<HTMLElement*>(thisObj->impl());

    Node* frame = element->children()->namedItem(propertyName);
    if (Document* doc = static_cast<HTMLFrameElement*>(frame)->contentDocument()) {
        if (JSDOMWindowShell* window = toJSDOMWindowShell(doc->frame()))
            return window;
    }

    return jsUndefined();
}
开发者ID:Chingliu,项目名称:EAWebkit,代码行数:13,代码来源:JSHTMLFrameSetElementCustom.cpp

示例11: nameGetter

JSValue JSHTMLFrameSetElement::nameGetter(ExecState* exec, JSValue slotBase, const Identifier& propertyName)
{
    JSHTMLElement* thisObj = static_cast<JSHTMLElement*>(asObject(slotBase));
    HTMLElement* element = static_cast<HTMLElement*>(thisObj->impl());

    Node* frame = element->children()->namedItem(identifierToAtomicString(propertyName));
    if (Document* doc = static_cast<HTMLFrameElement*>(frame)->contentDocument()) {
        if (JSDOMWindowShell* window = toJSDOMWindowShell(doc->frame(), currentWorld(exec)))
            return window;
    }

    return jsUndefined();
}
开发者ID:achellies,项目名称:WinCEWebKit,代码行数:13,代码来源:JSHTMLFrameSetElementCustom.cpp

示例12: nameGetter

JSValue JSHTMLFormElement::nameGetter(ExecState* exec, const Identifier& propertyName, const PropertySlot& slot)
{
    JSHTMLElement* jsForm = static_cast<JSHTMLFormElement*>(asObject(slot.slotBase()));
    HTMLFormElement* form = static_cast<HTMLFormElement*>(jsForm->impl());

    Vector<RefPtr<Node> > namedItems;
    form->getNamedElements(propertyName, namedItems);
    
    if (namedItems.isEmpty())
        return jsUndefined();
    if (namedItems.size() == 1)
        return toJS(exec, namedItems[0].get());

    // FIXME: HTML5 specifies that this should be a RadioNodeList.
    return toJS(exec, jsForm->globalObject(), StaticNodeList::adopt(namedItems).get());
}
开发者ID:325116067,项目名称:semc-qsd8x50,代码行数:16,代码来源:JSHTMLFormElementCustom.cpp

示例13: nameGetter

JSValue JSHTMLFormElement::nameGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName)
{
    JSHTMLElement* jsForm = jsCast<JSHTMLFormElement*>(asObject(slotBase));
    HTMLFormElement* form = toHTMLFormElement(jsForm->impl());

    Vector<RefPtr<Node> > namedItems;
    form->getNamedElements(propertyNameToAtomicString(propertyName), namedItems);
    
    if (namedItems.isEmpty())
        return jsUndefined();
    if (namedItems.size() == 1)
        return toJS(exec, jsForm->globalObject(), namedItems[0].get());

    // FIXME: HTML5 specifies that this should be a RadioNodeList.
    return toJS(exec, jsForm->globalObject(), StaticNodeList::adopt(namedItems).get());
}
开发者ID:KnightSwarm,项目名称:WebKitTi,代码行数:16,代码来源:JSHTMLFormElementCustom.cpp

示例14: setJSHTMLElementOuterText

void setJSHTMLElementOuterText(ExecState* exec, JSObject* thisObject, JSValue value)
{
#if defined(JSC_TAINTED)
    unsigned int tainted = TaintedUtils::isTainted(exec, value);
#endif
    JSHTMLElement* castedThis = static_cast<JSHTMLElement*>(thisObject);
    HTMLElement* imp = static_cast<HTMLElement*>(castedThis->impl());
    ExceptionCode ec = 0;
    imp->setOuterText(valueToStringWithNullCheck(exec, value), ec);
    setDOMException(exec, ec);
#if defined(JSC_TAINTED)
    unsigned int imp_tainted = imp->tainted();

    if (tainted) {
    	imp->setTainted(tainted);
	imp->document()->setTainted(tainted);

	TaintedStructure trace_struct;
	trace_struct.taintedno = tainted;
	trace_struct.internalfunc = "setJSHTMLElementOuterText";
	trace_struct.jsfunc = "HTMLElement.outerText";
	trace_struct.action = "sink";
	trace_struct.value = TaintedUtils::UString2string(value.toString(exec));

	TaintedTrace* trace = TaintedTrace::getInstance();
	trace->addTaintedTrace(trace_struct);

    } else if (imp_tainted == imp->document()->tainted() 
	&& imp_tainted != 0
	&& !tainted) {

	TaintedStructure trace_struct;
	trace_struct.taintedno = 0;
	// trace_struct.taintedno = tainted;
	trace_struct.internalfunc = "setJSHTMLElementOuterText";
	trace_struct.jsfunc = "HTMLElement.outerText";
	trace_struct.action = "reset";
	trace_struct.value = TaintedUtils::UString2string(value.toString(exec));

	TaintedTrace* trace = TaintedTrace::getInstance();
	trace->addTaintedTrace(trace_struct);

    	imp->setTainted(0);
    }
#endif
}
开发者ID:dpnishant,项目名称:tpjs,代码行数:46,代码来源:JSHTMLElement.cpp

示例15: jsHTMLElementPrototypeFunctionInsertAdjacentText

EncodedJSValue JSC_HOST_CALL jsHTMLElementPrototypeFunctionInsertAdjacentText(ExecState* exec)
{
    JSValue thisValue = exec->hostThisValue();
    if (!thisValue.inherits(&JSHTMLElement::s_info))
        return throwVMTypeError(exec);
    JSHTMLElement* castedThis = static_cast<JSHTMLElement*>(asObject(thisValue));
    HTMLElement* imp = static_cast<HTMLElement*>(castedThis->impl());
    ExceptionCode ec = 0;
    const String& where(ustringToString(exec->argument(0).toString(exec)));
    if (exec->hadException())
        return JSValue::encode(jsUndefined());
    const String& text(ustringToString(exec->argument(1).toString(exec)));
    if (exec->hadException())
        return JSValue::encode(jsUndefined());

    imp->insertAdjacentText(where, text, ec);
    setDOMException(exec, ec);
    return JSValue::encode(jsUndefined());
}
开发者ID:dpnishant,项目名称:tpjs,代码行数:19,代码来源:JSHTMLElement.cpp


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