diff options
Diffstat (limited to 'WebKit/win/DOMHTMLClasses.cpp')
| -rw-r--r-- | WebKit/win/DOMHTMLClasses.cpp | 46 |
1 files changed, 39 insertions, 7 deletions
diff --git a/WebKit/win/DOMHTMLClasses.cpp b/WebKit/win/DOMHTMLClasses.cpp index 4889ba9..2dd6deb 100644 --- a/WebKit/win/DOMHTMLClasses.cpp +++ b/WebKit/win/DOMHTMLClasses.cpp @@ -27,6 +27,7 @@ #include "WebKitDLL.h" #include "DOMHTMLClasses.h" #include "COMPtr.h" +#include "WebFrame.h" #pragma warning(push, 0) #include <WebCore/BString.h> @@ -36,6 +37,7 @@ #include <WebCore/HTMLCollection.h> #include <WebCore/HTMLDocument.h> #include <WebCore/HTMLFormElement.h> +#include <WebCore/HTMLIFrameElement.h> #include <WebCore/HTMLInputElement.h> #include <WebCore/HTMLNames.h> #include <WebCore/HTMLOptionElement.h> @@ -481,7 +483,7 @@ HRESULT STDMETHODCALLTYPE DOMHTMLElement::innerText( /* [retval][out] */ BSTR* result) { ASSERT(m_element && m_element->isHTMLElement()); - WebCore::String innerTextString = static_cast<HTMLElement*>(m_element)->innerText(); + WTF::String innerTextString = static_cast<HTMLElement*>(m_element)->innerText(); *result = BString(innerTextString.characters(), innerTextString.length()).release(); return S_OK; } @@ -491,7 +493,7 @@ HRESULT STDMETHODCALLTYPE DOMHTMLElement::setInnerText( { ASSERT(m_element && m_element->isHTMLElement()); HTMLElement* htmlEle = static_cast<HTMLElement*>(m_element); - WebCore::String textString(text, SysStringLen(text)); + WTF::String textString(text, SysStringLen(text)); WebCore::ExceptionCode ec = 0; htmlEle->setInnerText(textString, ec); return S_OK; @@ -559,7 +561,7 @@ HRESULT STDMETHODCALLTYPE DOMHTMLFormElement::action( /* [retval][out] */ BSTR* result) { ASSERT(m_element && m_element->hasTagName(formTag)); - WebCore::String actionString = static_cast<HTMLFormElement*>(m_element)->action(); + WTF::String actionString = static_cast<HTMLFormElement*>(m_element)->action(); *result = BString(actionString.characters(), actionString.length()).release(); return S_OK; } @@ -589,7 +591,7 @@ HRESULT STDMETHODCALLTYPE DOMHTMLFormElement::method( /* [retval][out] */ BSTR* result) { ASSERT(m_element && m_element->hasTagName(formTag)); - WebCore::String methodString = static_cast<HTMLFormElement*>(m_element)->method(); + WTF::String methodString = static_cast<HTMLFormElement*>(m_element)->method(); *result = BString(methodString.characters(), methodString.length()).release(); return S_OK; } @@ -1186,7 +1188,7 @@ HRESULT STDMETHODCALLTYPE DOMHTMLInputElement::setType( { ASSERT(m_element && m_element->hasTagName(inputTag)); HTMLInputElement* inputElement = static_cast<HTMLInputElement*>(m_element); - WebCore::String typeString(type, SysStringLen(type)); + WTF::String typeString(type, SysStringLen(type)); inputElement->setType(typeString); return S_OK; } @@ -1210,7 +1212,7 @@ HRESULT STDMETHODCALLTYPE DOMHTMLInputElement::value( { ASSERT(m_element && m_element->hasTagName(inputTag)); HTMLInputElement* inputElement = static_cast<HTMLInputElement*>(m_element); - WebCore::String valueString = inputElement->value(); + WTF::String valueString = inputElement->value(); *result = BString(valueString.characters(), valueString.length()).release(); if (valueString.length() && !*result) return E_OUTOFMEMORY; @@ -1548,7 +1550,7 @@ HRESULT STDMETHODCALLTYPE DOMHTMLTextAreaElement::value( { ASSERT(m_element && m_element->hasTagName(textareaTag)); HTMLTextAreaElement* textareaElement = static_cast<HTMLTextAreaElement*>(m_element); - WebCore::String valueString = textareaElement->value(); + WTF::String valueString = textareaElement->value(); *result = BString(valueString.characters(), valueString.length()).release(); if (valueString.length() && !*result) return E_OUTOFMEMORY; @@ -1587,3 +1589,33 @@ HRESULT STDMETHODCALLTYPE DOMHTMLTextAreaElement::isUserEdited( *result = TRUE; return S_OK; } + +// DOMHTMLIFrameElement - IUnknown -------------------------------------------------- + +HRESULT STDMETHODCALLTYPE DOMHTMLIFrameElement::QueryInterface(REFIID riid, void** ppvObject) +{ + *ppvObject = 0; + if (IsEqualGUID(riid, IID_IDOMHTMLIFrameElement)) + *ppvObject = static_cast<IDOMHTMLIFrameElement*>(this); + else + return DOMHTMLElement::QueryInterface(riid, ppvObject); + + AddRef(); + return S_OK; +} + +// DOMHTMLIFrameElement ------------------------------------------------------------- + +HRESULT STDMETHODCALLTYPE DOMHTMLIFrameElement::contentFrame( + /* [retval][out] */ IWebFrame **result) +{ + if (!result) + return E_POINTER; + *result = 0; + ASSERT(m_element && m_element->hasTagName(iframeTag)); + HTMLIFrameElement* iFrameElement = static_cast<HTMLIFrameElement*>(m_element); + COMPtr<IWebFrame> webFrame = kit(iFrameElement->contentFrame()); + if (!webFrame) + return E_FAIL; + return webFrame.copyRefTo(result); +} |
