Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
6e3e7c9f
Commit
6e3e7c9f
authored
Dec 07, 2009
by
Andrew Eikum
Committed by
Alexandre Julliard
Dec 08, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Store ns[i]frame reference in HTMLFrameBase.
parent
662653c8
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
26 deletions
+20
-26
htmlframebase.c
dlls/mshtml/htmlframebase.c
+16
-13
htmliframe.c
dlls/mshtml/htmliframe.c
+1
-13
mshtml_private.h
dlls/mshtml/mshtml_private.h
+3
-0
No files found.
dlls/mshtml/htmlframebase.c
View file @
6e3e7c9f
...
...
@@ -443,16 +443,31 @@ void HTMLFrameBase_destructor(HTMLFrameBase *This)
if
(
This
->
content_window
)
This
->
content_window
->
frame_element
=
NULL
;
if
(
This
->
nsframe
)
nsIDOMHTMLFrameElement_Release
(
This
->
nsframe
);
if
(
This
->
nsiframe
)
nsIDOMHTMLIFrameElement_Release
(
This
->
nsiframe
);
HTMLElement_destructor
(
&
This
->
element
.
node
);
}
void
HTMLFrameBase_Init
(
HTMLFrameBase
*
This
,
HTMLDocumentNode
*
doc
,
nsIDOMHTMLElement
*
nselem
,
dispex_static_data_t
*
dispex_data
)
{
nsresult
nsres
;
This
->
lpIHTMLFrameBaseVtbl
=
&
HTMLFrameBaseVtbl
;
This
->
lpIHTMLFrameBase2Vtbl
=
&
HTMLFrameBase2Vtbl
;
HTMLElement_Init
(
&
This
->
element
,
doc
,
nselem
,
dispex_data
);
nsres
=
nsIDOMHTMLElement_QueryInterface
(
nselem
,
&
IID_nsIDOMHTMLFrameElement
,
(
void
**
)
&
This
->
nsframe
);
if
(
NS_FAILED
(
nsres
))
{
nsres
=
nsIDOMHTMLElement_QueryInterface
(
nselem
,
&
IID_nsIDOMHTMLIFrameElement
,
(
void
**
)
&
This
->
nsiframe
);
if
(
NS_FAILED
(
nsres
))
ERR
(
"Could not get nsIDOMHTML[I]Frame interface
\n
"
);
}
else
This
->
nsiframe
=
NULL
;
}
typedef
struct
{
...
...
@@ -492,17 +507,11 @@ static HRESULT HTMLFrameElement_get_document(HTMLDOMNode *iface, IDispatch **p)
static
HRESULT
HTMLFrameElement_bind_to_tree
(
HTMLDOMNode
*
iface
)
{
HTMLFrameElement
*
This
=
HTMLFRAME_NODE_THIS
(
iface
);
nsIDOMHTMLFrameElement
*
nsframe
;
nsIDOMDocument
*
nsdoc
;
nsresult
nsres
;
HRESULT
hres
;
nsres
=
nsIDOMHTMLElement_QueryInterface
(
This
->
framebase
.
element
.
nselem
,
&
IID_nsIDOMHTMLFrameElement
,
(
void
**
)
&
nsframe
);
if
(
NS_FAILED
(
nsres
))
return
E_FAIL
;
nsres
=
nsIDOMHTMLFrameElement_GetContentDocument
(
nsframe
,
&
nsdoc
);
nsIDOMHTMLFrameElement_Release
(
nsframe
);
nsres
=
nsIDOMHTMLFrameElement_GetContentDocument
(
This
->
framebase
.
nsframe
,
&
nsdoc
);
if
(
NS_FAILED
(
nsres
)
||
!
nsdoc
)
{
ERR
(
"GetContentDocument failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
...
...
@@ -531,18 +540,12 @@ static const NodeImplVtbl HTMLFrameElementImplVtbl = {
HTMLElement
*
HTMLFrameElement_Create
(
HTMLDocumentNode
*
doc
,
nsIDOMHTMLElement
*
nselem
)
{
nsIDOMHTMLFrameElement
*
nsframe
;
HTMLFrameElement
*
ret
;
nsresult
nsres
;
ret
=
heap_alloc_zero
(
sizeof
(
HTMLFrameElement
));
ret
->
framebase
.
element
.
node
.
vtbl
=
&
HTMLFrameElementImplVtbl
;
nsres
=
nsIDOMHTMLElement_QueryInterface
(
nselem
,
&
IID_nsIDOMHTMLFrameElement
,
(
void
**
)
&
nsframe
);
if
(
NS_FAILED
(
nsres
))
ERR
(
"Could not get nsIDOMHTMLFrameElement iface: %08x
\n
"
,
nsres
);
HTMLFrameBase_Init
(
&
ret
->
framebase
,
doc
,
nselem
,
NULL
);
return
&
ret
->
framebase
.
element
;
...
...
dlls/mshtml/htmliframe.c
View file @
6e3e7c9f
...
...
@@ -33,10 +33,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
typedef
struct
{
HTMLFrameBase
framebase
;
LONG
ref
;
nsIDOMHTMLIFrameElement
*
nsiframe
;
}
HTMLIFrame
;
#define HTMLIFRAME_NODE_THIS(iface) DEFINE_THIS2(HTMLIFrame, framebase.element.node, iface)
...
...
@@ -52,9 +48,6 @@ static void HTMLIFrame_destructor(HTMLDOMNode *iface)
{
HTMLIFrame
*
This
=
HTMLIFRAME_NODE_THIS
(
iface
);
if
(
This
->
nsiframe
)
nsIDOMHTMLIFrameElement_Release
(
This
->
nsiframe
);
HTMLFrameBase_destructor
(
&
This
->
framebase
);
}
...
...
@@ -86,7 +79,7 @@ static HRESULT HTMLIFrame_bind_to_tree(HTMLDOMNode *iface)
nsresult
nsres
;
HRESULT
hres
;
nsres
=
nsIDOMHTMLIFrameElement_GetContentDocument
(
This
->
nsiframe
,
&
nsdoc
);
nsres
=
nsIDOMHTMLIFrameElement_GetContentDocument
(
This
->
framebase
.
nsiframe
,
&
nsdoc
);
if
(
NS_FAILED
(
nsres
)
||
!
nsdoc
)
{
ERR
(
"GetContentDocument failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
...
...
@@ -134,16 +127,11 @@ static dispex_static_data_t HTMLIFrame_dispex = {
HTMLElement
*
HTMLIFrame_Create
(
HTMLDocumentNode
*
doc
,
nsIDOMHTMLElement
*
nselem
)
{
HTMLIFrame
*
ret
;
nsresult
nsres
;
ret
=
heap_alloc_zero
(
sizeof
(
HTMLIFrame
));
ret
->
framebase
.
element
.
node
.
vtbl
=
&
HTMLIFrameImplVtbl
;
nsres
=
nsIDOMHTMLElement_QueryInterface
(
nselem
,
&
IID_nsIDOMHTMLIFrameElement
,
(
void
**
)
&
ret
->
nsiframe
);
if
(
NS_FAILED
(
nsres
))
ERR
(
"Could not get nsIDOMHTMLIFrameElement iface: %08x
\n
"
,
nsres
);
HTMLFrameBase_Init
(
&
ret
->
framebase
,
doc
,
nselem
,
&
HTMLIFrame_dispex
);
return
&
ret
->
framebase
.
element
;
...
...
dlls/mshtml/mshtml_private.h
View file @
6e3e7c9f
...
...
@@ -504,6 +504,9 @@ struct HTMLFrameBase {
const
IHTMLFrameBase2Vtbl
*
lpIHTMLFrameBase2Vtbl
;
HTMLWindow
*
content_window
;
nsIDOMHTMLFrameElement
*
nsframe
;
nsIDOMHTMLIFrameElement
*
nsiframe
;
};
typedef
struct
_mutation_queue_t
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment