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
0a03ae75
Commit
0a03ae75
authored
Aug 23, 2011
by
Piotr Caban
Committed by
Alexandre Julliard
Aug 23, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Populate dynamic properties table in get_dynamic_data.
parent
423c6f94
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
114 additions
and
19 deletions
+114
-19
dispex.c
dlls/mshtml/dispex.c
+17
-13
htmldoc.c
dlls/mshtml/htmldoc.c
+2
-1
htmlelem.c
dlls/mshtml/htmlelem.c
+86
-2
htmlelemcol.c
dlls/mshtml/htmlelemcol.c
+2
-1
htmlimg.c
dlls/mshtml/htmlimg.c
+1
-0
htmlnode.c
dlls/mshtml/htmlnode.c
+2
-1
htmlstyle.c
dlls/mshtml/htmlstyle.c
+1
-0
htmlwindow.c
dlls/mshtml/htmlwindow.c
+2
-1
mshtml_private.h
dlls/mshtml/mshtml_private.h
+1
-0
No files found.
dlls/mshtml/dispex.c
View file @
0a03ae75
...
@@ -366,11 +366,19 @@ static HRESULT variant_copy(VARIANT *dest, VARIANT *src)
...
@@ -366,11 +366,19 @@ static HRESULT variant_copy(VARIANT *dest, VARIANT *src)
return
VariantCopy
(
dest
,
src
);
return
VariantCopy
(
dest
,
src
);
}
}
static
inline
dispex_dynamic_data_t
*
get_dynamic_data
(
DispatchEx
*
This
,
BOOL
alloc
)
static
inline
dispex_dynamic_data_t
*
get_dynamic_data
(
DispatchEx
*
This
)
{
{
return
!
alloc
||
This
->
dynamic_data
if
(
This
->
dynamic_data
)
?
This
->
dynamic_data
return
This
->
dynamic_data
;
:
(
This
->
dynamic_data
=
heap_alloc_zero
(
sizeof
(
dispex_dynamic_data_t
)));
This
->
dynamic_data
=
heap_alloc_zero
(
sizeof
(
dispex_dynamic_data_t
));
if
(
!
This
->
dynamic_data
)
return
NULL
;
if
(
This
->
data
->
vtbl
&&
This
->
data
->
vtbl
->
populate_props
)
This
->
data
->
vtbl
->
populate_props
(
This
);
return
This
->
dynamic_data
;
}
}
static
HRESULT
get_dynamic_prop
(
DispatchEx
*
This
,
const
WCHAR
*
name
,
DWORD
flags
,
dynamic_prop_t
**
ret
)
static
HRESULT
get_dynamic_prop
(
DispatchEx
*
This
,
const
WCHAR
*
name
,
DWORD
flags
,
dynamic_prop_t
**
ret
)
...
@@ -379,14 +387,9 @@ static HRESULT get_dynamic_prop(DispatchEx *This, const WCHAR *name, DWORD flags
...
@@ -379,14 +387,9 @@ static HRESULT get_dynamic_prop(DispatchEx *This, const WCHAR *name, DWORD flags
dispex_dynamic_data_t
*
data
;
dispex_dynamic_data_t
*
data
;
dynamic_prop_t
*
prop
;
dynamic_prop_t
*
prop
;
data
=
get_dynamic_data
(
This
,
alloc
);
data
=
get_dynamic_data
(
This
);
if
(
!
data
)
{
if
(
!
data
)
if
(
alloc
)
return
E_OUTOFMEMORY
;
return
E_OUTOFMEMORY
;
TRACE
(
"not found %s
\n
"
,
debugstr_w
(
name
));
return
DISP_E_UNKNOWNNAME
;
}
for
(
prop
=
data
->
props
;
prop
<
data
->
props
+
data
->
prop_cnt
;
prop
++
)
{
for
(
prop
=
data
->
props
;
prop
<
data
->
props
+
data
->
prop_cnt
;
prop
++
)
{
if
(
flags
&
fdexNameCaseInsensitive
?
!
strcmpiW
(
prop
->
name
,
name
)
:
!
strcmpW
(
prop
->
name
,
name
))
{
if
(
flags
&
fdexNameCaseInsensitive
?
!
strcmpiW
(
prop
->
name
,
name
)
:
!
strcmpW
(
prop
->
name
,
name
))
{
...
@@ -570,6 +573,7 @@ static HRESULT function_value(DispatchEx *dispex, LCID lcid, WORD flags, DISPPAR
...
@@ -570,6 +573,7 @@ static HRESULT function_value(DispatchEx *dispex, LCID lcid, WORD flags, DISPPAR
static
const
dispex_static_data_vtbl_t
function_dispex_vtbl
=
{
static
const
dispex_static_data_vtbl_t
function_dispex_vtbl
=
{
function_value
,
function_value
,
NULL
,
NULL
,
NULL
,
NULL
NULL
};
};
...
@@ -625,7 +629,7 @@ static HRESULT function_invoke(DispatchEx *This, func_info_t *func, WORD flags,
...
@@ -625,7 +629,7 @@ static HRESULT function_invoke(DispatchEx *This, func_info_t *func, WORD flags,
return
S_OK
;
return
S_OK
;
}
}
dynamic_data
=
get_dynamic_data
(
This
,
TRUE
);
dynamic_data
=
get_dynamic_data
(
This
);
if
(
!
dynamic_data
)
if
(
!
dynamic_data
)
return
E_OUTOFMEMORY
;
return
E_OUTOFMEMORY
;
...
...
dlls/mshtml/htmldoc.c
View file @
0a03ae75
...
@@ -2119,7 +2119,8 @@ static HRESULT HTMLDocumentNode_invoke(DispatchEx *dispex, DISPID id, LCID lcid,
...
@@ -2119,7 +2119,8 @@ static HRESULT HTMLDocumentNode_invoke(DispatchEx *dispex, DISPID id, LCID lcid,
static
const
dispex_static_data_vtbl_t
HTMLDocumentNode_dispex_vtbl
=
{
static
const
dispex_static_data_vtbl_t
HTMLDocumentNode_dispex_vtbl
=
{
NULL
,
NULL
,
NULL
,
NULL
,
HTMLDocumentNode_invoke
HTMLDocumentNode_invoke
,
NULL
};
};
static
const
NodeImplVtbl
HTMLDocumentFragmentImplVtbl
=
{
static
const
NodeImplVtbl
HTMLDocumentFragmentImplVtbl
=
{
...
...
dlls/mshtml/htmlelem.c
View file @
0a03ae75
...
@@ -1778,6 +1778,88 @@ static HRESULT HTMLElement_invoke(DispatchEx *dispex, DISPID id, LCID lcid,
...
@@ -1778,6 +1778,88 @@ static HRESULT HTMLElement_invoke(DispatchEx *dispex, DISPID id, LCID lcid,
return
E_NOTIMPL
;
return
E_NOTIMPL
;
}
}
static
HRESULT
HTMLElement_populate_props
(
DispatchEx
*
dispex
)
{
HTMLElement
*
This
=
impl_from_DispatchEx
(
dispex
);
nsIDOMNamedNodeMap
*
attrs
;
nsIDOMNode
*
node
;
nsAString
nsstr
;
const
PRUnichar
*
str
;
BSTR
name
;
VARIANT
value
;
unsigned
i
;
PRUint32
len
;
DISPID
id
;
nsresult
nsres
;
HRESULT
hres
;
if
(
!
This
->
nselem
)
return
S_FALSE
;
nsres
=
nsIDOMHTMLElement_GetAttributes
(
This
->
nselem
,
&
attrs
);
if
(
NS_FAILED
(
nsres
))
return
E_FAIL
;
nsres
=
nsIDOMNamedNodeMap_GetLength
(
attrs
,
&
len
);
if
(
NS_FAILED
(
nsres
))
{
nsIDOMNamedNodeMap_Release
(
attrs
);
return
E_FAIL
;
}
nsAString_Init
(
&
nsstr
,
NULL
);
for
(
i
=
0
;
i
<
len
;
i
++
)
{
nsres
=
nsIDOMNamedNodeMap_Item
(
attrs
,
i
,
&
node
);
if
(
NS_FAILED
(
nsres
))
continue
;
nsres
=
nsIDOMNode_GetNodeName
(
node
,
&
nsstr
);
if
(
NS_FAILED
(
nsres
))
{
nsIDOMNode_Release
(
node
);
continue
;
}
nsAString_GetData
(
&
nsstr
,
&
str
);
name
=
SysAllocString
(
str
);
if
(
!
name
)
{
nsIDOMNode_Release
(
node
);
continue
;
}
hres
=
IDispatchEx_GetDispID
(
&
dispex
->
IDispatchEx_iface
,
name
,
fdexNameCaseInsensitive
,
&
id
);
if
(
hres
!=
DISP_E_UNKNOWNNAME
)
{
nsIDOMNode_Release
(
node
);
SysFreeString
(
name
);
continue
;
}
nsres
=
nsIDOMNode_GetNodeValue
(
node
,
&
nsstr
);
nsIDOMNode_Release
(
node
);
if
(
NS_FAILED
(
nsres
))
{
SysFreeString
(
name
);
continue
;
}
nsAString_GetData
(
&
nsstr
,
&
str
);
V_VT
(
&
value
)
=
VT_BSTR
;
if
(
*
str
)
{
V_BSTR
(
&
value
)
=
SysAllocString
(
str
);
if
(
!
V_BSTR
(
&
value
))
{
SysFreeString
(
name
);
continue
;
}
}
else
V_BSTR
(
&
value
)
=
NULL
;
IHTMLElement_setAttribute
(
&
This
->
IHTMLElement_iface
,
name
,
value
,
0
);
SysFreeString
(
name
);
VariantClear
(
&
value
);
}
nsAString_Finish
(
&
nsstr
);
nsIDOMNamedNodeMap_Release
(
attrs
);
return
S_OK
;
}
static
const
tid_t
HTMLElement_iface_tids
[]
=
{
static
const
tid_t
HTMLElement_iface_tids
[]
=
{
HTMLELEMENT_TIDS
,
HTMLELEMENT_TIDS
,
0
0
...
@@ -1786,7 +1868,8 @@ static const tid_t HTMLElement_iface_tids[] = {
...
@@ -1786,7 +1868,8 @@ static const tid_t HTMLElement_iface_tids[] = {
static
dispex_static_data_vtbl_t
HTMLElement_dispex_vtbl
=
{
static
dispex_static_data_vtbl_t
HTMLElement_dispex_vtbl
=
{
NULL
,
NULL
,
HTMLElement_get_dispid
,
HTMLElement_get_dispid
,
HTMLElement_invoke
HTMLElement_invoke
,
HTMLElement_populate_props
};
};
static
dispex_static_data_t
HTMLElement_dispex
=
{
static
dispex_static_data_t
HTMLElement_dispex
=
{
...
@@ -2017,7 +2100,8 @@ static HRESULT HTMLFiltersCollection_invoke(DispatchEx *dispex, DISPID id, LCID
...
@@ -2017,7 +2100,8 @@ static HRESULT HTMLFiltersCollection_invoke(DispatchEx *dispex, DISPID id, LCID
static
const
dispex_static_data_vtbl_t
HTMLFiltersCollection_dispex_vtbl
=
{
static
const
dispex_static_data_vtbl_t
HTMLFiltersCollection_dispex_vtbl
=
{
NULL
,
NULL
,
HTMLFiltersCollection_get_dispid
,
HTMLFiltersCollection_get_dispid
,
HTMLFiltersCollection_invoke
HTMLFiltersCollection_invoke
,
NULL
};
};
static
const
tid_t
HTMLFiltersCollection_iface_tids
[]
=
{
static
const
tid_t
HTMLFiltersCollection_iface_tids
[]
=
{
...
...
dlls/mshtml/htmlelemcol.c
View file @
0a03ae75
...
@@ -470,7 +470,8 @@ static HRESULT HTMLElementCollection_invoke(DispatchEx *dispex, DISPID id, LCID
...
@@ -470,7 +470,8 @@ static HRESULT HTMLElementCollection_invoke(DispatchEx *dispex, DISPID id, LCID
static
const
dispex_static_data_vtbl_t
HTMLElementColection_dispex_vtbl
=
{
static
const
dispex_static_data_vtbl_t
HTMLElementColection_dispex_vtbl
=
{
NULL
,
NULL
,
HTMLElementCollection_get_dispid
,
HTMLElementCollection_get_dispid
,
HTMLElementCollection_invoke
HTMLElementCollection_invoke
,
NULL
};
};
static
const
tid_t
HTMLElementCollection_iface_tids
[]
=
{
static
const
tid_t
HTMLElementCollection_iface_tids
[]
=
{
...
...
dlls/mshtml/htmlimg.c
View file @
0a03ae75
...
@@ -921,6 +921,7 @@ static const tid_t HTMLImageElementFactory_iface_tids[] = {
...
@@ -921,6 +921,7 @@ static const tid_t HTMLImageElementFactory_iface_tids[] = {
static
const
dispex_static_data_vtbl_t
HTMLImageElementFactory_dispex_vtbl
=
{
static
const
dispex_static_data_vtbl_t
HTMLImageElementFactory_dispex_vtbl
=
{
HTMLImageElementFactory_value
,
HTMLImageElementFactory_value
,
NULL
,
NULL
,
NULL
,
NULL
NULL
};
};
...
...
dlls/mshtml/htmlnode.c
View file @
0a03ae75
...
@@ -260,7 +260,8 @@ static HRESULT HTMLDOMChildrenCollection_invoke(DispatchEx *dispex, DISPID id, L
...
@@ -260,7 +260,8 @@ static HRESULT HTMLDOMChildrenCollection_invoke(DispatchEx *dispex, DISPID id, L
static
const
dispex_static_data_vtbl_t
HTMLDOMChildrenCollection_dispex_vtbl
=
{
static
const
dispex_static_data_vtbl_t
HTMLDOMChildrenCollection_dispex_vtbl
=
{
NULL
,
NULL
,
HTMLDOMChildrenCollection_get_dispid
,
HTMLDOMChildrenCollection_get_dispid
,
HTMLDOMChildrenCollection_invoke
HTMLDOMChildrenCollection_invoke
,
NULL
};
};
static
const
tid_t
HTMLDOMChildrenCollection_iface_tids
[]
=
{
static
const
tid_t
HTMLDOMChildrenCollection_iface_tids
[]
=
{
...
...
dlls/mshtml/htmlstyle.c
View file @
0a03ae75
...
@@ -3063,6 +3063,7 @@ static HRESULT HTMLStyle_get_dispid(DispatchEx *dispex, BSTR name, DWORD flags,
...
@@ -3063,6 +3063,7 @@ static HRESULT HTMLStyle_get_dispid(DispatchEx *dispex, BSTR name, DWORD flags,
static
const
dispex_static_data_vtbl_t
HTMLStyle_dispex_vtbl
=
{
static
const
dispex_static_data_vtbl_t
HTMLStyle_dispex_vtbl
=
{
NULL
,
NULL
,
HTMLStyle_get_dispid
,
HTMLStyle_get_dispid
,
NULL
,
NULL
NULL
};
};
...
...
dlls/mshtml/htmlwindow.c
View file @
0a03ae75
...
@@ -2330,7 +2330,8 @@ static HRESULT HTMLWindow_invoke(DispatchEx *dispex, DISPID id, LCID lcid, WORD
...
@@ -2330,7 +2330,8 @@ static HRESULT HTMLWindow_invoke(DispatchEx *dispex, DISPID id, LCID lcid, WORD
static
const
dispex_static_data_vtbl_t
HTMLWindow_dispex_vtbl
=
{
static
const
dispex_static_data_vtbl_t
HTMLWindow_dispex_vtbl
=
{
NULL
,
NULL
,
NULL
,
NULL
,
HTMLWindow_invoke
HTMLWindow_invoke
,
NULL
};
};
static
const
tid_t
HTMLWindow_iface_tids
[]
=
{
static
const
tid_t
HTMLWindow_iface_tids
[]
=
{
...
...
dlls/mshtml/mshtml_private.h
View file @
0a03ae75
...
@@ -190,6 +190,7 @@ typedef struct {
...
@@ -190,6 +190,7 @@ typedef struct {
HRESULT
(
*
value
)(
DispatchEx
*
,
LCID
,
WORD
,
DISPPARAMS
*
,
VARIANT
*
,
EXCEPINFO
*
,
IServiceProvider
*
);
HRESULT
(
*
value
)(
DispatchEx
*
,
LCID
,
WORD
,
DISPPARAMS
*
,
VARIANT
*
,
EXCEPINFO
*
,
IServiceProvider
*
);
HRESULT
(
*
get_dispid
)(
DispatchEx
*
,
BSTR
,
DWORD
,
DISPID
*
);
HRESULT
(
*
get_dispid
)(
DispatchEx
*
,
BSTR
,
DWORD
,
DISPID
*
);
HRESULT
(
*
invoke
)(
DispatchEx
*
,
DISPID
,
LCID
,
WORD
,
DISPPARAMS
*
,
VARIANT
*
,
EXCEPINFO
*
,
IServiceProvider
*
);
HRESULT
(
*
invoke
)(
DispatchEx
*
,
DISPID
,
LCID
,
WORD
,
DISPPARAMS
*
,
VARIANT
*
,
EXCEPINFO
*
,
IServiceProvider
*
);
HRESULT
(
*
populate_props
)(
DispatchEx
*
);
}
dispex_static_data_vtbl_t
;
}
dispex_static_data_vtbl_t
;
typedef
struct
{
typedef
struct
{
...
...
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