Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
3d9d3844
Commit
3d9d3844
authored
Mar 18, 2006
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 20, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Better QueryInterface implementation.
parent
ad05be73
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
83 additions
and
73 deletions
+83
-73
htmlbody.c
dlls/mshtml/htmlbody.c
+6
-8
htmlelem.c
dlls/mshtml/htmlelem.c
+28
-22
htmlinput.c
dlls/mshtml/htmlinput.c
+6
-8
htmlnode.c
dlls/mshtml/htmlnode.c
+28
-19
htmlselect.c
dlls/mshtml/htmlselect.c
+6
-8
htmltextarea.c
dlls/mshtml/htmltextarea.c
+6
-8
mshtml_private.h
dlls/mshtml/mshtml_private.h
+3
-0
No files found.
dlls/mshtml/htmlbody.c
View file @
3d9d3844
...
@@ -50,6 +50,7 @@ static HRESULT WINAPI HTMLBodyElement_QueryInterface(IHTMLBodyElement *iface,
...
@@ -50,6 +50,7 @@ static HRESULT WINAPI HTMLBodyElement_QueryInterface(IHTMLBodyElement *iface,
REFIID
riid
,
void
**
ppv
)
REFIID
riid
,
void
**
ppv
)
{
{
HTMLBodyElement
*
This
=
HTMLBODY_THIS
(
iface
);
HTMLBodyElement
*
This
=
HTMLBODY_THIS
(
iface
);
HRESULT
hres
;
*
ppv
=
NULL
;
*
ppv
=
NULL
;
...
@@ -62,12 +63,6 @@ static HRESULT WINAPI HTMLBodyElement_QueryInterface(IHTMLBodyElement *iface,
...
@@ -62,12 +63,6 @@ static HRESULT WINAPI HTMLBodyElement_QueryInterface(IHTMLBodyElement *iface,
}
else
if
(
IsEqualGUID
(
&
IID_IHTMLBodyElement
,
riid
))
{
}
else
if
(
IsEqualGUID
(
&
IID_IHTMLBodyElement
,
riid
))
{
TRACE
(
"(%p)->(IID_IHTMLBodyElement %p)
\n
"
,
This
,
ppv
);
TRACE
(
"(%p)->(IID_IHTMLBodyElement %p)
\n
"
,
This
,
ppv
);
*
ppv
=
HTMLBODY
(
This
);
*
ppv
=
HTMLBODY
(
This
);
}
else
if
(
IsEqualGUID
(
&
IID_IHTMLElement
,
riid
))
{
TRACE
(
"(%p)->(IID_IHTMLElement %p)
\n
"
,
This
,
ppv
);
*
ppv
=
HTMLELEM
(
This
->
element
);
}
else
if
(
IsEqualGUID
(
&
IID_IHTMLDOMNode
,
riid
))
{
TRACE
(
"(%p)->(IID_IHTMLDOMNode %p)
\n
"
,
This
,
ppv
);
*
ppv
=
HTMLDOMNODE
(
This
->
element
->
node
);
}
}
if
(
*
ppv
)
{
if
(
*
ppv
)
{
...
@@ -75,8 +70,11 @@ static HRESULT WINAPI HTMLBodyElement_QueryInterface(IHTMLBodyElement *iface,
...
@@ -75,8 +70,11 @@ static HRESULT WINAPI HTMLBodyElement_QueryInterface(IHTMLBodyElement *iface,
return
S_OK
;
return
S_OK
;
}
}
WARN
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppv
);
hres
=
HTMLElement_QI
(
This
->
element
,
riid
,
ppv
);
return
E_NOINTERFACE
;
if
(
FAILED
(
hres
))
WARN
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppv
);
return
hres
;
}
}
static
ULONG
WINAPI
HTMLBodyElement_AddRef
(
IHTMLBodyElement
*
iface
)
static
ULONG
WINAPI
HTMLBodyElement_AddRef
(
IHTMLBodyElement
*
iface
)
...
...
dlls/mshtml/htmlelem.c
View file @
3d9d3844
...
@@ -44,33 +44,16 @@ static HRESULT WINAPI HTMLElement_QueryInterface(IHTMLElement *iface,
...
@@ -44,33 +44,16 @@ static HRESULT WINAPI HTMLElement_QueryInterface(IHTMLElement *iface,
REFIID
riid
,
void
**
ppv
)
REFIID
riid
,
void
**
ppv
)
{
{
HTMLElement
*
This
=
HTMLELEM_THIS
(
iface
);
HTMLElement
*
This
=
HTMLELEM_THIS
(
iface
);
HRESULT
hres
;
if
(
This
->
impl
)
if
(
This
->
impl
)
return
IUnknown_QueryInterface
(
This
->
impl
,
riid
,
ppv
);
return
IUnknown_QueryInterface
(
This
->
impl
,
riid
,
ppv
);
*
ppv
=
NULL
;
hres
=
HTMLElement_QI
(
This
,
riid
,
ppv
);
if
(
FAILED
(
hres
))
WARN
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppv
);
if
(
IsEqualGUID
(
&
IID_IUnknown
,
riid
))
{
return
hres
;
TRACE
(
"(%p)->(IID_IUnknown %p)
\n
"
,
This
,
ppv
);
*
ppv
=
HTMLELEM
(
This
);
}
else
if
(
IsEqualGUID
(
&
IID_IDispatch
,
riid
))
{
TRACE
(
"(%p)->(IID_IDispatch %p)
\n
"
,
This
,
ppv
);
*
ppv
=
HTMLELEM
(
This
);
}
else
if
(
IsEqualGUID
(
&
IID_IHTMLDOMNode
,
riid
))
{
TRACE
(
"(%p)->(IID_IHTMLDOMNode %p)
\n
"
,
This
,
ppv
);
*
ppv
=
HTMLDOMNODE
(
This
->
node
);
}
else
if
(
IsEqualGUID
(
&
IID_IHTMLElement
,
riid
))
{
TRACE
(
"(%p)->(IID_IHTMLElement %p)
\n
"
,
This
,
ppv
);
*
ppv
=
HTMLELEM
(
This
);
}
if
(
*
ppv
)
{
IHTMLElement_AddRef
(
HTMLELEM
(
This
));
return
S_OK
;
}
FIXME
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppv
);
return
E_NOINTERFACE
;
}
}
static
ULONG
WINAPI
HTMLElement_AddRef
(
IHTMLElement
*
iface
)
static
ULONG
WINAPI
HTMLElement_AddRef
(
IHTMLElement
*
iface
)
...
@@ -939,6 +922,29 @@ static const IHTMLElementVtbl HTMLElementVtbl = {
...
@@ -939,6 +922,29 @@ static const IHTMLElementVtbl HTMLElementVtbl = {
HTMLElement_get_all
HTMLElement_get_all
};
};
HRESULT
HTMLElement_QI
(
HTMLElement
*
This
,
REFIID
riid
,
void
**
ppv
)
{
*
ppv
=
NULL
;
if
(
IsEqualGUID
(
&
IID_IUnknown
,
riid
))
{
TRACE
(
"(%p)->(IID_IUnknown %p)
\n
"
,
This
,
ppv
);
*
ppv
=
HTMLELEM
(
This
);
}
else
if
(
IsEqualGUID
(
&
IID_IDispatch
,
riid
))
{
TRACE
(
"(%p)->(IID_IDispatch %p)
\n
"
,
This
,
ppv
);
*
ppv
=
HTMLELEM
(
This
);
}
else
if
(
IsEqualGUID
(
&
IID_IHTMLElement
,
riid
))
{
TRACE
(
"(%p)->(IID_IHTMLElement %p)
\n
"
,
This
,
ppv
);
*
ppv
=
HTMLELEM
(
This
);
}
if
(
*
ppv
)
{
IHTMLElement_AddRef
(
HTMLELEM
(
This
));
return
S_OK
;
}
return
HTMLDOMNode_QI
(
This
->
node
,
riid
,
ppv
);
}
void
HTMLElement_Create
(
HTMLDOMNode
*
node
)
void
HTMLElement_Create
(
HTMLDOMNode
*
node
)
{
{
HTMLElement
*
ret
;
HTMLElement
*
ret
;
...
...
dlls/mshtml/htmlinput.c
View file @
3d9d3844
...
@@ -50,6 +50,7 @@ static HRESULT WINAPI HTMLInputElement_QueryInterface(IHTMLInputElement *iface,
...
@@ -50,6 +50,7 @@ static HRESULT WINAPI HTMLInputElement_QueryInterface(IHTMLInputElement *iface,
REFIID
riid
,
void
**
ppv
)
REFIID
riid
,
void
**
ppv
)
{
{
HTMLInputElement
*
This
=
HTMLINPUT_THIS
(
iface
);
HTMLInputElement
*
This
=
HTMLINPUT_THIS
(
iface
);
HRESULT
hres
;
*
ppv
=
NULL
;
*
ppv
=
NULL
;
...
@@ -62,12 +63,6 @@ static HRESULT WINAPI HTMLInputElement_QueryInterface(IHTMLInputElement *iface,
...
@@ -62,12 +63,6 @@ static HRESULT WINAPI HTMLInputElement_QueryInterface(IHTMLInputElement *iface,
}
else
if
(
IsEqualGUID
(
&
IID_IHTMLInputElement
,
riid
))
{
}
else
if
(
IsEqualGUID
(
&
IID_IHTMLInputElement
,
riid
))
{
TRACE
(
"(%p)->(IID_IHTMLInputElement %p)
\n
"
,
This
,
ppv
);
TRACE
(
"(%p)->(IID_IHTMLInputElement %p)
\n
"
,
This
,
ppv
);
*
ppv
=
HTMLINPUT
(
This
);
*
ppv
=
HTMLINPUT
(
This
);
}
else
if
(
IsEqualGUID
(
&
IID_IHTMLElement
,
riid
))
{
TRACE
(
"(%p)->(IID_IHTMLElement %p)
\n
"
,
This
,
ppv
);
*
ppv
=
HTMLELEM
(
This
->
element
);
}
else
if
(
IsEqualGUID
(
&
IID_IHTMLDOMNode
,
riid
))
{
TRACE
(
"(%p)->(IID_IHTMLDOMNode %p)
\n
"
,
This
,
ppv
);
*
ppv
=
HTMLDOMNODE
(
This
->
element
->
node
);
}
}
if
(
*
ppv
)
{
if
(
*
ppv
)
{
...
@@ -75,8 +70,11 @@ static HRESULT WINAPI HTMLInputElement_QueryInterface(IHTMLInputElement *iface,
...
@@ -75,8 +70,11 @@ static HRESULT WINAPI HTMLInputElement_QueryInterface(IHTMLInputElement *iface,
return
S_OK
;
return
S_OK
;
}
}
WARN
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppv
);
hres
=
HTMLElement_QI
(
This
->
element
,
riid
,
ppv
);
return
E_NOINTERFACE
;
if
(
FAILED
(
hres
))
WARN
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppv
);
return
hres
;
}
}
static
ULONG
WINAPI
HTMLInputElement_AddRef
(
IHTMLInputElement
*
iface
)
static
ULONG
WINAPI
HTMLInputElement_AddRef
(
IHTMLInputElement
*
iface
)
...
...
dlls/mshtml/htmlnode.c
View file @
3d9d3844
...
@@ -43,30 +43,16 @@ static HRESULT WINAPI HTMLDOMNode_QueryInterface(IHTMLDOMNode *iface,
...
@@ -43,30 +43,16 @@ static HRESULT WINAPI HTMLDOMNode_QueryInterface(IHTMLDOMNode *iface,
REFIID
riid
,
void
**
ppv
)
REFIID
riid
,
void
**
ppv
)
{
{
HTMLDOMNode
*
This
=
HTMLDOMNODE_THIS
(
iface
);
HTMLDOMNode
*
This
=
HTMLDOMNODE_THIS
(
iface
);
HRESULT
hres
;
if
(
This
->
impl
.
unk
)
if
(
This
->
impl
.
unk
)
return
IUnknown_QueryInterface
(
This
->
impl
.
unk
,
riid
,
ppv
);
return
IUnknown_QueryInterface
(
This
->
impl
.
unk
,
riid
,
ppv
);
*
ppv
=
NULL
;
hres
=
HTMLDOMNode_QI
(
This
,
riid
,
ppv
);
if
(
FAILED
(
hres
))
if
(
IsEqualGUID
(
&
IID_IUnknown
,
riid
))
{
WARN
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppv
);
TRACE
(
"(%p)->(IID_IUnknown %p)
\n
"
,
This
,
ppv
);
*
ppv
=
HTMLDOMNODE
(
This
);
}
else
if
(
IsEqualGUID
(
&
IID_IDispatch
,
riid
))
{
TRACE
(
"(%p)->(IID_IDispatch %p)
\n
"
,
This
,
ppv
);
*
ppv
=
HTMLDOMNODE
(
This
);
}
else
if
(
IsEqualGUID
(
&
IID_IHTMLDOMNode
,
riid
))
{
TRACE
(
"(%p)->(IID_IHTMLDOMNode %p)
\n
"
,
This
,
ppv
);
*
ppv
=
HTMLDOMNODE
(
This
);
}
if
(
*
ppv
)
{
IUnknown_AddRef
((
IUnknown
*
)
*
ppv
);
return
S_OK
;
}
WARN
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppv
);
return
hres
;
return
E_NOINTERFACE
;
}
}
static
ULONG
WINAPI
HTMLDOMNode_AddRef
(
IHTMLDOMNode
*
iface
)
static
ULONG
WINAPI
HTMLDOMNode_AddRef
(
IHTMLDOMNode
*
iface
)
...
@@ -304,6 +290,29 @@ static const IHTMLDOMNodeVtbl HTMLDOMNodeVtbl = {
...
@@ -304,6 +290,29 @@ static const IHTMLDOMNodeVtbl HTMLDOMNodeVtbl = {
HTMLDOMNode_get_nextSibling
HTMLDOMNode_get_nextSibling
};
};
HRESULT
HTMLDOMNode_QI
(
HTMLDOMNode
*
This
,
REFIID
riid
,
void
**
ppv
)
{
*
ppv
=
NULL
;
if
(
IsEqualGUID
(
&
IID_IUnknown
,
riid
))
{
TRACE
(
"(%p)->(IID_IUnknown %p)
\n
"
,
This
,
ppv
);
*
ppv
=
HTMLDOMNODE
(
This
);
}
else
if
(
IsEqualGUID
(
&
IID_IDispatch
,
riid
))
{
TRACE
(
"(%p)->(IID_IDispatch %p)
\n
"
,
This
,
ppv
);
*
ppv
=
HTMLDOMNODE
(
This
);
}
else
if
(
IsEqualGUID
(
&
IID_IHTMLDOMNode
,
riid
))
{
TRACE
(
"(%p)->(IID_IHTMLDOMNode %p)
\n
"
,
This
,
ppv
);
*
ppv
=
HTMLDOMNODE
(
This
);
}
if
(
*
ppv
)
{
IUnknown_AddRef
((
IUnknown
*
)
*
ppv
);
return
S_OK
;
}
return
E_NOINTERFACE
;
}
/*
/*
* FIXME
* FIXME
* List looks really ugly here. We should use a better data structure or
* List looks really ugly here. We should use a better data structure or
...
...
dlls/mshtml/htmlselect.c
View file @
3d9d3844
...
@@ -50,6 +50,7 @@ static HRESULT WINAPI HTMLSelectElement_QueryInterface(IHTMLSelectElement *iface
...
@@ -50,6 +50,7 @@ static HRESULT WINAPI HTMLSelectElement_QueryInterface(IHTMLSelectElement *iface
REFIID
riid
,
void
**
ppv
)
REFIID
riid
,
void
**
ppv
)
{
{
HTMLSelectElement
*
This
=
HTMLSELECT_THIS
(
iface
);
HTMLSelectElement
*
This
=
HTMLSELECT_THIS
(
iface
);
HRESULT
hres
;
*
ppv
=
NULL
;
*
ppv
=
NULL
;
...
@@ -62,12 +63,6 @@ static HRESULT WINAPI HTMLSelectElement_QueryInterface(IHTMLSelectElement *iface
...
@@ -62,12 +63,6 @@ static HRESULT WINAPI HTMLSelectElement_QueryInterface(IHTMLSelectElement *iface
}
else
if
(
IsEqualGUID
(
&
IID_IHTMLSelectElement
,
riid
))
{
}
else
if
(
IsEqualGUID
(
&
IID_IHTMLSelectElement
,
riid
))
{
TRACE
(
"(%p)->(IID_IHTMLSelectElement %p)
\n
"
,
This
,
ppv
);
TRACE
(
"(%p)->(IID_IHTMLSelectElement %p)
\n
"
,
This
,
ppv
);
*
ppv
=
HTMLSELECT
(
This
);
*
ppv
=
HTMLSELECT
(
This
);
}
else
if
(
IsEqualGUID
(
&
IID_IHTMLElement
,
riid
))
{
TRACE
(
"(%p)->(IID_IHTMLElement %p)
\n
"
,
This
,
ppv
);
*
ppv
=
HTMLELEM
(
This
->
element
);
}
else
if
(
IsEqualGUID
(
&
IID_IHTMLDOMNode
,
riid
))
{
TRACE
(
"(%p)->(IID_IHTMLDOMNode %p)
\n
"
,
This
,
ppv
);
*
ppv
=
HTMLDOMNODE
(
This
->
element
->
node
);
}
}
if
(
*
ppv
)
{
if
(
*
ppv
)
{
...
@@ -75,8 +70,11 @@ static HRESULT WINAPI HTMLSelectElement_QueryInterface(IHTMLSelectElement *iface
...
@@ -75,8 +70,11 @@ static HRESULT WINAPI HTMLSelectElement_QueryInterface(IHTMLSelectElement *iface
return
S_OK
;
return
S_OK
;
}
}
WARN
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppv
);
hres
=
HTMLElement_QI
(
This
->
element
,
riid
,
ppv
);
return
E_NOINTERFACE
;
if
(
FAILED
(
hres
))
WARN
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppv
);
return
hres
;
}
}
static
ULONG
WINAPI
HTMLSelectElement_AddRef
(
IHTMLSelectElement
*
iface
)
static
ULONG
WINAPI
HTMLSelectElement_AddRef
(
IHTMLSelectElement
*
iface
)
...
...
dlls/mshtml/htmltextarea.c
View file @
3d9d3844
...
@@ -50,6 +50,7 @@ static HRESULT WINAPI HTMLTextAreaElement_QueryInterface(IHTMLTextAreaElement *i
...
@@ -50,6 +50,7 @@ static HRESULT WINAPI HTMLTextAreaElement_QueryInterface(IHTMLTextAreaElement *i
REFIID
riid
,
void
**
ppv
)
REFIID
riid
,
void
**
ppv
)
{
{
HTMLTextAreaElement
*
This
=
HTMLTXTAREA_THIS
(
iface
);
HTMLTextAreaElement
*
This
=
HTMLTXTAREA_THIS
(
iface
);
HRESULT
hres
;
*
ppv
=
NULL
;
*
ppv
=
NULL
;
...
@@ -62,12 +63,6 @@ static HRESULT WINAPI HTMLTextAreaElement_QueryInterface(IHTMLTextAreaElement *i
...
@@ -62,12 +63,6 @@ static HRESULT WINAPI HTMLTextAreaElement_QueryInterface(IHTMLTextAreaElement *i
}
else
if
(
IsEqualGUID
(
&
IID_IHTMLTextAreaElement
,
riid
))
{
}
else
if
(
IsEqualGUID
(
&
IID_IHTMLTextAreaElement
,
riid
))
{
TRACE
(
"(%p)->(IID_IHTMLTextAreaElement %p)
\n
"
,
This
,
ppv
);
TRACE
(
"(%p)->(IID_IHTMLTextAreaElement %p)
\n
"
,
This
,
ppv
);
*
ppv
=
HTMLTXTAREA
(
This
);
*
ppv
=
HTMLTXTAREA
(
This
);
}
else
if
(
IsEqualGUID
(
&
IID_IHTMLElement
,
riid
))
{
TRACE
(
"(%p)->(IID_IHTMLElement %p)
\n
"
,
This
,
ppv
);
*
ppv
=
HTMLELEM
(
This
->
element
);
}
else
if
(
IsEqualGUID
(
&
IID_IHTMLDOMNode
,
riid
))
{
TRACE
(
"(%p)->(IID_IHTMLDOMNode %p)
\n
"
,
This
,
ppv
);
*
ppv
=
HTMLDOMNODE
(
This
->
element
->
node
);
}
}
if
(
*
ppv
)
{
if
(
*
ppv
)
{
...
@@ -75,8 +70,11 @@ static HRESULT WINAPI HTMLTextAreaElement_QueryInterface(IHTMLTextAreaElement *i
...
@@ -75,8 +70,11 @@ static HRESULT WINAPI HTMLTextAreaElement_QueryInterface(IHTMLTextAreaElement *i
return
S_OK
;
return
S_OK
;
}
}
WARN
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppv
);
hres
=
HTMLElement_QI
(
This
->
element
,
riid
,
ppv
);
return
E_NOINTERFACE
;
if
(
FAILED
(
hres
))
WARN
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppv
);
return
hres
;
}
}
static
ULONG
WINAPI
HTMLTextAreaElement_AddRef
(
IHTMLTextAreaElement
*
iface
)
static
ULONG
WINAPI
HTMLTextAreaElement_AddRef
(
IHTMLTextAreaElement
*
iface
)
...
...
dlls/mshtml/mshtml_private.h
View file @
3d9d3844
...
@@ -217,6 +217,9 @@ void HTMLInputElement_Create(HTMLElement*);
...
@@ -217,6 +217,9 @@ void HTMLInputElement_Create(HTMLElement*);
void
HTMLSelectElement_Create
(
HTMLElement
*
);
void
HTMLSelectElement_Create
(
HTMLElement
*
);
void
HTMLTextAreaElement_Create
(
HTMLElement
*
);
void
HTMLTextAreaElement_Create
(
HTMLElement
*
);
HRESULT
HTMLDOMNode_QI
(
HTMLDOMNode
*
,
REFIID
,
void
**
);
HRESULT
HTMLElement_QI
(
HTMLElement
*
,
REFIID
,
void
**
);
HTMLDOMNode
*
get_node
(
HTMLDocument
*
,
nsIDOMNode
*
);
HTMLDOMNode
*
get_node
(
HTMLDocument
*
,
nsIDOMNode
*
);
void
release_nodes
(
HTMLDocument
*
);
void
release_nodes
(
HTMLDocument
*
);
...
...
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