Ejemplo n.º 1
0
JSValue jsHTMLHRElementWidth(ExecState* exec, JSValue slotBase, const Identifier&)
{
    JSHTMLHRElement* castedThis = static_cast<JSHTMLHRElement*>(asObject(slotBase));
    UNUSED_PARAM(exec);
    HTMLHRElement* imp = static_cast<HTMLHRElement*>(castedThis->impl());
    JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::widthAttr));
    return result;
}
Ejemplo n.º 2
0
static void noShadeAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
    INC_STATS("DOM.HTMLHRElement.noShade._set");
    HTMLHRElement* imp = V8HTMLHRElement::toNative(info.Holder());
    bool v = value->BooleanValue();
    imp->setBooleanAttribute(WebCore::HTMLNames::noshadeAttr, v);
    return;
}
Ejemplo n.º 3
0
JSValue jsHTMLHRElementNoShade(ExecState* exec, JSValue slotBase, const Identifier&)
{
    JSHTMLHRElement* castedThis = static_cast<JSHTMLHRElement*>(asObject(slotBase));
    UNUSED_PARAM(exec);
    HTMLHRElement* imp = static_cast<HTMLHRElement*>(castedThis->impl());
    JSValue result = jsBoolean(imp->hasAttribute(WebCore::HTMLNames::noshadeAttr));
    return result;
}
Ejemplo n.º 4
0
void PopupMenuImpl::addSeparator(HTMLHRElement& element, bool enableExtraStyling, SharedBuffer* data)
{
    PagePopupClient::addString("{\n", data);
    PagePopupClient::addString("type: \"separator\",\n", data);
    addProperty("title", element.title(), data);
    addProperty("ariaLabel", element.fastGetAttribute(HTMLNames::aria_labelAttr), data);
    addProperty("disabled", element.isDisabledFormControl(), data);
    addElementStyle(element, enableExtraStyling, data);
    PagePopupClient::addString("},\n", data);
}
Ejemplo n.º 5
0
void PopupMenuImpl::addSeparator(ItemIterationContext& context, HTMLHRElement& element)
{
    SharedBuffer* data = context.m_buffer;
    PagePopupClient::addString("{\n", data);
    PagePopupClient::addString("type: \"separator\",\n", data);
    addProperty("title", element.title(), data);
    addProperty("ariaLabel", element.fastGetAttribute(HTMLNames::aria_labelAttr), data);
    addProperty("disabled", element.isDisabledFormControl(), data);
    addElementStyle(context, element);
    PagePopupClient::addString("},\n", data);
}
Ejemplo n.º 6
0
void JSHTMLHRElement::putValueProperty(ExecState* exec, int token, JSValue* value)
{
    switch (token) {
    case AlignAttrNum: {
        HTMLHRElement* imp = static_cast<HTMLHRElement*>(impl());
        imp->setAlign(valueToStringWithNullCheck(exec, value));
        break;
    }
    case NoShadeAttrNum: {
        HTMLHRElement* imp = static_cast<HTMLHRElement*>(impl());
        imp->setNoShade(value->toBoolean(exec));
        break;
    }
    case SizeAttrNum: {
        HTMLHRElement* imp = static_cast<HTMLHRElement*>(impl());
        imp->setSize(valueToStringWithNullCheck(exec, value));
        break;
    }
    case WidthAttrNum: {
        HTMLHRElement* imp = static_cast<HTMLHRElement*>(impl());
        imp->setWidth(valueToStringWithNullCheck(exec, value));
        break;
    }
    }
}
Ejemplo n.º 7
0
JSValue* JSHTMLHRElement::getValueProperty(ExecState* exec, int token) const
{
    switch (token) {
    case AlignAttrNum: {
        HTMLHRElement* imp = static_cast<HTMLHRElement*>(impl());
        return jsString(exec, imp->align());
    }
    case NoShadeAttrNum: {
        HTMLHRElement* imp = static_cast<HTMLHRElement*>(impl());
        return jsBoolean(imp->noShade());
    }
    case SizeAttrNum: {
        HTMLHRElement* imp = static_cast<HTMLHRElement*>(impl());
        return jsString(exec, imp->size());
    }
    case WidthAttrNum: {
        HTMLHRElement* imp = static_cast<HTMLHRElement*>(impl());
        return jsString(exec, imp->width());
    }
    case ConstructorAttrNum:
        return getConstructor(exec);
    }
    return 0;
}
Ejemplo n.º 8
0
void setJSHTMLHRElementWidth(ExecState* exec, JSObject* thisObject, JSValue value)
{
    JSHTMLHRElement* castedThis = static_cast<JSHTMLHRElement*>(thisObject);
    HTMLHRElement* imp = static_cast<HTMLHRElement*>(castedThis->impl());
    imp->setAttribute(WebCore::HTMLNames::widthAttr, valueToStringWithNullCheck(exec, value));
}
Ejemplo n.º 9
0
void setJSHTMLHRElementNoShade(ExecState* exec, JSObject* thisObject, JSValue value)
{
    JSHTMLHRElement* castedThis = static_cast<JSHTMLHRElement*>(thisObject);
    HTMLHRElement* imp = static_cast<HTMLHRElement*>(castedThis->impl());
    imp->setBooleanAttribute(WebCore::HTMLNames::noshadeAttr, value.toBoolean(exec));
}
Ejemplo n.º 10
0
void setJSHTMLHRElementWidth(ExecState* exec, JSObject* thisObject, JSValue value)
{
    HTMLHRElement* imp = static_cast<HTMLHRElement*>(static_cast<JSHTMLHRElement*>(thisObject)->impl());
    imp->setWidth(valueToStringWithNullCheck(exec, value));
}
Ejemplo n.º 11
0
void setJSHTMLHRElementNoShade(ExecState* exec, JSObject* thisObject, JSValue value)
{
    HTMLHRElement* imp = static_cast<HTMLHRElement*>(static_cast<JSHTMLHRElement*>(thisObject)->impl());
    imp->setNoShade(value.toBoolean(exec));
}
Ejemplo n.º 12
0
static v8::Handle<v8::Value> noShadeAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
    INC_STATS("DOM.HTMLHRElement.noShade._get");
    HTMLHRElement* imp = V8HTMLHRElement::toNative(info.Holder());
    return v8Boolean(imp->hasAttribute(WebCore::HTMLNames::noshadeAttr));
}