Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 738835521b50d28d1409c9c0e86fe3c2c695ffec
https://github.com/WebKit/WebKit/commit/738835521b50d28d1409c9c0e86fe3c2c695ffec
Author: Antti Koivisto <[email protected]>
Date: 2023-01-25 (Wed, 25 Jan 2023)
Changed paths:
A
LayoutTests/imported/w3c/web-platform-tests/css/mediaqueries/match-media-parsing-expected.txt
A
LayoutTests/imported/w3c/web-platform-tests/css/mediaqueries/match-media-parsing.html
M Source/WebCore/css/query/MediaQueryParser.cpp
Log Message:
-----------
REGRESSION (257227@main): initial whitespace breaks the query in
window.matchMedia()
https://bugs.webkit.org/show_bug.cgi?id=251147
rdar://104104606
Reviewed by Alan Baradlay.
*
LayoutTests/imported/w3c/web-platform-tests/css/mediaqueries/match-media-parsing-expected.txt:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/mediaqueries/match-media-parsing.html:
Added.
* Source/WebCore/css/query/MediaQueryParser.cpp:
(WebCore::MQ::MediaQueryParser::consumeMediaQueryList):
Consume initial whitespace. Parsing functions expect to start with a
non-whitespace token.
This was not an issue with the regular media queries because stylesheet parsing
had already
consumed any initial whitespace.
Also fix the loop so that commas generate "not all" list items even for empty
strings "foo," -> "foo, not all".
Canonical link: https://commits.webkit.org/259357@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes