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
0849a811
Commit
0849a811
authored
Feb 08, 2010
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 09, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Correctly handle comment nodes in IHTMLElement::[get|put]_title implementation.
parent
29389b87
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
0 deletions
+36
-0
htmlelem.c
dlls/mshtml/htmlelem.c
+33
-0
dom.c
dlls/mshtml/tests/dom.c
+3
-0
No files found.
dlls/mshtml/htmlelem.c
View file @
0849a811
...
...
@@ -593,6 +593,8 @@ static HRESULT WINAPI HTMLElement_get_document(IHTMLElement *iface, IDispatch **
return
S_OK
;
}
static
const
WCHAR
titleW
[]
=
{
't'
,
'i'
,
't'
,
'l'
,
'e'
,
0
};
static
HRESULT
WINAPI
HTMLElement_put_title
(
IHTMLElement
*
iface
,
BSTR
v
)
{
HTMLElement
*
This
=
HTMLELEM_THIS
(
iface
);
...
...
@@ -601,6 +603,20 @@ static HRESULT WINAPI HTMLElement_put_title(IHTMLElement *iface, BSTR v)
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
if
(
!
This
->
nselem
)
{
VARIANT
*
var
;
HRESULT
hres
;
hres
=
dispex_get_dprop_ref
(
&
This
->
node
.
dispex
,
titleW
,
TRUE
,
&
var
);
if
(
FAILED
(
hres
))
return
hres
;
VariantClear
(
var
);
V_VT
(
var
)
=
VT_BSTR
;
V_BSTR
(
var
)
=
v
?
SysAllocString
(
v
)
:
NULL
;
return
S_OK
;
}
nsAString_InitDepend
(
&
title_str
,
v
);
nsres
=
nsIDOMHTMLElement_SetTitle
(
This
->
nselem
,
&
title_str
);
nsAString_Finish
(
&
title_str
);
...
...
@@ -618,6 +634,23 @@ static HRESULT WINAPI HTMLElement_get_title(IHTMLElement *iface, BSTR *p)
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
if
(
!
This
->
nselem
)
{
VARIANT
*
var
;
HRESULT
hres
;
hres
=
dispex_get_dprop_ref
(
&
This
->
node
.
dispex
,
titleW
,
FALSE
,
&
var
);
if
(
hres
==
DISP_E_UNKNOWNNAME
)
{
*
p
=
NULL
;
}
else
if
(
V_VT
(
var
)
!=
VT_BSTR
)
{
FIXME
(
"title = %s
\n
"
,
debugstr_variant
(
var
));
return
E_FAIL
;
}
else
{
*
p
=
V_BSTR
(
var
)
?
SysAllocString
(
V_BSTR
(
var
))
:
NULL
;
}
return
S_OK
;
}
nsAString_Init
(
&
title_str
,
NULL
);
nsres
=
nsIDOMHTMLElement_GetTitle
(
This
->
nselem
,
&
title_str
);
if
(
NS_SUCCEEDED
(
nsres
))
{
...
...
dlls/mshtml/tests/dom.c
View file @
0849a811
...
...
@@ -5908,6 +5908,9 @@ static void test_create_elems(IHTMLDocument2 *doc)
ok
(
type
==
8
,
"type=%d, expected 8
\n
"
,
type
);
test_node_get_value_str
((
IUnknown
*
)
comment
,
"testing"
);
test_elem_title
((
IUnknown
*
)
comment
,
NULL
);
test_elem_set_title
((
IUnknown
*
)
comment
,
"comment title"
);
test_elem_title
((
IUnknown
*
)
comment
,
"comment title"
);
IHTMLDOMNode_Release
(
comment
);
}
...
...
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