static void selectedIndexAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
    INC_STATS("DOM.HTMLSelectElement.selectedIndex._set");
    HTMLSelectElement* imp = V8HTMLSelectElement::toNative(info.Holder());
    int v = toInt32(value);
    imp->setSelectedIndex(v);
    return;
}
示例#2
0
HRESULT STDMETHODCALLTYPE DOMHTMLSelectElement::activateItemAtIndex( 
    /* [in] */ int index)
{
    ASSERT(m_element);
    HTMLSelectElement* selectElement = toHTMLSelectElement(m_element);

    if (index >= selectElement->length())
        return E_FAIL;

    selectElement->setSelectedIndex(index);
    return S_OK;
}
HRESULT STDMETHODCALLTYPE DOMHTMLSelectElement::activateItemAtIndex( 
    /* [in] */ int index)
{
    ASSERT(m_element);
    ASSERT(m_element->hasTagName(selectTag));
    HTMLSelectElement* selectElement = static_cast<HTMLSelectElement*>(m_element);

    if (index >= selectElement->length())
        return E_FAIL;

    selectElement->setSelectedIndex(index);
    return S_OK;
}
示例#4
0
void RenderListBox::valueChanged(unsigned listIndex)
{
    HTMLSelectElement* element = toHTMLSelectElement(node());
    element->setSelectedIndex(element->listToOptionIndex(listIndex));
    element->dispatchFormControlChangeEvent();
}
示例#5
0
void RenderListBox::valueChanged(unsigned listIndex)
{
    HTMLSelectElement* select = static_cast<HTMLSelectElement*>(node());
    select->setSelectedIndex(select->listToOptionIndex(listIndex));
    select->onChange();
}
示例#6
0
void setJSHTMLSelectElementSelectedIndex(ExecState* exec, JSObject* thisObject, JSValue value)
{
    JSHTMLSelectElement* castedThis = static_cast<JSHTMLSelectElement*>(thisObject);
    HTMLSelectElement* imp = static_cast<HTMLSelectElement*>(castedThis->impl());
    imp->setSelectedIndex(value.toInt32(exec));
}
示例#7
0
void RenderMenuList::valueChanged(unsigned listIndex, bool fireOnChange)
{
    HTMLSelectElement* select = static_cast<HTMLSelectElement*>(node());
    select->setSelectedIndex(select->listToOptionIndex(listIndex), true, fireOnChange);
}