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
baf9db63
Commit
baf9db63
authored
Mar 31, 2016
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 31, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added HTMLHtmlElement object implementation.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a02edb12
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
198 additions
and
2 deletions
+198
-2
htmlelem.c
dlls/mshtml/htmlelem.c
+2
-0
htmlhead.c
dlls/mshtml/htmlhead.c
+184
-0
mshtml_private.h
dlls/mshtml/mshtml_private.h
+3
-0
dom.c
dlls/mshtml/tests/dom.c
+9
-2
No files found.
dlls/mshtml/htmlelem.c
View file @
baf9db63
...
...
@@ -46,6 +46,7 @@ static const WCHAR embedW[] = {'E','M','B','E','D',0};
static
const
WCHAR
formW
[]
=
{
'F'
,
'O'
,
'R'
,
'M'
,
0
};
static
const
WCHAR
frameW
[]
=
{
'F'
,
'R'
,
'A'
,
'M'
,
'E'
,
0
};
static
const
WCHAR
headW
[]
=
{
'H'
,
'E'
,
'A'
,
'D'
,
0
};
static
const
WCHAR
htmlW
[]
=
{
'H'
,
'T'
,
'M'
,
'L'
,
0
};
static
const
WCHAR
iframeW
[]
=
{
'I'
,
'F'
,
'R'
,
'A'
,
'M'
,
'E'
,
0
};
static
const
WCHAR
imgW
[]
=
{
'I'
,
'M'
,
'G'
,
0
};
static
const
WCHAR
inputW
[]
=
{
'I'
,
'N'
,
'P'
,
'U'
,
'T'
,
0
};
...
...
@@ -81,6 +82,7 @@ static const tag_desc_t tag_descs[] = {
{
formW
,
HTMLFormElement_Create
},
{
frameW
,
HTMLFrameElement_Create
},
{
headW
,
HTMLHeadElement_Create
},
{
htmlW
,
HTMLHtmlElement_Create
},
{
iframeW
,
HTMLIFrame_Create
},
{
imgW
,
HTMLImgElement_Create
},
{
inputW
,
HTMLInputElement_Create
},
...
...
dlls/mshtml/htmlhead.c
View file @
baf9db63
...
...
@@ -24,6 +24,7 @@
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
#include "mshtmdid.h"
#include "wine/debug.h"
...
...
@@ -193,6 +194,189 @@ HRESULT HTMLTitleElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem
typedef
struct
{
HTMLElement
element
;
IHTMLHtmlElement
IHTMLHtmlElement_iface
;
}
HTMLHtmlElement
;
static
inline
HTMLHtmlElement
*
impl_from_IHTMLHtmlElement
(
IHTMLHtmlElement
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
HTMLHtmlElement
,
IHTMLHtmlElement_iface
);
}
static
HRESULT
WINAPI
HTMLHtmlElement_QueryInterface
(
IHTMLHtmlElement
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
HTMLHtmlElement
*
This
=
impl_from_IHTMLHtmlElement
(
iface
);
return
IHTMLDOMNode_QueryInterface
(
&
This
->
element
.
node
.
IHTMLDOMNode_iface
,
riid
,
ppv
);
}
static
ULONG
WINAPI
HTMLHtmlElement_AddRef
(
IHTMLHtmlElement
*
iface
)
{
HTMLHtmlElement
*
This
=
impl_from_IHTMLHtmlElement
(
iface
);
return
IHTMLDOMNode_AddRef
(
&
This
->
element
.
node
.
IHTMLDOMNode_iface
);
}
static
ULONG
WINAPI
HTMLHtmlElement_Release
(
IHTMLHtmlElement
*
iface
)
{
HTMLHtmlElement
*
This
=
impl_from_IHTMLHtmlElement
(
iface
);
return
IHTMLDOMNode_Release
(
&
This
->
element
.
node
.
IHTMLDOMNode_iface
);
}
static
HRESULT
WINAPI
HTMLHtmlElement_GetTypeInfoCount
(
IHTMLHtmlElement
*
iface
,
UINT
*
pctinfo
)
{
HTMLHtmlElement
*
This
=
impl_from_IHTMLHtmlElement
(
iface
);
return
IDispatchEx_GetTypeInfoCount
(
&
This
->
element
.
node
.
event_target
.
dispex
.
IDispatchEx_iface
,
pctinfo
);
}
static
HRESULT
WINAPI
HTMLHtmlElement_GetTypeInfo
(
IHTMLHtmlElement
*
iface
,
UINT
iTInfo
,
LCID
lcid
,
ITypeInfo
**
ppTInfo
)
{
HTMLHtmlElement
*
This
=
impl_from_IHTMLHtmlElement
(
iface
);
return
IDispatchEx_GetTypeInfo
(
&
This
->
element
.
node
.
event_target
.
dispex
.
IDispatchEx_iface
,
iTInfo
,
lcid
,
ppTInfo
);
}
static
HRESULT
WINAPI
HTMLHtmlElement_GetIDsOfNames
(
IHTMLHtmlElement
*
iface
,
REFIID
riid
,
LPOLESTR
*
rgszNames
,
UINT
cNames
,
LCID
lcid
,
DISPID
*
rgDispId
)
{
HTMLHtmlElement
*
This
=
impl_from_IHTMLHtmlElement
(
iface
);
return
IDispatchEx_GetIDsOfNames
(
&
This
->
element
.
node
.
event_target
.
dispex
.
IDispatchEx_iface
,
riid
,
rgszNames
,
cNames
,
lcid
,
rgDispId
);
}
static
HRESULT
WINAPI
HTMLHtmlElement_Invoke
(
IHTMLHtmlElement
*
iface
,
DISPID
dispIdMember
,
REFIID
riid
,
LCID
lcid
,
WORD
wFlags
,
DISPPARAMS
*
pDispParams
,
VARIANT
*
pVarResult
,
EXCEPINFO
*
pExcepInfo
,
UINT
*
puArgErr
)
{
HTMLHtmlElement
*
This
=
impl_from_IHTMLHtmlElement
(
iface
);
return
IDispatchEx_Invoke
(
&
This
->
element
.
node
.
event_target
.
dispex
.
IDispatchEx_iface
,
dispIdMember
,
riid
,
lcid
,
wFlags
,
pDispParams
,
pVarResult
,
pExcepInfo
,
puArgErr
);
}
static
HRESULT
WINAPI
HTMLHtmlElement_put_version
(
IHTMLHtmlElement
*
iface
,
BSTR
v
)
{
HTMLHtmlElement
*
This
=
impl_from_IHTMLHtmlElement
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
HTMLHtmlElement_get_version
(
IHTMLHtmlElement
*
iface
,
BSTR
*
p
)
{
HTMLHtmlElement
*
This
=
impl_from_IHTMLHtmlElement
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
}
static
const
IHTMLHtmlElementVtbl
HTMLHtmlElementVtbl
=
{
HTMLHtmlElement_QueryInterface
,
HTMLHtmlElement_AddRef
,
HTMLHtmlElement_Release
,
HTMLHtmlElement_GetTypeInfoCount
,
HTMLHtmlElement_GetTypeInfo
,
HTMLHtmlElement_GetIDsOfNames
,
HTMLHtmlElement_Invoke
,
HTMLHtmlElement_put_version
,
HTMLHtmlElement_get_version
};
static
inline
HTMLHtmlElement
*
HTMLHtmlElement_from_HTMLDOMNode
(
HTMLDOMNode
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
HTMLHtmlElement
,
element
.
node
);
}
static
HRESULT
HTMLHtmlElement_QI
(
HTMLDOMNode
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
HTMLHtmlElement
*
This
=
HTMLHtmlElement_from_HTMLDOMNode
(
iface
);
TRACE
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_mshtml_guid
(
riid
),
ppv
);
if
(
IsEqualGUID
(
&
IID_IHTMLHtmlElement
,
riid
))
*
ppv
=
&
This
->
IHTMLHtmlElement_iface
;
else
return
HTMLElement_QI
(
&
This
->
element
.
node
,
riid
,
ppv
);
IUnknown_AddRef
((
IUnknown
*
)
*
ppv
);
return
S_OK
;
}
static
void
HTMLHtmlElement_destructor
(
HTMLDOMNode
*
iface
)
{
HTMLHtmlElement
*
This
=
HTMLHtmlElement_from_HTMLDOMNode
(
iface
);
HTMLElement_destructor
(
&
This
->
element
.
node
);
}
static
BOOL
HTMLHtmlElement_is_settable
(
HTMLDOMNode
*
iface
,
DISPID
dispid
)
{
switch
(
dispid
)
{
case
DISPID_IHTMLELEMENT_OUTERTEXT
:
return
FALSE
;
default:
return
TRUE
;
}
}
static
const
NodeImplVtbl
HTMLHtmlElementImplVtbl
=
{
HTMLHtmlElement_QI
,
HTMLHtmlElement_destructor
,
HTMLElement_cpc
,
HTMLElement_clone
,
HTMLElement_handle_event
,
HTMLElement_get_attr_col
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
HTMLHtmlElement_is_settable
};
static
const
tid_t
HTMLHtmlElement_iface_tids
[]
=
{
HTMLELEMENT_TIDS
,
IHTMLHtmlElement_tid
,
0
};
static
dispex_static_data_t
HTMLHtmlElement_dispex
=
{
NULL
,
DispHTMLHtmlElement_tid
,
NULL
,
HTMLHtmlElement_iface_tids
};
HRESULT
HTMLHtmlElement_Create
(
HTMLDocumentNode
*
doc
,
nsIDOMHTMLElement
*
nselem
,
HTMLElement
**
elem
)
{
HTMLHtmlElement
*
ret
;
ret
=
heap_alloc_zero
(
sizeof
(
*
ret
));
if
(
!
ret
)
return
E_OUTOFMEMORY
;
ret
->
IHTMLHtmlElement_iface
.
lpVtbl
=
&
HTMLHtmlElementVtbl
;
ret
->
element
.
node
.
vtbl
=
&
HTMLHtmlElementImplVtbl
;
HTMLElement_Init
(
&
ret
->
element
,
doc
,
nselem
,
&
HTMLHtmlElement_dispex
);
*
elem
=
&
ret
->
element
;
return
S_OK
;
}
typedef
struct
{
HTMLElement
element
;
IHTMLHeadElement
IHTMLHeadElement_iface
;
}
HTMLHeadElement
;
...
...
dlls/mshtml/mshtml_private.h
View file @
baf9db63
...
...
@@ -94,6 +94,7 @@ typedef struct event_target_t event_target_t;
XDIID(DispHTMLGenericElement) \
XDIID(DispHTMLFrameElement) \
XDIID(DispHTMLHeadElement) \
XDIID(DispHTMLHtmlElement) \
XDIID(DispHTMLHistory) \
XDIID(DispHTMLIFrame) \
XDIID(DispHTMLImg) \
...
...
@@ -162,6 +163,7 @@ typedef struct event_target_t event_target_t;
XIID(IHTMLFrameElement3) \
XIID(IHTMLGenericElement) \
XIID(IHTMLHeadElement) \
XIID(IHTMLHtmlElement) \
XIID(IHTMLIFrameElement) \
XIID(IHTMLIFrameElement2) \
XIID(IHTMLIFrameElement3) \
...
...
@@ -968,6 +970,7 @@ HRESULT HTMLEmbedElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement
HRESULT
HTMLFormElement_Create
(
HTMLDocumentNode
*
,
nsIDOMHTMLElement
*
,
HTMLElement
**
)
DECLSPEC_HIDDEN
;
HRESULT
HTMLFrameElement_Create
(
HTMLDocumentNode
*
,
nsIDOMHTMLElement
*
,
HTMLElement
**
)
DECLSPEC_HIDDEN
;
HRESULT
HTMLHeadElement_Create
(
HTMLDocumentNode
*
,
nsIDOMHTMLElement
*
,
HTMLElement
**
)
DECLSPEC_HIDDEN
;
HRESULT
HTMLHtmlElement_Create
(
HTMLDocumentNode
*
,
nsIDOMHTMLElement
*
,
HTMLElement
**
)
DECLSPEC_HIDDEN
;
HRESULT
HTMLIFrame_Create
(
HTMLDocumentNode
*
,
nsIDOMHTMLElement
*
,
HTMLElement
**
)
DECLSPEC_HIDDEN
;
HRESULT
HTMLStyleElement_Create
(
HTMLDocumentNode
*
,
nsIDOMHTMLElement
*
,
HTMLElement
**
)
DECLSPEC_HIDDEN
;
HRESULT
HTMLImgElement_Create
(
HTMLDocumentNode
*
,
nsIDOMHTMLElement
*
,
HTMLElement
**
)
DECLSPEC_HIDDEN
;
...
...
dlls/mshtml/tests/dom.c
View file @
baf9db63
...
...
@@ -328,6 +328,13 @@ static const IID * const frame_iids[] = {
NULL
};
static
const
IID
*
const
html_iids
[]
=
{
ELEM_IFACES
,
&
IID_IHTMLHtmlElement
,
&
IID_IConnectionPointContainer
,
NULL
};
static
const
IID
*
const
head_iids
[]
=
{
ELEM_IFACES
,
&
IID_IHTMLHeadElement
,
...
...
@@ -449,7 +456,7 @@ typedef struct {
static
const
elem_type_info_t
elem_type_infos
[]
=
{
{
""
,
none_iids
,
NULL
},
{
"HTML"
,
elem_iids
,
NULL
},
{
"HTML"
,
html_iids
,
&
DIID_DispHTMLHtmlElement
},
{
"HEAD"
,
head_iids
,
&
DIID_DispHTMLHeadElement
},
{
"TITLE"
,
title_iids
,
&
DIID_DispHTMLTitleElement
},
{
"BODY"
,
body_iids
,
&
DIID_DispHTMLBody
},
...
...
@@ -6353,7 +6360,7 @@ static void test_doc_elem(IHTMLDocument2 *doc)
test_node_name
((
IUnknown
*
)
elem
,
"HTML"
);
test_elem_tag
((
IUnknown
*
)
elem
,
"HTML"
);
t
odo_wine
t
est_elem_set_outertext_fail
(
elem
);
test_elem_set_outertext_fail
(
elem
);
doc_node
=
get_doc_node
(
doc
);
owner_doc
=
get_owner_doc
((
IUnknown
*
)
elem
);
...
...
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