Title: [209842] trunk
- Revision
- 209842
- Author
- [email protected]
- Date
- 2016-12-14 16:12:21 -0800 (Wed, 14 Dec 2016)
Log Message
Update prefers-reduced-motion syntax
https://bugs.webkit.org/show_bug.cgi?id=165880
<rdar://problems/29671807>
Reviewed by Sam Weinig.
Source/WebCore:
After discussion in:
https://github.com/w3c/csswg-drafts/issues/442
... the syntax of prefers-reduced-motion was changed
to accept "reduce" or "no-preference".
Updated the tests in fast/media.
* css/CSSValueKeywords.in: Add no-preference keyword.
* css/MediaQueryEvaluator.cpp:
(WebCore::prefersReducedMotionEvaluate):
LayoutTests:
* fast/media/mq-prefers-reduced-motion-forced-value.html:
* fast/media/mq-prefers-reduced-motion.html:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (209841 => 209842)
--- trunk/LayoutTests/ChangeLog 2016-12-15 00:04:01 UTC (rev 209841)
+++ trunk/LayoutTests/ChangeLog 2016-12-15 00:12:21 UTC (rev 209842)
@@ -1,3 +1,14 @@
+2016-12-14 Dean Jackson <[email protected]>
+
+ Update prefers-reduced-motion syntax
+ https://bugs.webkit.org/show_bug.cgi?id=165880
+ <rdar://problems/29671807>
+
+ Reviewed by Sam Weinig.
+
+ * fast/media/mq-prefers-reduced-motion-forced-value.html:
+ * fast/media/mq-prefers-reduced-motion.html:
+
2016-12-14 Sam Weinig <[email protected]>
REGRESSION (204679): Google notifications never load (expecting DOMStringList rather than JS array for Location.ancestorOrigins)
Modified: trunk/LayoutTests/fast/media/mq-prefers-reduced-motion-forced-value.html (209841 => 209842)
--- trunk/LayoutTests/fast/media/mq-prefers-reduced-motion-forced-value.html 2016-12-15 00:04:01 UTC (rev 209841)
+++ trunk/LayoutTests/fast/media/mq-prefers-reduced-motion-forced-value.html 2016-12-15 00:12:21 UTC (rev 209842)
@@ -18,7 +18,7 @@
window.internals.settings.forcedPrefersReducedMotionAccessibilityValue = "off";
if (!window.matchMedia("(prefers-reduced-motion)").matches)
document.getElementById("c").style.color = "green";
- if (window.matchMedia("(prefers-reduced-motion: default)").matches)
+ if (window.matchMedia("(prefers-reduced-motion: no-preference)").matches)
document.getElementById("d").style.color = "green";
}, false);
</script>
Modified: trunk/LayoutTests/fast/media/mq-prefers-reduced-motion.html (209841 => 209842)
--- trunk/LayoutTests/fast/media/mq-prefers-reduced-motion.html 2016-12-15 00:04:01 UTC (rev 209841)
+++ trunk/LayoutTests/fast/media/mq-prefers-reduced-motion.html 2016-12-15 00:12:21 UTC (rev 209842)
@@ -15,7 +15,7 @@
#b { color: green; }
}
-@media (prefers-reduced-motion: default) {
+@media (prefers-reduced-motion: no-preference) {
#d { color: green; }
}
</style>
Modified: trunk/Source/WebCore/ChangeLog (209841 => 209842)
--- trunk/Source/WebCore/ChangeLog 2016-12-15 00:04:01 UTC (rev 209841)
+++ trunk/Source/WebCore/ChangeLog 2016-12-15 00:12:21 UTC (rev 209842)
@@ -1,3 +1,22 @@
+2016-12-14 Dean Jackson <[email protected]>
+
+ Update prefers-reduced-motion syntax
+ https://bugs.webkit.org/show_bug.cgi?id=165880
+ <rdar://problems/29671807>
+
+ Reviewed by Sam Weinig.
+
+ After discussion in:
+ https://github.com/w3c/csswg-drafts/issues/442
+ ... the syntax of prefers-reduced-motion was changed
+ to accept "reduce" or "no-preference".
+
+ Updated the tests in fast/media.
+
+ * css/CSSValueKeywords.in: Add no-preference keyword.
+ * css/MediaQueryEvaluator.cpp:
+ (WebCore::prefersReducedMotionEvaluate):
+
2016-12-14 Sam Weinig <[email protected]>
REGRESSION (204679): Google notifications never load (expecting DOMStringList rather than JS array for Location.ancestorOrigins)
Modified: trunk/Source/WebCore/css/CSSValueKeywords.in (209841 => 209842)
--- trunk/Source/WebCore/css/CSSValueKeywords.in 2016-12-15 00:04:01 UTC (rev 209841)
+++ trunk/Source/WebCore/css/CSSValueKeywords.in 2016-12-15 00:12:21 UTC (rev 209842)
@@ -1326,6 +1326,7 @@
// prefers-reduced-motion
reduce
+no-preference
#if defined(ENABLE_CSS_GRID_LAYOUT) && ENABLE_CSS_GRID_LAYOUT
// auto-repeat
Modified: trunk/Source/WebCore/css/MediaQueryEvaluator.cpp (209841 => 209842)
--- trunk/Source/WebCore/css/MediaQueryEvaluator.cpp 2016-12-15 00:04:01 UTC (rev 209841)
+++ trunk/Source/WebCore/css/MediaQueryEvaluator.cpp 2016-12-15 00:12:21 UTC (rev 209842)
@@ -699,7 +699,7 @@
if (!value)
return userPrefersReducedMotion;
- return downcast<CSSPrimitiveValue>(*value).valueID() == (userPrefersReducedMotion ? CSSValueReduce : CSSValueDefault);
+ return downcast<CSSPrimitiveValue>(*value).valueID() == (userPrefersReducedMotion ? CSSValueReduce : CSSValueNoPreference);
}
// Use this function instead of calling add directly to avoid inlining.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes