Title: [207176] trunk
- Revision
- 207176
- Author
- [email protected]
- Date
- 2016-10-11 16:20:39 -0700 (Tue, 11 Oct 2016)
Log Message
color-gamut media query shouldn't ASSERT on invalid values
https://bugs.webkit.org/show_bug.cgi?id=163303
<rdar://problem/28724566>
Reviewed by Simon Fraser.
Source/WebCore:
Remove the ASSERT_NOT_REACHED in the evaluation, since it
can be hit when there is a valid CSS keyword that is not
expected in the query.
Updated fast/media/mq-color-gamut.html
* css/MediaQueryEvaluator.cpp:
(WebCore::colorGamutEvaluate):
LayoutTests:
Add a 'none' test.
* fast/media/mq-color-gamut-expected.html:
* fast/media/mq-color-gamut.html:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (207175 => 207176)
--- trunk/LayoutTests/ChangeLog 2016-10-11 23:11:49 UTC (rev 207175)
+++ trunk/LayoutTests/ChangeLog 2016-10-11 23:20:39 UTC (rev 207176)
@@ -1,3 +1,16 @@
+2016-10-11 Dean Jackson <[email protected]>
+
+ color-gamut media query shouldn't ASSERT on invalid values
+ https://bugs.webkit.org/show_bug.cgi?id=163303
+ <rdar://problem/28724566>
+
+ Reviewed by Simon Fraser.
+
+ Add a 'none' test.
+
+ * fast/media/mq-color-gamut-expected.html:
+ * fast/media/mq-color-gamut.html:
+
2016-10-11 Chris Dumez <[email protected]>
Update MediaStream events to stop using legacy [ConstructorTemplate=Event]
Modified: trunk/LayoutTests/fast/media/mq-color-gamut-expected.html (207175 => 207176)
--- trunk/LayoutTests/fast/media/mq-color-gamut-expected.html 2016-10-11 23:11:49 UTC (rev 207175)
+++ trunk/LayoutTests/fast/media/mq-color-gamut-expected.html 2016-10-11 23:20:39 UTC (rev 207176)
@@ -4,11 +4,13 @@
<style type="text/css">
#a { background-color: green; color: white; }
#b { background-color: green; color: white; }
+#c { background-color: green; color: white; }
</style>
</head>
<body>
<p id="a">This paragraph should have a green background.</p>
<p id="b">This paragraph should have a blue background on a device with a display that supports something close to P3. Otherwise the background should be green.</p>
+ <p id="c">This paragraph should have a green background.</p>
<p>Note that the expected results of this test assume a display that is not significantly wider than sRGB.</p>
</body>
</html>
Modified: trunk/LayoutTests/fast/media/mq-color-gamut.html (207175 => 207176)
--- trunk/LayoutTests/fast/media/mq-color-gamut.html 2016-10-11 23:11:49 UTC (rev 207175)
+++ trunk/LayoutTests/fast/media/mq-color-gamut.html 2016-10-11 23:20:39 UTC (rev 207176)
@@ -4,15 +4,20 @@
<style type="text/css">
#a { background-color: green; color: white; }
#b { background-color: green; color: white; }
+#c { background-color: green; color: white; }
@media (color-gamut: p3) {
#b { background-color: blue; }
}
+@media (color-gamut: none) {
+#b { background-color: blue; }
+}
</style>
</head>
<body>
<p id="a">This paragraph should have a green background.</p>
<p id="b">This paragraph should have a blue background on a device with a display that supports something close to P3. Otherwise the background should be green.</p>
+ <p id="c">This paragraph should have a green background.</p>
<p>Note that the expected results of this test assume a display that is not significantly wider than sRGB.</p>
</body>
</html>
Modified: trunk/Source/WebCore/ChangeLog (207175 => 207176)
--- trunk/Source/WebCore/ChangeLog 2016-10-11 23:11:49 UTC (rev 207175)
+++ trunk/Source/WebCore/ChangeLog 2016-10-11 23:20:39 UTC (rev 207176)
@@ -1,3 +1,20 @@
+2016-10-11 Dean Jackson <[email protected]>
+
+ color-gamut media query shouldn't ASSERT on invalid values
+ https://bugs.webkit.org/show_bug.cgi?id=163303
+ <rdar://problem/28724566>
+
+ Reviewed by Simon Fraser.
+
+ Remove the ASSERT_NOT_REACHED in the evaluation, since it
+ can be hit when there is a valid CSS keyword that is not
+ expected in the query.
+
+ Updated fast/media/mq-color-gamut.html
+
+ * css/MediaQueryEvaluator.cpp:
+ (WebCore::colorGamutEvaluate):
+
2016-10-11 Chris Dumez <[email protected]>
Update MediaStream events to stop using legacy [ConstructorTemplate=Event]
Modified: trunk/Source/WebCore/css/MediaQueryEvaluator.cpp (207175 => 207176)
--- trunk/Source/WebCore/css/MediaQueryEvaluator.cpp 2016-10-11 23:11:49 UTC (rev 207175)
+++ trunk/Source/WebCore/css/MediaQueryEvaluator.cpp 2016-10-11 23:20:39 UTC (rev 207176)
@@ -255,7 +255,6 @@
// FIXME: At some point we should start detecting displays that support more colors.
return false;
default:
- ASSERT_NOT_REACHED();
return true;
}
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes