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
8b04ab10
Commit
8b04ab10
authored
Oct 22, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 22, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Fixed attribute object caching logic.
parent
cb131bf0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
10 deletions
+21
-10
htmlelem.c
dlls/mshtml/htmlelem.c
+11
-10
jstest.html
dlls/mshtml/tests/jstest.html
+10
-0
No files found.
dlls/mshtml/htmlelem.c
View file @
8b04ab10
...
...
@@ -2254,7 +2254,6 @@ static inline HRESULT get_domattr(HTMLAttributeCollection *This, DISPID id, LONG
return
E_UNEXPECTED
;
}
pos
++
;
hres
=
HTMLDOMAttribute_Create
(
This
->
elem
,
id
,
attr
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
@@ -2596,20 +2595,22 @@ static HRESULT HTMLAttributeCollection_invoke(DispatchEx *dispex, DISPID id, LCI
switch
(
flags
)
{
case
DISPATCH_PROPERTYGET
:
{
HTMLDOMAttribute
*
iter
;
DWORD
pos
;
id
=
id
-
MSHTML_DISPID_CUSTOM_MIN
+
1
;
pos
=
id
-
MSHTML_DISPID_CUSTOM_MIN
;
LIST_FOR_EACH_ENTRY
(
iter
,
&
This
->
attrs
,
HTMLDOMAttribute
,
entry
)
{
if
(
!
(
--
id
))
break
;
if
(
!
pos
)
{
IHTMLDOMAttribute_AddRef
(
&
iter
->
IHTMLDOMAttribute_iface
);
V_VT
(
res
)
=
VT_DISPATCH
;
V_DISPATCH
(
res
)
=
(
IDispatch
*
)
&
iter
->
IHTMLDOMAttribute_iface
;
return
S_OK
;
}
pos
--
;
}
if
(
id
)
return
E_INVALIDARG
;
IHTMLDOMAttribute_AddRef
(
&
iter
->
IHTMLDOMAttribute_iface
);
V_VT
(
res
)
=
VT_DISPATCH
;
V_DISPATCH
(
res
)
=
(
IDispatch
*
)
&
iter
->
IHTMLDOMAttribute_iface
;
return
S_OK
;
WARN
(
"invalid arg
\n
"
);
return
E_INVALIDARG
;
}
default:
...
...
dlls/mshtml/tests/jstest.html
View file @
8b04ab10
...
...
@@ -113,7 +113,16 @@ function test_setAttribute() {
input
.
setAttribute
(
"checked"
,
""
);
ok
(
input
.
checked
===
false
,
"input.checked = "
+
input
.
checked
);
}
function
test_attribute_collection
()
{
var
div
,
attr
;
document
.
body
.
innerHTML
=
'<div id="divid" class="test"></div>'
;
div
=
document
.
getElementById
(
"divid"
);
attr
=
div
.
attributes
[
"dir"
];
ok
(
attr
===
div
.
attributes
[
"dir"
],
"attr !== div.attributes['dir']"
);
}
function
test_getter_call
()
{
...
...
@@ -166,6 +175,7 @@ function runTests() {
test_remove_style_attribute
();
test_getter_call
();
test_setAttribute
();
test_attribute_collection
();
test_override_functions
();
var
r
=
window
.
execScript
(
"globalVar = true;"
);
...
...
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