[PATCH v2 01/16] mshtml: Add names for each object and use it in the Navigator.
Jacek Caban
jacek at codeweavers.com
Tue Oct 5 14:18:09 CDT 2021
On 10/5/21 4:18 PM, Gabriel Ivăncescu wrote:
> Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
> ---
>
> All the names match native, and will be tested later when more are
> implemented.
>
> dlls/mshtml/dispex.c | 29 +++++++++++++++++++++++++++++
> dlls/mshtml/htmlanchor.c | 1 +
> dlls/mshtml/htmlarea.c | 1 +
> dlls/mshtml/htmlattr.c | 1 +
> dlls/mshtml/htmlbody.c | 1 +
> dlls/mshtml/htmlcomment.c | 1 +
> dlls/mshtml/htmlcurstyle.c | 1 +
> dlls/mshtml/htmldoc.c | 2 ++
> dlls/mshtml/htmlelem.c | 6 ++++++
> dlls/mshtml/htmlelemcol.c | 1 +
> dlls/mshtml/htmlevent.c | 6 ++++++
> dlls/mshtml/htmlform.c | 1 +
> dlls/mshtml/htmlframe.c | 2 ++
> dlls/mshtml/htmlgeneric.c | 1 +
> dlls/mshtml/htmlhead.c | 4 ++++
> dlls/mshtml/htmlimg.c | 2 ++
> dlls/mshtml/htmlinput.c | 3 +++
> dlls/mshtml/htmllink.c | 1 +
> dlls/mshtml/htmllocation.c | 1 +
> dlls/mshtml/htmlnode.c | 2 ++
> dlls/mshtml/htmlobject.c | 2 ++
> dlls/mshtml/htmlscript.c | 1 +
> dlls/mshtml/htmlselect.c | 3 +++
> dlls/mshtml/htmlstorage.c | 1 +
> dlls/mshtml/htmlstyle.c | 2 ++
> dlls/mshtml/htmlstyleelem.c | 1 +
> dlls/mshtml/htmlstylesheet.c | 4 ++++
> dlls/mshtml/htmltable.c | 3 +++
> dlls/mshtml/htmltextarea.c | 1 +
> dlls/mshtml/htmltextnode.c | 1 +
> dlls/mshtml/htmlwindow.c | 1 +
> dlls/mshtml/mshtml_private.h | 2 ++
> dlls/mshtml/omnavigator.c | 18 ++++++++++++------
> dlls/mshtml/range.c | 2 ++
> dlls/mshtml/selection.c | 1 +
> dlls/mshtml/xmlhttprequest.c | 2 ++
> 36 files changed, 106 insertions(+), 6 deletions(-)
>
> diff --git a/dlls/mshtml/dispex.c b/dlls/mshtml/dispex.c
> index 64ead8f..26aab5e 100644
> --- a/dlls/mshtml/dispex.c
> +++ b/dlls/mshtml/dispex.c
> @@ -886,6 +886,7 @@ static const dispex_static_data_vtbl_t function_dispex_vtbl = {
> static const tid_t function_iface_tids[] = {0};
>
> static dispex_static_data_t function_dispex = {
> + NULL,
The patch looks mostly good, but we're so close to having those names
for all objects, that I think it would be best to do it a be able to
assume that all objects have name in their description. In this case I
believe that this should be "Function". I have suggestions for missing
ones bellow.
> static dispex_static_data_t HTMLCommentElement_dispex = {
> + NULL,
> NULL,
> DispHTMLCommentElement_tid,
> HTMLCommentElement_iface_tids,
if(v >= 9) {
document.body.innerHTML = "<!--...-->";
test("comment", document.body.firstChild, "Comment");
}
> @@ -5949,6 +5950,7 @@ static const tid_t HTMLDocumentObj_iface_tids[] = {
> 0
> };
> static dispex_static_data_t HTMLDocumentObj_dispex = {
> + NULL,
> NULL,
> DispHTMLDocument_tid,
> HTMLDocumentObj_iface_tids
This one is not a real DOM object and always uses quicks mode for
dispex. We may just use an internal name here, say "HTMLDocumentObj",
because it will not matter now.
> @@ -7053,6 +7057,7 @@ static const tid_t HTMLFiltersCollection_iface_tids[] = {
> 0
> };
> static dispex_static_data_t HTMLFiltersCollection_dispex = {
> + NULL,
> &HTMLFiltersCollection_dispex_vtbl,
> IHTMLFiltersCollection_tid,
> HTMLFiltersCollection_iface_tids
I can see that it returns [object] in IE9 mode, but maybe we could
simply always create it with older compat mode and have an internal fake
name here?
> @@ -974,6 +975,7 @@ static const dispex_static_data_vtbl_t HTMLImageElementFactory_dispex_vtbl = {
> };
>
> static dispex_static_data_t HTMLImageElementFactory_dispex = {
> + NULL,
> &HTMLImageElementFactory_dispex_vtbl,
> IHTMLImageElementFactory_tid,
> HTMLImageElementFactory_iface_tids
That would be "Function".
> diff --git a/dlls/mshtml/htmlinput.c b/dlls/mshtml/htmlinput.c
> index 1a0a739..e9b53da 100644
> --- a/dlls/mshtml/htmlinput.c
> +++ b/dlls/mshtml/htmlinput.c
> @@ -1441,6 +1441,7 @@ static const tid_t HTMLInputElement_iface_tids[] = {
> 0
> };
> static dispex_static_data_t HTMLInputElement_dispex = {
> + L"HTMLInputElement",
> NULL,
> DispHTMLInputElement_tid,
> HTMLInputElement_iface_tids,
> @@ -1637,6 +1638,7 @@ static const tid_t HTMLLabelElement_iface_tids[] = {
> };
>
> static dispex_static_data_t HTMLLabelElement_dispex = {
> + L"HTMLLabelElement",
> NULL,
> DispHTMLLabelElement_tid,
> HTMLLabelElement_iface_tids,
> @@ -1983,6 +1985,7 @@ static const tid_t HTMLButtonElement_iface_tids[] = {
> };
>
> static dispex_static_data_t HTMLButtonElement_dispex = {
> + L"HTMLButtonElement",
> NULL,
> DispHTMLButtonElement_tid,
> HTMLButtonElement_iface_tids,
> diff --git a/dlls/mshtml/htmllink.c b/dlls/mshtml/htmllink.c
> index ddf67ca..1dd4873 100644
> --- a/dlls/mshtml/htmllink.c
> +++ b/dlls/mshtml/htmllink.c
> @@ -446,6 +446,7 @@ static const tid_t HTMLLinkElement_iface_tids[] = {
> 0
> };
> static dispex_static_data_t HTMLLinkElement_dispex = {
> + L"HTMLLinkElement",
> NULL,
> DispHTMLLinkElement_tid,
> HTMLLinkElement_iface_tids,
> diff --git a/dlls/mshtml/htmllocation.c b/dlls/mshtml/htmllocation.c
> index a85c9a6..85dfc40 100644
> --- a/dlls/mshtml/htmllocation.c
> +++ b/dlls/mshtml/htmllocation.c
> @@ -631,6 +631,7 @@ static const tid_t HTMLLocation_iface_tids[] = {
> 0
> };
> static dispex_static_data_t HTMLLocation_dispex = {
> + L"Object",
> NULL,
> DispHTMLLocation_tid,
> HTMLLocation_iface_tids
> diff --git a/dlls/mshtml/htmlnode.c b/dlls/mshtml/htmlnode.c
> index b5ff02b..6e65581 100644
> --- a/dlls/mshtml/htmlnode.c
> +++ b/dlls/mshtml/htmlnode.c
> @@ -429,6 +429,7 @@ static const tid_t HTMLDOMChildrenCollection_iface_tids[] = {
> };
>
> static dispex_static_data_t HTMLDOMChildrenCollection_dispex = {
> + L"NodeList",
> &HTMLDOMChildrenCollection_dispex_vtbl,
> DispDOMChildrenCollection_tid,
> HTMLDOMChildrenCollection_iface_tids,
> @@ -1476,6 +1477,7 @@ static const tid_t HTMLDOMNode_iface_tids[] = {
> 0
> };
> static dispex_static_data_t HTMLDOMNode_dispex = {
> + NULL,
> NULL,
> IHTMLDOMNode_tid,
> HTMLDOMNode_iface_tids,
"Node" should be fine.
> @@ -595,6 +596,7 @@ static const tid_t HTMLOptionElementFactory_iface_tids[] = {
> };
>
> static dispex_static_data_t HTMLOptionElementFactory_dispex = {
> + NULL,
> NULL,
> IHTMLOptionElementFactory_tid,
> HTMLOptionElementFactory_iface_tids,
"Function"
> diff --git a/dlls/mshtml/xmlhttprequest.c b/dlls/mshtml/xmlhttprequest.c
> index d7d8ce5..70a332c 100644
> --- a/dlls/mshtml/xmlhttprequest.c
> +++ b/dlls/mshtml/xmlhttprequest.c
> @@ -895,6 +895,7 @@ static const tid_t HTMLXMLHttpRequest_iface_tids[] = {
> 0
> };
> static dispex_static_data_t HTMLXMLHttpRequest_dispex = {
> + L"XMLHttpRequest",
> &HTMLXMLHttpRequest_event_target_vtbl.dispex_vtbl,
> DispHTMLXMLHttpRequest_tid,
> HTMLXMLHttpRequest_iface_tids,
> @@ -1066,6 +1067,7 @@ static const tid_t HTMLXMLHttpRequestFactory_iface_tids[] = {
> 0
> };
> static dispex_static_data_t HTMLXMLHttpRequestFactory_dispex = {
> + NULL,
> &HTMLXMLHttpRequestFactory_dispex_vtbl,
> IHTMLXMLHttpRequestFactory_tid,
> HTMLXMLHttpRequestFactory_iface_tids
"Function"
Thanks,
Jacek
More information about the wine-devel
mailing list