mshtml: Moved option_factory from HTMLOuterWindow to HTMLInnerWindow.
This commit is contained in:
parent
2698fe0b3f
commit
c77b8bfdd9
|
@ -517,15 +517,18 @@ static const IHTMLOptionElementFactoryVtbl HTMLOptionElementFactoryVtbl = {
|
|||
HTMLOptionElementFactory_create
|
||||
};
|
||||
|
||||
HTMLOptionElementFactory *HTMLOptionElementFactory_Create(HTMLOuterWindow *window)
|
||||
HRESULT HTMLOptionElementFactory_Create(HTMLInnerWindow *window, HTMLOptionElementFactory **ret_ptr)
|
||||
{
|
||||
HTMLOptionElementFactory *ret;
|
||||
|
||||
ret = heap_alloc(sizeof(HTMLOptionElementFactory));
|
||||
ret = heap_alloc(sizeof(*ret));
|
||||
if(!ret)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
ret->IHTMLOptionElementFactory_iface.lpVtbl = &HTMLOptionElementFactoryVtbl;
|
||||
ret->ref = 1;
|
||||
ret->window = window;
|
||||
|
||||
return ret;
|
||||
*ret_ptr = ret;
|
||||
return S_OK;
|
||||
}
|
||||
|
|
|
@ -192,11 +192,6 @@ static void release_outer_window(HTMLOuterWindow *This)
|
|||
if(This->frame_element)
|
||||
This->frame_element->content_window = NULL;
|
||||
|
||||
if(This->option_factory) {
|
||||
This->option_factory->window = NULL;
|
||||
IHTMLOptionElementFactory_Release(&This->option_factory->IHTMLOptionElementFactory_iface);
|
||||
}
|
||||
|
||||
if(This->image_factory) {
|
||||
This->image_factory->window = NULL;
|
||||
IHTMLImageElementFactory_Release(&This->image_factory->IHTMLImageElementFactory_iface);
|
||||
|
@ -233,6 +228,11 @@ static void release_inner_window(HTMLInnerWindow *This)
|
|||
heap_free(This->global_props[i].name);
|
||||
heap_free(This->global_props);
|
||||
|
||||
if(This->option_factory) {
|
||||
This->option_factory->window = NULL;
|
||||
IHTMLOptionElementFactory_Release(&This->option_factory->IHTMLOptionElementFactory_iface);
|
||||
}
|
||||
|
||||
heap_free(This);
|
||||
}
|
||||
|
||||
|
@ -1083,12 +1083,17 @@ static HRESULT WINAPI HTMLWindow2_get_screen(IHTMLWindow2 *iface, IHTMLScreen **
|
|||
static HRESULT WINAPI HTMLWindow2_get_Option(IHTMLWindow2 *iface, IHTMLOptionElementFactory **p)
|
||||
{
|
||||
HTMLWindow *This = impl_from_IHTMLWindow2(iface);
|
||||
HTMLOuterWindow *window = This->outer_window;
|
||||
HTMLInnerWindow *window = This->inner_window;
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, p);
|
||||
|
||||
if(!window->option_factory)
|
||||
window->option_factory = HTMLOptionElementFactory_Create(window);
|
||||
if(!window->option_factory) {
|
||||
HRESULT hres;
|
||||
|
||||
hres = HTMLOptionElementFactory_Create(window, &window->option_factory);
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
}
|
||||
|
||||
*p = &window->option_factory->IHTMLOptionElementFactory_iface;
|
||||
IHTMLOptionElementFactory_AddRef(*p);
|
||||
|
|
|
@ -269,7 +269,7 @@ typedef struct {
|
|||
|
||||
LONG ref;
|
||||
|
||||
HTMLOuterWindow *window;
|
||||
HTMLInnerWindow *window;
|
||||
} HTMLOptionElementFactory;
|
||||
|
||||
typedef struct {
|
||||
|
@ -338,7 +338,6 @@ struct HTMLOuterWindow {
|
|||
|
||||
IInternetSecurityManager *secmgr;
|
||||
|
||||
HTMLOptionElementFactory *option_factory;
|
||||
HTMLImageElementFactory *image_factory;
|
||||
HTMLLocation *location;
|
||||
IHTMLScreen *screen;
|
||||
|
@ -355,6 +354,8 @@ struct HTMLInnerWindow {
|
|||
|
||||
HTMLDocumentNode *doc;
|
||||
|
||||
HTMLOptionElementFactory *option_factory;
|
||||
|
||||
global_prop_t *global_props;
|
||||
DWORD global_prop_cnt;
|
||||
DWORD global_prop_size;
|
||||
|
@ -660,7 +661,7 @@ HRESULT HTMLOuterWindow_Create(HTMLDocumentObj*,nsIDOMWindow*,HTMLOuterWindow*,H
|
|||
HRESULT update_window_doc(HTMLOuterWindow*) DECLSPEC_HIDDEN;
|
||||
HTMLOuterWindow *nswindow_to_window(const nsIDOMWindow*) DECLSPEC_HIDDEN;
|
||||
void get_top_window(HTMLOuterWindow*,HTMLOuterWindow**) DECLSPEC_HIDDEN;
|
||||
HTMLOptionElementFactory *HTMLOptionElementFactory_Create(HTMLOuterWindow*) DECLSPEC_HIDDEN;
|
||||
HRESULT HTMLOptionElementFactory_Create(HTMLInnerWindow*,HTMLOptionElementFactory**) DECLSPEC_HIDDEN;
|
||||
HTMLImageElementFactory *HTMLImageElementFactory_Create(HTMLOuterWindow*) DECLSPEC_HIDDEN;
|
||||
HRESULT HTMLLocation_Create(HTMLOuterWindow*,HTMLLocation**) DECLSPEC_HIDDEN;
|
||||
IOmNavigator *OmNavigator_Create(void) DECLSPEC_HIDDEN;
|
||||
|
|
Loading…
Reference in New Issue