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
b9f22f60
Commit
b9f22f60
authored
Aug 01, 2022
by
Gabriel Ivăncescu
Committed by
Alexandre Julliard
Aug 02, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Implement MediaQueryList's matches prop.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
09b73c89
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
omnavigator.c
dlls/mshtml/omnavigator.c
+8
-2
es5.js
dlls/mshtml/tests/es5.js
+3
-0
No files found.
dlls/mshtml/omnavigator.c
View file @
b9f22f60
...
...
@@ -2753,10 +2753,16 @@ static HRESULT WINAPI media_query_list_get_media(IWineMSHTMLMediaQueryList *ifac
static
HRESULT
WINAPI
media_query_list_get_matches
(
IWineMSHTMLMediaQueryList
*
iface
,
VARIANT_BOOL
*
p
)
{
struct
media_query_list
*
media_query_list
=
impl_from_IWineMSHTMLMediaQueryList
(
iface
);
nsresult
nsres
;
cpp_bool
b
;
FIXM
E
(
"(%p)->(%p)
\n
"
,
media_query_list
,
p
);
TRAC
E
(
"(%p)->(%p)
\n
"
,
media_query_list
,
p
);
return
E_NOTIMPL
;
nsres
=
nsIDOMMediaQueryList_GetMatches
(
media_query_list
->
nsquerylist
,
&
b
);
if
(
NS_FAILED
(
nsres
))
return
map_nsresult
(
nsres
);
*
p
=
b
?
VARIANT_TRUE
:
VARIANT_FALSE
;
return
S_OK
;
}
static
HRESULT
WINAPI
media_query_list_addListener
(
IWineMSHTMLMediaQueryList
*
iface
,
VARIANT
*
listener
)
...
...
dlls/mshtml/tests/es5.js
View file @
b9f22f60
...
...
@@ -2037,5 +2037,8 @@ sync_test("matchMedia", function() {
mql
=
window
.
matchMedia
(
r
[
i
][
0
]);
todo_wine_if
(
r
[
i
][
0
]
!==
42
).
ok
(
mql
.
media
===
r
[
i
][
1
],
r
[
i
][
0
]
+
" media = "
+
mql
.
media
);
ok
(
mql
.
matches
===
false
,
r
[
i
][
0
]
+
" matches"
);
}
mql
=
window
.
matchMedia
(
"(max-width: 1000px)"
);
ok
(
mql
.
matches
===
true
,
"(max-width: 1000px) does not match"
);
});
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