📄 domhtmlclasses.cpp
字号:
HRESULT STDMETHODCALLTYPE DOMHTMLInputElement::checked( /* [retval][out] */ BOOL* /*result*/){ ASSERT_NOT_REACHED(); return E_NOTIMPL;} HRESULT STDMETHODCALLTYPE DOMHTMLInputElement::setChecked( /* [in] */ BOOL /*checked*/){ ASSERT_NOT_REACHED(); return E_NOTIMPL;} HRESULT STDMETHODCALLTYPE DOMHTMLInputElement::disabled( /* [retval][out] */ BOOL* result){ ASSERT(m_element && m_element->hasTagName(inputTag)); HTMLInputElement* inputElement = static_cast<HTMLInputElement*>(m_element); *result = inputElement->disabled() ? TRUE : FALSE; return S_OK;} HRESULT STDMETHODCALLTYPE DOMHTMLInputElement::setDisabled( /* [in] */ BOOL /*disabled*/){ ASSERT_NOT_REACHED(); return E_NOTIMPL;} HRESULT STDMETHODCALLTYPE DOMHTMLInputElement::maxLength( /* [retval][out] */ int* /*result*/){ ASSERT_NOT_REACHED(); return E_NOTIMPL;} HRESULT STDMETHODCALLTYPE DOMHTMLInputElement::setMaxLength( /* [in] */ int /*maxLength*/){ ASSERT_NOT_REACHED(); return E_NOTIMPL;} HRESULT STDMETHODCALLTYPE DOMHTMLInputElement::name( /* [retval][out] */ BSTR* /*name*/){ ASSERT_NOT_REACHED(); return E_NOTIMPL;} HRESULT STDMETHODCALLTYPE DOMHTMLInputElement::setName( /* [in] */ BSTR /*name*/){ ASSERT_NOT_REACHED(); return E_NOTIMPL;} HRESULT STDMETHODCALLTYPE DOMHTMLInputElement::readOnly( /* [retval][out] */ BOOL* result){ ASSERT(m_element && m_element->hasTagName(inputTag)); HTMLInputElement* inputElement = static_cast<HTMLInputElement*>(m_element); *result = inputElement->readOnly() ? TRUE : FALSE; return S_OK;} HRESULT STDMETHODCALLTYPE DOMHTMLInputElement::setReadOnly( /* [in] */ BOOL /*readOnly*/){ ASSERT_NOT_REACHED(); return E_NOTIMPL;} HRESULT STDMETHODCALLTYPE DOMHTMLInputElement::size( /* [retval][out] */ unsigned int* /*result*/){ ASSERT_NOT_REACHED(); return E_NOTIMPL;} HRESULT STDMETHODCALLTYPE DOMHTMLInputElement::setSize( /* [in] */ unsigned int /*size*/){ ASSERT_NOT_REACHED(); return E_NOTIMPL;} HRESULT STDMETHODCALLTYPE DOMHTMLInputElement::src( /* [retval][out] */ BSTR* /*result*/){ ASSERT_NOT_REACHED(); return E_NOTIMPL;} HRESULT STDMETHODCALLTYPE DOMHTMLInputElement::setSrc( /* [in] */ BSTR /*src*/){ ASSERT_NOT_REACHED(); return E_NOTIMPL;} HRESULT STDMETHODCALLTYPE DOMHTMLInputElement::tabIndex( /* [retval][out] */ int* /*result*/){ ASSERT_NOT_REACHED(); return E_NOTIMPL;} HRESULT STDMETHODCALLTYPE DOMHTMLInputElement::setTabIndex( /* [in] */ int /*tabIndex*/){ ASSERT_NOT_REACHED(); return E_NOTIMPL;} HRESULT STDMETHODCALLTYPE DOMHTMLInputElement::type( /* [retval][out] */ BSTR* /*result*/){ ASSERT_NOT_REACHED(); return E_NOTIMPL;} HRESULT STDMETHODCALLTYPE DOMHTMLInputElement::setType( /* [in] */ BSTR type){ ASSERT(m_element && m_element->hasTagName(inputTag)); HTMLInputElement* inputElement = static_cast<HTMLInputElement*>(m_element); WebCore::String typeString(type, SysStringLen(type)); inputElement->setType(typeString); return S_OK;} HRESULT STDMETHODCALLTYPE DOMHTMLInputElement::useMap( /* [retval][out] */ BSTR* /*result*/){ ASSERT_NOT_REACHED(); return E_NOTIMPL;} HRESULT STDMETHODCALLTYPE DOMHTMLInputElement::setUseMap( /* [in] */ BSTR /*useMap*/){ ASSERT_NOT_REACHED(); return E_NOTIMPL;} HRESULT STDMETHODCALLTYPE DOMHTMLInputElement::value( /* [retval][out] */ BSTR* result){ ASSERT(m_element && m_element->hasTagName(inputTag)); HTMLInputElement* inputElement = static_cast<HTMLInputElement*>(m_element); WebCore::String valueString = inputElement->value(); *result = BString(valueString.characters(), valueString.length()).release(); if (valueString.length() && !*result) return E_OUTOFMEMORY; return S_OK;} HRESULT STDMETHODCALLTYPE DOMHTMLInputElement::setValue( /* [in] */ BSTR value){ ASSERT(m_element && m_element->hasTagName(inputTag)); HTMLInputElement* inputElement = static_cast<HTMLInputElement*>(m_element); inputElement->setValue(String((UChar*) value, SysStringLen(value))); return S_OK;} HRESULT STDMETHODCALLTYPE DOMHTMLInputElement::select( void){ ASSERT(m_element && m_element->hasTagName(inputTag)); HTMLInputElement* inputElement = static_cast<HTMLInputElement*>(m_element); inputElement->select(); return S_OK;} HRESULT STDMETHODCALLTYPE DOMHTMLInputElement::click( void){ ASSERT_NOT_REACHED(); return E_NOTIMPL;}HRESULT STDMETHODCALLTYPE DOMHTMLInputElement::setSelectionStart( /* [in] */ long start){ ASSERT(m_element && m_element->hasTagName(inputTag)); HTMLInputElement* inputElement = static_cast<HTMLInputElement*>(m_element); inputElement->setSelectionStart(start); return S_OK;}HRESULT STDMETHODCALLTYPE DOMHTMLInputElement::selectionStart( /* [retval][out] */ long *start){ ASSERT(m_element && m_element->hasTagName(inputTag)); HTMLInputElement* inputElement = static_cast<HTMLInputElement*>(m_element); *start = inputElement->selectionStart(); return S_OK;}HRESULT STDMETHODCALLTYPE DOMHTMLInputElement::setSelectionEnd( /* [in] */ long end){ ASSERT(m_element && m_element->hasTagName(inputTag)); HTMLInputElement* inputElement = static_cast<HTMLInputElement*>(m_element); inputElement->setSelectionEnd(end); return S_OK;}HRESULT STDMETHODCALLTYPE DOMHTMLInputElement::selectionEnd( /* [retval][out] */ long *end){ ASSERT(m_element && m_element->hasTagName(inputTag)); HTMLInputElement* inputElement = static_cast<HTMLInputElement*>(m_element); *end = inputElement->selectionEnd(); return S_OK;}// DOMHTMLInputElement -- IFormsAutoFillTransition ----------------------------HRESULT STDMETHODCALLTYPE DOMHTMLInputElement::isTextField( /* [retval][out] */ BOOL* result){ ASSERT(m_element && m_element->hasTagName(inputTag)); HTMLInputElement* inputElement = static_cast<HTMLInputElement*>(m_element); *result = inputElement->isTextField() ? TRUE : FALSE; return S_OK;}HRESULT STDMETHODCALLTYPE DOMHTMLInputElement::rectOnScreen( /* [retval][out] */ LPRECT rect){ rect->left = rect->top = rect->right = rect->bottom = 0; RenderObject* renderer = m_element->renderer(); FrameView* view = m_element->document()->view(); if (!renderer || !view) return E_FAIL; IntRect coreRect = renderer->absoluteBoundingBoxRect(); coreRect.setLocation(view->contentsToWindow(coreRect.location())); rect->left = coreRect.x(); rect->top = coreRect.y(); rect->right = coreRect.right(); rect->bottom = coreRect.bottom(); return S_OK;}HRESULT STDMETHODCALLTYPE DOMHTMLInputElement::replaceCharactersInRange( /* [in] */ int /*startTarget*/, /* [in] */ int /*endTarget*/, /* [in] */ BSTR /*replacementString*/, /* [in] */ int /*index*/){ ASSERT_NOT_REACHED(); return E_NOTIMPL;}HRESULT STDMETHODCALLTYPE DOMHTMLInputElement::selectedRange( /* [out] */ int* start, /* [out] */ int* end){ ASSERT(m_element && m_element->hasTagName(inputTag)); HTMLInputElement* inputElement = static_cast<HTMLInputElement*>(m_element); *start = inputElement->selectionStart(); *end = inputElement->selectionEnd(); return S_OK;}HRESULT STDMETHODCALLTYPE DOMHTMLInputElement::setAutofilled( /* [in] */ BOOL filled){ ASSERT(m_element && m_element->hasTagName(inputTag)); HTMLInputElement* inputElement = static_cast<HTMLInputElement*>(m_element); inputElement->setAutofilled(!!filled); return S_OK;}// DOMHTMLInputElement -- IFormPromptAdditions ------------------------------------HRESULT STDMETHODCALLTYPE DOMHTMLInputElement::isUserEdited( /* [retval][out] */ BOOL *result){ if (!result) return E_POINTER; *result = FALSE; ASSERT(m_element); BOOL textField = FALSE; if (FAILED(isTextField(&textField)) || !textField) return S_OK; RenderObject* renderer = m_element->renderer(); if (renderer && static_cast<WebCore::RenderTextControl*>(renderer)->isUserEdited()) *result = TRUE; return S_OK;}// DOMHTMLTextAreaElement - IUnknown ----------------------------------------------HRESULT STDMETHODCALLTYPE DOMHTMLTextAreaElement::QueryInterface(REFIID riid, void** ppvObject){ *ppvObject = 0; if (IsEqualGUID(riid, IID_IDOMHTMLTextAreaElement)) *ppvObject = static_cast<IDOMHTMLTextAreaElement*>(this); else if (IsEqualGUID(riid, IID_IFormPromptAdditions)) *ppvObject = static_cast<IFormPromptAdditions*>(this); else return DOMHTMLElement::QueryInterface(riid, ppvObject); AddRef(); return S_OK;}// DOMHTMLTextAreaElement -----------------------------------------------------HRESULT STDMETHODCALLTYPE DOMHTMLTextAreaElement::defaultValue( /* [retval][out] */ BSTR* /*result*/){ ASSERT_NOT_REACHED(); return E_NOTIMPL;} HRESULT STDMETHODCALLTYPE DOMHTMLTextAreaElement::setDefaultValue( /* [in] */ BSTR /*val*/){ ASSERT_NOT_REACHED(); return E_NOTIMPL;} HRESULT STDMETHODCALLTYPE DOMHTMLTextAreaElement::form( /* [retval][out] */ IDOMHTMLElement** result){ if (!result) return E_POINTER; *result = 0; ASSERT(m_element && m_element->hasTagName(textareaTag)); HTMLTextAreaElement* textareaElement = static_cast<HTMLTextAreaElement*>(m_element); COMPtr<IDOMElement> domElement; domElement.adoptRef(DOMHTMLElement::createInstance(textareaElement->form())); if (domElement) return domElement->QueryInterface(IID_IDOMHTMLElement, (void**) result); return E_FAIL;} HRESULT STDMETHODCALLTYPE DOMHTMLTextAreaElement::accessKey( /* [retval][out] */ BSTR* /*result*/){ ASSERT_NOT_REACHED(); return E_NOTIMPL;} HRESULT STDMETHODCALLTYPE DOMHTMLTextAreaElement::setAccessKey( /* [in] */ BSTR /*key*/){ ASSERT_NOT_REACHED(); return E_NOTIMPL;} HRESULT STDMETHODCALLTYPE DOMHTMLTextAreaElement::cols( /* [retval][out] */ int* /*result*/){ ASSERT_NOT_REACHED(); return E_NOTIMPL;} HRESULT STDMETHODCALLTYPE DOMHTMLTextAreaElement::setCols( /* [in] */ int /*cols*/){ ASSERT_NOT_REACHED(); return E_NOTIMPL;} HRESULT STDMETHODCALLTYPE DOMHTMLTextAreaElement::disabled( /* [retval][out] */ BOOL* /*result*/){ ASSERT_NOT_REACHED(); return E_NOTIMPL;} HRESULT STDMETHODCALLTYPE DOMHTMLTextAreaElement::setDisabled( /* [in] */ BOOL /*disabled*/){ ASSERT_NOT_REACHED(); return E_NOTIMPL;} HRESULT STDMETHODCALLTYPE DOMHTMLTextAreaElement::name( /* [retval][out] */ BSTR* /*name*/){ ASSERT_NOT_REACHED(); return E_NOTIMPL;} HRESULT STDMETHODCALLTYPE DOMHTMLTextAreaElement::setName( /* [in] */ BSTR /*name*/){ ASSERT_NOT_REACHED(); return E_NOTIMPL;} HRESULT STDMETHODCALLTYPE DOMHTMLTextAreaElement::readOnly( /* [retval][out] */ BOOL* /*result*/){ ASSERT_NOT_REACHED(); return E_NOTIMPL;} HRESULT STDMETHODCALLTYPE DOMHTMLTextAreaElement::setReadOnly( /* [in] */ BOOL /*readOnly*/){ ASSERT_NOT_REACHED(); return E_NOTIMPL;} HRESULT STDMETHODCALLTYPE DOMHTMLTextAreaElement::rows( /* [retval][out] */ int* /*result*/){ ASSERT_NOT_REACHED(); return E_NOTIMPL;} HRESULT STDMETHODCALLTYPE DOMHTMLTextAreaElement::setRows( /* [in] */ int /*rows*/){ ASSERT_NOT_REACHED(); return E_NOTIMPL;} HRESULT STDMETHODCALLTYPE DOMHTMLTextAreaElement::tabIndex( /* [retval][out] */ int* /*result*/){ ASSERT_NOT_REACHED(); return E_NOTIMPL;} HRESULT STDMETHODCALLTYPE DOMHTMLTextAreaElement::setTabIndex( /* [in] */ int /*tabIndex*/){ ASSERT_NOT_REACHED(); return E_NOTIMPL;} HRESULT STDMETHODCALLTYPE DOMHTMLTextAreaElement::type( /* [retval][out] */ BSTR* /*result*/){ ASSERT_NOT_REACHED(); return E_NOTIMPL;} HRESULT STDMETHODCALLTYPE DOMHTMLTextAreaElement::value( /* [retval][out] */ BSTR* result){ ASSERT(m_element && m_element->hasTagName(textareaTag)); HTMLTextAreaElement* textareaElement = static_cast<HTMLTextAreaElement*>(m_element); WebCore::String valueString = textareaElement->value(); *result = BString(valueString.characters(), valueString.length()).release(); if (valueString.length() && !*result) return E_OUTOFMEMORY; return S_OK;} HRESULT STDMETHODCALLTYPE DOMHTMLTextAreaElement::setValue( /* [in] */ BSTR value){ ASSERT(m_element && m_element->hasTagName(textareaTag)); HTMLTextAreaElement* textareaElement = static_cast<HTMLTextAreaElement*>(m_element); textareaElement->setValue(String((UChar*) value, SysStringLen(value))); return S_OK;} HRESULT STDMETHODCALLTYPE DOMHTMLTextAreaElement::select( void){ ASSERT(m_element && m_element->hasTagName(textareaTag)); HTMLTextAreaElement* textareaElement = static_cast<HTMLTextAreaElement*>(m_element); textareaElement->select(); return S_OK;}// DOMHTMLTextAreaElement -- IFormPromptAdditions ------------------------------------HRESULT STDMETHODCALLTYPE DOMHTMLTextAreaElement::isUserEdited( /* [retval][out] */ BOOL *result){ if (!result) return E_POINTER; *result = FALSE; ASSERT(m_element); RenderObject* renderer = m_element->renderer(); if (renderer && static_cast<WebCore::RenderTextControl*>(renderer)->isUserEdited()) *result = TRUE; return S_OK;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -