Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
06872bd8
Commit
06872bd8
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 lastElementChild for Elements.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
3388fecd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
3 deletions
+28
-3
htmlelem.c
dlls/mshtml/htmlelem.c
+24
-2
dom.js
dlls/mshtml/tests/dom.js
+4
-1
No files found.
dlls/mshtml/htmlelem.c
View file @
06872bd8
...
...
@@ -6524,8 +6524,30 @@ static HRESULT WINAPI ElementTraversal_get_firstElementChild(IElementTraversal *
static
HRESULT
WINAPI
ElementTraversal_get_lastElementChild
(
IElementTraversal
*
iface
,
IHTMLElement
**
p
)
{
HTMLElement
*
This
=
impl_from_IElementTraversal
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
nsIDOMElement
*
nselem
=
NULL
;
HTMLElement
*
elem
;
HRESULT
hres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
if
(
!
This
->
dom_element
)
{
*
p
=
NULL
;
return
S_OK
;
}
nsIDOMElement_GetLastElementChild
(
This
->
dom_element
,
&
nselem
);
if
(
!
nselem
)
{
*
p
=
NULL
;
return
S_OK
;
}
hres
=
get_element
(
nselem
,
&
elem
);
nsIDOMElement_Release
(
nselem
);
if
(
FAILED
(
hres
))
return
hres
;
*
p
=
&
elem
->
IHTMLElement_iface
;
return
S_OK
;
}
static
HRESULT
WINAPI
ElementTraversal_get_previousElementSibling
(
IElementTraversal
*
iface
,
IHTMLElement
**
p
)
...
...
dlls/mshtml/tests/dom.js
View file @
06872bd8
...
...
@@ -89,12 +89,15 @@ sync_test("textContent", function() {
sync_test
(
"ElementTraversal"
,
function
()
{
var
div
=
document
.
createElement
(
"div"
);
div
.
innerHTML
=
"abc<b>bold</b><script>/* */<script><div>text</div>def"
;
div
.
innerHTML
=
"abc<b>bold</b><script>/* */<
/
script><div>text</div>def"
;
ok
(
div
.
firstElementChild
.
outerHTML
===
"<b>bold</b>"
,
"div.firstElementChild.outerHTML = "
+
div
.
firstElementChild
.
outerHTML
);
ok
(
div
.
lastElementChild
.
outerHTML
===
"<div>text</div>"
,
"div.lastElementChild.outerHTML = "
+
div
.
lastElementChild
.
outerHTML
);
div
.
innerHTML
=
"abc"
;
ok
(
div
.
firstElementChild
===
null
,
"div.firstElementChild = "
+
div
.
firstElementChild
);
ok
(
div
.
lastElementChild
===
null
,
"div.lastElementChild = "
+
div
.
lastElementChild
);
ok
(
!
(
"firstElementChild"
in
document
),
"firstElementChild found in document"
);
});
...
...
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