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
1b093221
Commit
1b093221
authored
Mar 24, 2010
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 24, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Moved builtin properties lookup to separate function.
parent
7eb61a6e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
34 deletions
+44
-34
dispex.c
dlls/mshtml/dispex.c
+44
-34
No files found.
dlls/mshtml/dispex.c
View file @
1b093221
...
...
@@ -729,6 +729,47 @@ static HRESULT get_builtin_func(dispex_data_t *data, DISPID id, func_info_t **re
return
DISP_E_UNKNOWNNAME
;
}
static
HRESULT
get_builtin_id
(
DispatchEx
*
This
,
BSTR
name
,
DWORD
grfdex
,
DISPID
*
ret
)
{
dispex_data_t
*
data
;
int
min
,
max
,
n
,
c
;
data
=
get_dispex_data
(
This
);
if
(
!
data
)
return
E_FAIL
;
min
=
0
;
max
=
data
->
func_cnt
-
1
;
while
(
min
<=
max
)
{
n
=
(
min
+
max
)
/
2
;
c
=
strcmpiW
(
data
->
name_table
[
n
]
->
name
,
name
);
if
(
!
c
)
{
if
((
grfdex
&
fdexNameCaseSensitive
)
&&
strcmpW
(
data
->
name_table
[
n
]
->
name
,
name
))
break
;
*
ret
=
data
->
name_table
[
n
]
->
id
;
return
S_OK
;
}
if
(
c
>
0
)
max
=
n
-
1
;
else
min
=
n
+
1
;
}
if
(
This
->
data
->
vtbl
&&
This
->
data
->
vtbl
->
get_dispid
)
{
HRESULT
hres
;
hres
=
This
->
data
->
vtbl
->
get_dispid
(
This
->
outer
,
name
,
grfdex
,
ret
);
if
(
hres
!=
DISP_E_UNKNOWNNAME
)
return
hres
;
}
return
DISP_E_UNKNOWNNAME
;
}
#define DISPATCHEX_THIS(iface) DEFINE_THIS(DispatchEx, IDispatchEx, iface)
static
HRESULT
WINAPI
DispatchEx_QueryInterface
(
IDispatchEx
*
iface
,
REFIID
riid
,
void
**
ppv
)
...
...
@@ -815,8 +856,6 @@ static HRESULT WINAPI DispatchEx_GetDispID(IDispatchEx *iface, BSTR bstrName, DW
{
DispatchEx
*
This
=
DISPATCHEX_THIS
(
iface
);
dynamic_prop_t
*
dprop
;
dispex_data_t
*
data
;
int
min
,
max
,
n
,
c
;
HRESULT
hres
;
TRACE
(
"(%p)->(%s %x %p)
\n
"
,
This
,
debugstr_w
(
bstrName
),
grfdex
,
pid
);
...
...
@@ -824,38 +863,9 @@ static HRESULT WINAPI DispatchEx_GetDispID(IDispatchEx *iface, BSTR bstrName, DW
if
(
grfdex
&
~
(
fdexNameCaseSensitive
|
fdexNameCaseInsensitive
|
fdexNameEnsure
|
fdexNameImplicit
|
FDEX_VERSION_MASK
))
FIXME
(
"Unsupported grfdex %x
\n
"
,
grfdex
);
data
=
get_dispex_data
(
This
);
if
(
!
data
)
return
E_FAIL
;
min
=
0
;
max
=
data
->
func_cnt
-
1
;
while
(
min
<=
max
)
{
n
=
(
min
+
max
)
/
2
;
c
=
strcmpiW
(
data
->
name_table
[
n
]
->
name
,
bstrName
);
if
(
!
c
)
{
if
((
grfdex
&
fdexNameCaseSensitive
)
&&
strcmpW
(
data
->
name_table
[
n
]
->
name
,
bstrName
))
break
;
*
pid
=
data
->
name_table
[
n
]
->
id
;
return
S_OK
;
}
if
(
c
>
0
)
max
=
n
-
1
;
else
min
=
n
+
1
;
}
if
(
This
->
data
->
vtbl
&&
This
->
data
->
vtbl
->
get_dispid
)
{
HRESULT
hres
;
hres
=
This
->
data
->
vtbl
->
get_dispid
(
This
->
outer
,
bstrName
,
grfdex
,
pid
);
if
(
hres
!=
DISP_E_UNKNOWNNAME
)
return
hres
;
}
hres
=
get_builtin_id
(
This
,
bstrName
,
grfdex
,
pid
);
if
(
hres
!=
DISP_E_UNKNOWNNAME
)
return
hres
;
hres
=
get_dynamic_prop
(
This
,
bstrName
,
grfdex
,
&
dprop
);
if
(
FAILED
(
hres
))
...
...
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