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
d9876902
Commit
d9876902
authored
Apr 17, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Apr 17, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added support for shadowing of element pseudo-variables.
parent
34b41084
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
55 additions
and
13 deletions
+55
-13
dispex.c
dlls/mshtml/dispex.c
+13
-0
htmlwindow.c
dlls/mshtml/htmlwindow.c
+31
-12
mshtml_private.h
dlls/mshtml/mshtml_private.h
+3
-1
jstest.html
dlls/mshtml/tests/jstest.html
+8
-0
No files found.
dlls/mshtml/dispex.c
View file @
d9876902
...
...
@@ -480,6 +480,19 @@ HRESULT dispex_get_dprop_ref(DispatchEx *This, const WCHAR *name, BOOL alloc, VA
return
S_OK
;
}
HRESULT
dispex_get_dynid
(
DispatchEx
*
This
,
const
WCHAR
*
name
,
DISPID
*
id
)
{
dynamic_prop_t
*
prop
;
HRESULT
hres
;
hres
=
get_dynamic_prop
(
This
,
name
,
fdexNameEnsure
,
&
prop
);
if
(
FAILED
(
hres
))
return
hres
;
*
id
=
DISPID_DYNPROP_0
+
(
prop
-
This
->
dynamic_data
->
props
);
return
S_OK
;
}
static
HRESULT
dispex_value
(
DispatchEx
*
This
,
LCID
lcid
,
WORD
flags
,
DISPPARAMS
*
params
,
VARIANT
*
res
,
EXCEPINFO
*
ei
,
IServiceProvider
*
caller
)
{
...
...
dlls/mshtml/htmlwindow.c
View file @
d9876902
...
...
@@ -2461,21 +2461,40 @@ static HRESULT HTMLWindow_invoke(DispatchEx *dispex, DISPID id, LCID lcid, WORD
IDispatch_Release
(
disp
);
break
;
}
case
GLOBAL_ELEMENTVAR
:
{
IHTMLElement
*
elem
;
case
GLOBAL_ELEMENTVAR
:
switch
(
flags
)
{
case
DISPATCH_PROPERTYGET
:
{
IHTMLElement
*
elem
;
hres
=
IHTMLDocument3_getElementById
(
&
This
->
doc
->
basedoc
.
IHTMLDocument3_iface
,
prop
->
name
,
&
elem
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
IHTMLDocument3_getElementById
(
&
This
->
doc
->
basedoc
.
IHTMLDocument3_iface
,
prop
->
name
,
&
elem
);
if
(
FAILED
(
hres
))
return
hres
;
if
(
!
elem
)
return
DISP_E_MEMBERNOTFOUND
;
if
(
!
elem
)
return
DISP_E_MEMBERNOTFOUND
;
V_VT
(
res
)
=
VT_DISPATCH
;
V_DISPATCH
(
res
)
=
(
IDispatch
*
)
elem
;
break
;
}
V_VT
(
res
)
=
VT_DISPATCH
;
V_DISPATCH
(
res
)
=
(
IDispatch
*
)
elem
;
return
S_OK
;
}
case
DISPATCH_PROPERTYPUT
:
{
DISPID
dispex_id
;
hres
=
dispex_get_dynid
(
&
This
->
dispex
,
prop
->
name
,
&
dispex_id
);
if
(
FAILED
(
hres
))
return
hres
;
prop
->
type
=
GLOBAL_DISPEXVAR
;
prop
->
id
=
dispex_id
;
return
IDispatchEx_InvokeEx
(
&
This
->
dispex
.
IDispatchEx_iface
,
dispex_id
,
0
,
flags
,
params
,
res
,
ei
,
caller
);
}
default:
FIXME
(
"Not suppoted flags: %x
\n
"
,
flags
);
return
E_NOTIMPL
;
}
case
GLOBAL_DISPEXVAR
:
return
IDispatchEx_InvokeEx
(
&
This
->
dispex
.
IDispatchEx_iface
,
prop
->
id
,
0
,
flags
,
params
,
res
,
ei
,
caller
);
default:
ERR
(
"invalid type %d
\n
"
,
prop
->
type
);
hres
=
DISP_E_MEMBERNOTFOUND
;
...
...
dlls/mshtml/mshtml_private.h
View file @
d9876902
...
...
@@ -229,6 +229,7 @@ BOOL dispex_query_interface(DispatchEx*,REFIID,void**) DECLSPEC_HIDDEN;
HRESULT
dispex_get_dprop_ref
(
DispatchEx
*
,
const
WCHAR
*
,
BOOL
,
VARIANT
**
)
DECLSPEC_HIDDEN
;
HRESULT
get_dispids
(
tid_t
,
DWORD
*
,
DISPID
**
)
DECLSPEC_HIDDEN
;
HRESULT
remove_prop
(
DispatchEx
*
,
BSTR
,
VARIANT_BOOL
*
)
DECLSPEC_HIDDEN
;
HRESULT
dispex_get_dynid
(
DispatchEx
*
,
const
WCHAR
*
,
DISPID
*
)
DECLSPEC_HIDDEN
;
void
release_typelib
(
void
)
DECLSPEC_HIDDEN
;
HRESULT
get_htmldoc_classinfo
(
ITypeInfo
**
typeinfo
)
DECLSPEC_HIDDEN
;
...
...
@@ -248,7 +249,8 @@ typedef struct ScriptHost ScriptHost;
typedef
enum
{
GLOBAL_SCRIPTVAR
,
GLOBAL_ELEMENTVAR
GLOBAL_ELEMENTVAR
,
GLOBAL_DISPEXVAR
}
global_prop_type_t
;
typedef
struct
{
...
...
dlls/mshtml/tests/jstest.html
View file @
d9876902
...
...
@@ -60,6 +60,14 @@ function test_document_name_as_index() {
var
e
=
document
.
getElementById
(
"formid"
);
ok
(
!!
e
,
"e is null"
);
ok
(
!
(
"formid"
in
document
),
"formid is in document"
);
document
.
body
.
innerHTML
=
'<form name="formname"></form>'
;
ok
(
"formname"
in
window
,
"formname' is not in window"
);
ok
(
typeof
(
window
.
formname
)
===
"object"
,
"typeof(window.formname) = "
+
typeof
(
window
.
formname
));
window
.
formname
=
1
;
ok
(
window
.
formname
===
1
,
"window.formname = "
+
window
.
formname
);
formname
=
2
;
ok
(
window
.
formname
===
2
,
"window.formname = "
+
window
.
formname
);
}
function
test_remove_style_attribute
()
{
...
...
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