Diff
Modified: trunk/LayoutTests/ChangeLog (195147 => 195148)
--- trunk/LayoutTests/ChangeLog 2016-01-15 22:21:41 UTC (rev 195147)
+++ trunk/LayoutTests/ChangeLog 2016-01-15 22:28:03 UTC (rev 195148)
@@ -1,5 +1,17 @@
2016-01-15 Joseph Pecoraro <[email protected]>
+ Media Query (-webkit-video-playable-inline) is failing as an invalid media query _expression_
+ https://bugs.webkit.org/show_bug.cgi?id=153111
+
+ Reviewed by Dean Jackson.
+
+ * fast/media/video-playable-inline-media-query-expected.txt: Added.
+ * fast/media/video-playable-inline-media-query.html: Added.
+ * platform/ios-simulator/ios/fast/media/video-inline-expected.txt: Removed.
+ * platform/ios-simulator/ios/fast/media/video-inline.html: Removed.
+
+2016-01-15 Joseph Pecoraro <[email protected]>
+
LayoutTest inspector/script-profiler/event-type-Other.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=153016
<rdar://problem/24192919>
Added: trunk/LayoutTests/fast/media/video-playable-inline-media-query-expected.txt (0 => 195148)
--- trunk/LayoutTests/fast/media/video-playable-inline-media-query-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/media/video-playable-inline-media-query-expected.txt 2016-01-15 22:28:03 UTC (rev 195148)
@@ -0,0 +1,7 @@
+Tests the (-webkit-video-playable-inline) media query.
+
+Enabling Inline Media Playback
+PASS: "(-webkit-video-playable-inline)" evaluates to true
+Disabling Inline Media Playback
+PASS: "(-webkit-video-playable-inline)" evaluates to false
+
Added: trunk/LayoutTests/fast/media/video-playable-inline-media-query.html (0 => 195148)
--- trunk/LayoutTests/fast/media/video-playable-inline-media-query.html (rev 0)
+++ trunk/LayoutTests/fast/media/video-playable-inline-media-query.html 2016-01-15 22:28:03 UTC (rev 195148)
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+if (window.testRunner)
+ testRunner.dumpAsText();
+
+function log(m) {
+ var results = document.getElementById('results');
+ results.innerHTML += m + '<br>';
+}
+
+function testQuery(query, expected) {
+ var isTrue = window.styleMedia.matchMedium(query);
+ var message = '\"' + query + '\" evaluates to ' + (isTrue ? 'true' : 'false');
+ message = ((isTrue === expected) ? 'PASS: ' : 'FAIL: ') + message;
+ log(message);
+}
+
+function runTests() {
+ log("Enabling Inline Media Playback");
+ internals.settings.setAllowsInlineMediaPlayback(true);
+ testQuery('(-webkit-video-playable-inline)', true);
+
+ log("Disabling Inline Media Playback");
+ internals.settings.setAllowsInlineMediaPlayback(false);
+ testQuery('(-webkit-video-playable-inline)', false);
+}
+</script>
+</head>
+<body _onload_="runTests()">
+<p>Tests the (-webkit-video-playable-inline) media query.</p>
+<div id="results"></div>
+</body>
+</html>
Deleted: trunk/LayoutTests/platform/ios-simulator/ios/fast/media/video-inline-expected.txt (195147 => 195148)
--- trunk/LayoutTests/platform/ios-simulator/ios/fast/media/video-inline-expected.txt 2016-01-15 22:21:41 UTC (rev 195147)
+++ trunk/LayoutTests/platform/ios-simulator/ios/fast/media/video-inline-expected.txt 2016-01-15 22:28:03 UTC (rev 195148)
@@ -1,4 +0,0 @@
-Testing iOS-specific media query for inline video. When run inside MobileSafari on iPhone, the query should evaluate as false (and the test will indicate that it has failed). In all other places, including the test framework and DRT, the query should evaluate as true.
-
-FAIL: "(-webkit-video-playable-inline)" evaluates to false
-
Deleted: trunk/LayoutTests/platform/ios-simulator/ios/fast/media/video-inline.html (195147 => 195148)
--- trunk/LayoutTests/platform/ios-simulator/ios/fast/media/video-inline.html 2016-01-15 22:21:41 UTC (rev 195147)
+++ trunk/LayoutTests/platform/ios-simulator/ios/fast/media/video-inline.html 2016-01-15 22:28:03 UTC (rev 195148)
@@ -1,37 +0,0 @@
-<html>
-<head>
- <title>Test iOS-specific media query for inline video</title>
- <meta name="viewport" content="width=device-width">
- <script>
- if (window.testRunner)
- testRunner.dumpAsText();
-
- function log(m) {
- var results = document.getElementById('results');
- results.innerHTML += m + '<br>';
- }
-
- function testQuery(query, expected) {
- var isTrue = window.styleMedia.matchMedium(query);
-
- var message = '\"' + query + '\" evaluates to ' + (isTrue ? 'true' : 'false');
- message = ((isTrue == expected) ? 'PASS: ' : 'FAIL: ') + message;
- log(message);
- }
-
- function runTests() {
- testQuery('(-webkit-video-playable-inline)', true);
- }
- </script>
-</head>
-<body _onload_="runTests()">
- <p>
- Testing iOS-specific media query for inline video.
- When run inside MobileSafari on iPhone, the query should evaluate
- as false (and the test will indicate that it has failed).
- In all other places, including the test framework and DRT, the
- query should evaluate as true.
- </p>
- <div id="results"></div>
-</body>
-</html>
Modified: trunk/Source/WebCore/ChangeLog (195147 => 195148)
--- trunk/Source/WebCore/ChangeLog 2016-01-15 22:21:41 UTC (rev 195147)
+++ trunk/Source/WebCore/ChangeLog 2016-01-15 22:28:03 UTC (rev 195148)
@@ -1,3 +1,23 @@
+2016-01-15 Joseph Pecoraro <[email protected]>
+
+ Media Query (-webkit-video-playable-inline) is failing as an invalid media query _expression_
+ https://bugs.webkit.org/show_bug.cgi?id=153111
+
+ Reviewed by Dean Jackson.
+
+ Test: fast/media/video-playable-inline-media-query.html
+
+ * css/MediaQueryEvaluator.cpp:
+ (WebCore::video_playable_inlineMediaFeatureEval):
+ (WebCore::isRunningOnIPhoneOrIPod): Deleted.
+ Make the media query work regardless of the platform.
+ It should just check the web view's settings.
+
+ * css/MediaQueryExp.cpp:
+ (WebCore::featureWithoutValue):
+ This media query expects no value, include it in the list
+ so it is not treated as invalid.
+
2016-01-15 Zalan Bujtas <[email protected]>
ASSERTION FAILED: canHaveChildren() || canHaveGeneratedChildren() in WebCore::RenderElement::insertChildInternal
Modified: trunk/Source/WebCore/css/MediaQueryEvaluator.cpp (195147 => 195148)
--- trunk/Source/WebCore/css/MediaQueryEvaluator.cpp 2016-01-15 22:21:41 UTC (rev 195147)
+++ trunk/Source/WebCore/css/MediaQueryEvaluator.cpp 2016-01-15 22:28:03 UTC (rev 195148)
@@ -56,10 +56,6 @@
#include "RenderLayerCompositor.h"
#endif
-#if PLATFORM(IOS)
-#include "Device.h"
-#endif
-
namespace WebCore {
using namespace MediaFeatureNames;
@@ -661,20 +657,9 @@
}
#endif // ENABLE(VIEW_MODE_CSS_MEDIA)
-// FIXME: Find a better place for this function. Maybe ChromeClient?
-static inline bool isRunningOnIPhoneOrIPod()
-{
-#if PLATFORM(IOS)
- static bool runningOnIPhoneOrIPod = deviceClass() == MGDeviceClassiPhone || deviceClass() == MGDeviceClassiPod;
- return runningOnIPhoneOrIPod;
-#else
- return false;
-#endif
-}
-
static bool video_playable_inlineMediaFeatureEval(CSSValue*, const CSSToLengthConversionData&, Frame* frame, MediaFeaturePrefix)
{
- return !isRunningOnIPhoneOrIPod() || frame->settings().allowsInlineMediaPlayback();
+ return frame->settings().allowsInlineMediaPlayback();
}
static bool hoverMediaFeatureEval(CSSValue* value, const CSSToLengthConversionData&, Frame*, MediaFeaturePrefix)
Modified: trunk/Source/WebCore/css/MediaQueryExp.cpp (195147 => 195148)
--- trunk/Source/WebCore/css/MediaQueryExp.cpp 2016-01-15 22:21:41 UTC (rev 195147)
+++ trunk/Source/WebCore/css/MediaQueryExp.cpp 2016-01-15 22:28:03 UTC (rev 195148)
@@ -155,7 +155,8 @@
#endif // ENABLE(VIEW_MODE_CSS_MEDIA)
|| mediaFeature == MediaFeatureNames::pointerMediaFeature
|| mediaFeature == MediaFeatureNames::device_pixel_ratioMediaFeature
- || mediaFeature == MediaFeatureNames::resolutionMediaFeature;
+ || mediaFeature == MediaFeatureNames::resolutionMediaFeature
+ || mediaFeature == MediaFeatureNames::video_playable_inlineMediaFeature;
}
MediaQueryExp::MediaQueryExp(const AtomicString& mediaFeature, CSSParserValueList* valueList)