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
1381ced8
Commit
1381ced8
authored
Jul 27, 2022
by
Gabriel Ivăncescu
Committed by
Alexandre Julliard
Jul 27, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Implement HTMLTitleElement's text property.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
b4adbb4d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
4 deletions
+36
-4
htmlhead.c
dlls/mshtml/htmlhead.c
+18
-4
dom.js
dlls/mshtml/tests/dom.js
+18
-0
No files found.
dlls/mshtml/htmlhead.c
View file @
1381ced8
...
...
@@ -103,15 +103,29 @@ static HRESULT WINAPI HTMLTitleElement_Invoke(IHTMLTitleElement *iface, DISPID d
static
HRESULT
WINAPI
HTMLTitleElement_put_text
(
IHTMLTitleElement
*
iface
,
BSTR
v
)
{
HTMLTitleElement
*
This
=
impl_from_IHTMLTitleElement
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
return
E_NOTIMPL
;
nsAString
text
;
nsresult
nsres
;
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
nsAString_InitDepend
(
&
text
,
v
);
nsres
=
nsIDOMNode_SetTextContent
(
This
->
element
.
node
.
nsnode
,
&
text
);
nsAString_Finish
(
&
text
);
return
map_nsresult
(
nsres
);
}
static
HRESULT
WINAPI
HTMLTitleElement_get_text
(
IHTMLTitleElement
*
iface
,
BSTR
*
p
)
{
HTMLTitleElement
*
This
=
impl_from_IHTMLTitleElement
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
nsAString
text
;
nsresult
nsres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
nsAString_InitDepend
(
&
text
,
NULL
);
nsres
=
nsIDOMNode_GetTextContent
(
This
->
element
.
node
.
nsnode
,
&
text
);
return
return_nsstr
(
nsres
,
&
text
,
p
);
}
static
const
IHTMLTitleElementVtbl
HTMLTitleElementVtbl
=
{
...
...
dlls/mshtml/tests/dom.js
View file @
1381ced8
...
...
@@ -533,6 +533,24 @@ sync_test("title", function() {
elem
.
title
=
"test"
;
ok
(
elem
.
title
===
"test"
,
"div.title = "
+
elem
.
title
);
ok
(
elem
.
getAttribute
(
"title"
)
===
"test"
,
"title attribute = "
+
elem
.
getAttribute
(
"title"
));
var
orig
=
document
.
title
;
document
.
title
=
"w i n e test"
;
var
title
=
document
.
getElementsByTagName
(
"title"
)[
0
];
ok
(
title
.
text
===
"w i n e test"
,
"<title> element text = "
+
title
.
text
);
title
.
text
=
"winetest"
;
ok
(
title
.
text
===
"winetest"
,
"<title> element text after change = "
+
title
.
text
);
ok
(
document
.
title
===
"winetest"
,
"document.title after <title> change = "
+
document
.
title
);
elem
=
document
.
createElement
(
"title"
);
ok
(
elem
.
text
===
""
,
"detached <title> element text = "
+
elem
.
text
);
elem
.
text
=
"foobar"
;
ok
(
elem
.
text
===
"foobar"
,
"detached <title> element text after change = "
+
elem
.
text
);
ok
(
document
.
title
===
"winetest"
,
"document.title after detached <title> change = "
+
document
.
title
);
title
.
parentNode
.
replaceChild
(
elem
,
title
);
ok
(
document
.
title
===
"foobar"
,
"document.title after <title> replaced = "
+
document
.
title
);
document
.
title
=
orig
;
});
sync_test
(
"disabled"
,
function
()
{
...
...
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