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
41396b5b
Commit
41396b5b
authored
Sep 05, 2023
by
Gabriel Ivăncescu
Committed by
Alexandre Julliard
Sep 05, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Implement querySelectorAll for document fragments.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
833286f4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
1 deletion
+24
-1
htmldoc.c
dlls/mshtml/htmldoc.c
+11
-1
dom.js
dlls/mshtml/tests/dom.js
+13
-0
No files found.
dlls/mshtml/htmldoc.c
View file @
41396b5b
...
...
@@ -4762,8 +4762,18 @@ static HRESULT WINAPI DocumentSelector_querySelectorAll(IDocumentSelector *iface
TRACE
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_w
(
v
),
pel
);
nsAString_InitDepend
(
&
nsstr
,
v
);
nsres
=
nsIDOMDocument_QuerySelectorAll
(
This
->
dom_document
,
&
nsstr
,
&
node_list
);
if
(
This
->
dom_document
)
nsres
=
nsIDOMDocument_QuerySelectorAll
(
This
->
dom_document
,
&
nsstr
,
&
node_list
);
else
{
nsIDOMDocumentFragment
*
frag
;
nsres
=
nsIDOMNode_QueryInterface
(
This
->
node
.
nsnode
,
&
IID_nsIDOMDocumentFragment
,
(
void
**
)
&
frag
);
if
(
NS_SUCCEEDED
(
nsres
))
{
nsres
=
nsIDOMDocumentFragment_QuerySelectorAll
(
frag
,
&
nsstr
,
&
node_list
);
nsIDOMDocumentFragment_Release
(
frag
);
}
}
nsAString_Finish
(
&
nsstr
);
if
(
NS_FAILED
(
nsres
))
{
WARN
(
"QuerySelectorAll failed: %08lx
\n
"
,
nsres
);
return
map_nsresult
(
nsres
);
...
...
dlls/mshtml/tests/dom.js
View file @
41396b5b
...
...
@@ -285,6 +285,19 @@ sync_test("query_selector", function() {
ok
(
e
.
tagName
===
"A"
,
"e.tagName = "
+
e
.
tagName
);
e
=
frag
.
querySelector
(
"a"
);
ok
(
e
.
tagName
===
"A"
,
"e.tagName = "
+
e
.
tagName
);
e
=
document
.
querySelectorAll
(
".class1"
);
ok
(
e
.
length
===
3
,
"e.length = "
+
e
.
length
);
e
=
document
.
body
.
querySelectorAll
(
".class1"
);
ok
(
e
.
length
===
3
,
"e.length = "
+
e
.
length
);
e
=
document
.
querySelectorAll
(
".class2"
);
ok
(
e
.
length
===
1
,
"e.length = "
+
e
.
length
);
e
=
document
.
body
.
querySelectorAll
(
".class2"
);
ok
(
e
.
length
===
1
,
"e.length = "
+
e
.
length
);
e
=
frag
.
querySelectorAll
(
".class3"
);
ok
(
e
.
length
===
2
,
"e.length = "
+
e
.
length
);
e
=
frag
.
querySelectorAll
(
".class4"
);
ok
(
e
.
length
===
1
,
"e.length = "
+
e
.
length
);
});
sync_test
(
"compare_position"
,
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