mshtml: Added IHTMLElement2::get_runtimeStyle hackish implementation.
This commit is contained in:
parent
5b633c29b9
commit
9ccc5f487b
|
@ -1563,6 +1563,10 @@ void HTMLElement_destructor(HTMLDOMNode *iface)
|
||||||
This->style->elem = NULL;
|
This->style->elem = NULL;
|
||||||
IHTMLStyle_Release(&This->style->IHTMLStyle_iface);
|
IHTMLStyle_Release(&This->style->IHTMLStyle_iface);
|
||||||
}
|
}
|
||||||
|
if(This->runtime_style) {
|
||||||
|
This->runtime_style->elem = NULL;
|
||||||
|
IHTMLStyle_Release(&This->runtime_style->IHTMLStyle_iface);
|
||||||
|
}
|
||||||
if(This->attrs) {
|
if(This->attrs) {
|
||||||
HTMLDOMAttribute *attr;
|
HTMLDOMAttribute *attr;
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
|
|
||||||
#include "mshtml_private.h"
|
#include "mshtml_private.h"
|
||||||
#include "htmlevent.h"
|
#include "htmlevent.h"
|
||||||
|
#include "htmlstyle.h"
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
|
WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
|
||||||
|
|
||||||
|
@ -1188,8 +1189,23 @@ static HRESULT WINAPI HTMLElement2_removeBehavior(IHTMLElement2 *iface, LONG coo
|
||||||
static HRESULT WINAPI HTMLElement2_get_runtimeStyle(IHTMLElement2 *iface, IHTMLStyle **p)
|
static HRESULT WINAPI HTMLElement2_get_runtimeStyle(IHTMLElement2 *iface, IHTMLStyle **p)
|
||||||
{
|
{
|
||||||
HTMLElement *This = impl_from_IHTMLElement2(iface);
|
HTMLElement *This = impl_from_IHTMLElement2(iface);
|
||||||
FIXME("(%p)->(%p)\n", This, p);
|
|
||||||
return E_NOTIMPL;
|
FIXME("(%p)->(%p): hack\n", This, p);
|
||||||
|
|
||||||
|
/* We can't implement correct behavior on top of Gecko (although we could
|
||||||
|
try a bit harder). Making runtimeStyle behave like regular style is
|
||||||
|
enough for most use cases. */
|
||||||
|
if(!This->runtime_style) {
|
||||||
|
HRESULT hres;
|
||||||
|
|
||||||
|
hres = HTMLStyle_Create(This, &This->runtime_style);
|
||||||
|
if(FAILED(hres))
|
||||||
|
return hres;
|
||||||
|
}
|
||||||
|
|
||||||
|
*p = &This->runtime_style->IHTMLStyle_iface;
|
||||||
|
IHTMLStyle_AddRef(*p);
|
||||||
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLElement2_get_behaviorUrns(IHTMLElement2 *iface, IDispatch **p)
|
static HRESULT WINAPI HTMLElement2_get_behaviorUrns(IHTMLElement2 *iface, IDispatch **p)
|
||||||
|
|
|
@ -721,6 +721,7 @@ static ULONG WINAPI HTMLStyle_Release(IHTMLStyle *iface)
|
||||||
TRACE("(%p) ref=%d\n", This, ref);
|
TRACE("(%p) ref=%d\n", This, ref);
|
||||||
|
|
||||||
if(!ref) {
|
if(!ref) {
|
||||||
|
assert(!This->elem);
|
||||||
if(This->nsstyle)
|
if(This->nsstyle)
|
||||||
nsIDOMCSSStyleDeclaration_Release(This->nsstyle);
|
nsIDOMCSSStyleDeclaration_Release(This->nsstyle);
|
||||||
release_dispex(&This->dispex);
|
release_dispex(&This->dispex);
|
||||||
|
|
|
@ -634,6 +634,7 @@ typedef struct {
|
||||||
|
|
||||||
nsIDOMHTMLElement *nselem;
|
nsIDOMHTMLElement *nselem;
|
||||||
HTMLStyle *style;
|
HTMLStyle *style;
|
||||||
|
HTMLStyle *runtime_style;
|
||||||
HTMLAttributeCollection *attrs;
|
HTMLAttributeCollection *attrs;
|
||||||
WCHAR *filter;
|
WCHAR *filter;
|
||||||
} HTMLElement;
|
} HTMLElement;
|
||||||
|
|
Loading…
Reference in New Issue