- Revision
- 185402
- Author
- [email protected]
- Date
- 2015-06-09 22:38:03 -0700 (Tue, 09 Jun 2015)
Log Message
3D-transformed video does not display on platforms without accelerated video rendering
https://bugs.webkit.org/show_bug.cgi?id=144782
Patch by Daegyu Lee <[email protected]> on 2015-06-09
Reviewed by Simon Fraser.
Source/WebCore:
Video element does not get GraphicsLayer when MediaPlayerPrivate::supportsAcceleratedRendering() returns false
which means not using accelerated video decoding.
Although the video element gets GraphicsLayer by changing the CSS style of video element by _javascript_,
there is no way to set GraphicsLayer::setDrawsContent(true) for updating the video content.
As a result, after changing the CSS style, the video content does not show.
To avoid missing setDrawsContent(true), add conditions(!supportsAcceleratedRendering() && m_requiresOwnBackingStore).
Test: media/video-transformed-by-_javascript_.html
media/video-transformed-by-_javascript_-expected.html
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::containsPaintedContent):
LayoutTests:
Add layout test that is simply checking video transform by _javascript_ works properly.
* media/video-transformed-by-_javascript_-expected.txt: Added.
* media/video-transformed-by-_javascript_.html: Added.
* platform/gtk/TestExpectations:
* platform/ios-simulator-wk1/TestExpectations:
* platform/ios-simulator-wk2/TestExpectations:
* platform/ios-simulator/TestExpectations:
* platform/mac-wk1/TestExpectations:
* platform/mac-wk2/TestExpectations:
* platform/mac/TestExpectations:
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (185401 => 185402)
--- trunk/LayoutTests/ChangeLog 2015-06-10 04:00:13 UTC (rev 185401)
+++ trunk/LayoutTests/ChangeLog 2015-06-10 05:38:03 UTC (rev 185402)
@@ -1,3 +1,22 @@
+2015-06-09 Daegyu Lee <[email protected]>
+
+ 3D-transformed video does not display on platforms without accelerated video rendering
+ https://bugs.webkit.org/show_bug.cgi?id=144782
+
+ Reviewed by Simon Fraser.
+
+ Add layout test that is simply checking video transform by _javascript_ works properly.
+
+ * media/video-transformed-by-_javascript_-expected.txt: Added.
+ * media/video-transformed-by-_javascript_.html: Added.
+ * platform/gtk/TestExpectations:
+ * platform/ios-simulator-wk1/TestExpectations:
+ * platform/ios-simulator-wk2/TestExpectations:
+ * platform/ios-simulator/TestExpectations:
+ * platform/mac-wk1/TestExpectations:
+ * platform/mac-wk2/TestExpectations:
+ * platform/mac/TestExpectations:
+
2015-06-09 Daniel Bates <[email protected]>
Update iOS TestExpectations files
Added: trunk/LayoutTests/media/video-transformed-by-_javascript_-expected.txt (0 => 185402)
--- trunk/LayoutTests/media/video-transformed-by-_javascript_-expected.txt (rev 0)
+++ trunk/LayoutTests/media/video-transformed-by-_javascript_-expected.txt 2015-06-10 05:38:03 UTC (rev 185402)
@@ -0,0 +1,18 @@
+(GraphicsLayer
+ (anchor 0.00 0.00)
+ (bounds 800.00 600.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 800.00 600.00)
+ (contentsOpaque 1)
+ (children 1
+ (GraphicsLayer
+ (position 8.00 13.00)
+ (bounds 480.00 270.00)
+ (drawsContent 1)
+ (transform [-1.00 0.00 -0.00 0.00] [0.00 1.00 0.00 0.00] [0.00 0.00 -1.00 0.00] [0.00 0.00 0.00 1.00])
+ )
+ )
+ )
+ )
+)
\ No newline at end of file
Added: trunk/LayoutTests/media/video-transformed-by-_javascript_.html (0 => 185402)
--- trunk/LayoutTests/media/video-transformed-by-_javascript_.html (rev 0)
+++ trunk/LayoutTests/media/video-transformed-by-_javascript_.html 2015-06-10 05:38:03 UTC (rev 185402)
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <script type="text/_javascript_">
+ if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+ }
+
+ function dumpLayers()
+ {
+ if (window.testRunner) {
+ document.getElementById('outText').textContent = window.internals.layerTreeAsText(document);
+ testRunner.notifyDone();
+ }
+ }
+
+ function rotate() {
+ videoRotate.play();
+ videoRotate.style.webkitTransform = "rotateY(180deg)";
+ dumpLayers();
+ }
+
+ window.addEventListener('load', rotate, false);
+</script>
+</head>
+<body>
+ <pre id="outText"></pre>
+ <video id="videoRotate" width="480" height="270" type="video/mp4" src=""
+</body>
+</html>
\ No newline at end of file
Modified: trunk/LayoutTests/platform/gtk/TestExpectations (185401 => 185402)
--- trunk/LayoutTests/platform/gtk/TestExpectations 2015-06-10 04:00:13 UTC (rev 185401)
+++ trunk/LayoutTests/platform/gtk/TestExpectations 2015-06-10 05:38:03 UTC (rev 185402)
@@ -2387,6 +2387,8 @@
webkit.org/b/145048 http/tests/misc/bad-charset-alias.html [ Failure ]
webkit.org/b/145049 fast/text/simple-line-layout-text-stroke-width.html [ Failure ]
+webkit.org/b/145432 media/video-transformed-by-_javascript_.html [ Failure ]
+
#////////////////////////////////////////////////////////////////////////////////////////
# End of Tests failing
#////////////////////////////////////////////////////////////////////////////////////////
Modified: trunk/LayoutTests/platform/ios-simulator/TestExpectations (185401 => 185402)
--- trunk/LayoutTests/platform/ios-simulator/TestExpectations 2015-06-10 04:00:13 UTC (rev 185401)
+++ trunk/LayoutTests/platform/ios-simulator/TestExpectations 2015-06-10 05:38:03 UTC (rev 185402)
@@ -2612,6 +2612,8 @@
platform/ios-simulator/ios/scrolling/textarea-scroll-touch.html [ Failure ]
platform/ios-simulator/ios/scrolling/touch-stacking.html [ Failure ]
+webkit.org/b/145432 media/video-transformed-by-_javascript_.html [ Failure ]
+
# iOS tests that assert:
platform/ios-simulator/ios/fast/text/combining-enclosing-keycap.html
platform/ios-simulator/ios/plugin/youtube-flash-plugin-iframe-no-height-or-width.html
Modified: trunk/LayoutTests/platform/ios-simulator-wk1/TestExpectations (185401 => 185402)
--- trunk/LayoutTests/platform/ios-simulator-wk1/TestExpectations 2015-06-10 04:00:13 UTC (rev 185401)
+++ trunk/LayoutTests/platform/ios-simulator-wk1/TestExpectations 2015-06-10 05:38:03 UTC (rev 185402)
@@ -1730,3 +1730,5 @@
fast/dom/MutationObserver/database-callback-delivery.html [ Crash ]
fast/history/history-length.html [ Crash ]
storage/websql/alter-to-info-table.html [ Crash ]
+
+webkit.org/b/145432 media/video-transformed-by-_javascript_.html [ Failure ]
\ No newline at end of file
Modified: trunk/LayoutTests/platform/ios-simulator-wk2/TestExpectations (185401 => 185402)
--- trunk/LayoutTests/platform/ios-simulator-wk2/TestExpectations 2015-06-10 04:00:13 UTC (rev 185401)
+++ trunk/LayoutTests/platform/ios-simulator-wk2/TestExpectations 2015-06-10 05:38:03 UTC (rev 185402)
@@ -2176,3 +2176,5 @@
# Time outs as of 06/09/2015
fast/images/animated-gif-webkit-transform.html
+
+webkit.org/b/145432 media/video-transformed-by-_javascript_.html [ Failure ]
Modified: trunk/LayoutTests/platform/mac/TestExpectations (185401 => 185402)
--- trunk/LayoutTests/platform/mac/TestExpectations 2015-06-10 04:00:13 UTC (rev 185401)
+++ trunk/LayoutTests/platform/mac/TestExpectations 2015-06-10 05:38:03 UTC (rev 185402)
@@ -1259,3 +1259,5 @@
webkit.org/b/142548 [ Yosemite+ ] editing/selection/extend-by-character-007.html [ Pass ]
media/accessiblity-describes-video.html [ Pass Failure ]
+
+webkit.org/b/145432 media/video-transformed-by-_javascript_.html [ Failure ]
Modified: trunk/LayoutTests/platform/mac-wk1/TestExpectations (185401 => 185402)
--- trunk/LayoutTests/platform/mac-wk1/TestExpectations 2015-06-10 04:00:13 UTC (rev 185401)
+++ trunk/LayoutTests/platform/mac-wk1/TestExpectations 2015-06-10 05:38:03 UTC (rev 185402)
@@ -34,6 +34,8 @@
webkit.org/b/144127 compositing/scrolling/touch-scroll-to-clip.html [ Pass Failure ]
+webkit.org/b/145432 media/video-transformed-by-_javascript_.html [ Failure ]
+
### END OF (1) Failures with bug reports
########################################
Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (185401 => 185402)
--- trunk/LayoutTests/platform/mac-wk2/TestExpectations 2015-06-10 04:00:13 UTC (rev 185401)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations 2015-06-10 05:38:03 UTC (rev 185402)
@@ -261,6 +261,8 @@
webkit.org/b/144811 platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-padding.html [ Pass Timeout ]
webkit.org/b/144811 platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-rotated.html [ Pass Timeout ]
+webkit.org/b/145432 media/video-transformed-by-_javascript_.html [ Failure ]
+
### END OF (1) Classified failures with bug reports
########################################
Modified: trunk/Source/WebCore/ChangeLog (185401 => 185402)
--- trunk/Source/WebCore/ChangeLog 2015-06-10 04:00:13 UTC (rev 185401)
+++ trunk/Source/WebCore/ChangeLog 2015-06-10 05:38:03 UTC (rev 185402)
@@ -1,3 +1,23 @@
+2015-06-09 Daegyu Lee <[email protected]>
+
+ 3D-transformed video does not display on platforms without accelerated video rendering
+ https://bugs.webkit.org/show_bug.cgi?id=144782
+
+ Reviewed by Simon Fraser.
+
+ Video element does not get GraphicsLayer when MediaPlayerPrivate::supportsAcceleratedRendering() returns false
+ which means not using accelerated video decoding.
+ Although the video element gets GraphicsLayer by changing the CSS style of video element by _javascript_,
+ there is no way to set GraphicsLayer::setDrawsContent(true) for updating the video content.
+ As a result, after changing the CSS style, the video content does not show.
+ To avoid missing setDrawsContent(true), add conditions(!supportsAcceleratedRendering() && m_requiresOwnBackingStore).
+
+ Test: media/video-transformed-by-_javascript_.html
+ media/video-transformed-by-_javascript_-expected.html
+
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::containsPaintedContent):
+
2015-06-09 Ryosuke Niwa <[email protected]>
REGRESSION(r180867): Tabbing to login field on iCloud.com doesn't have highlight for text
Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (185401 => 185402)
--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp 2015-06-10 04:00:13 UTC (rev 185401)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp 2015-06-10 05:38:03 UTC (rev 185402)
@@ -1954,7 +1954,7 @@
// and set background color on the layer in that case, instead of allocating backing store and painting.
#if ENABLE(VIDEO)
if (is<RenderVideo>(renderer()) && downcast<RenderVideo>(renderer()).shouldDisplayVideo())
- return m_owningLayer.hasBoxDecorationsOrBackground();
+ return m_owningLayer.hasBoxDecorationsOrBackground() || (!(downcast<RenderVideo>(renderer()).supportsAcceleratedRendering()) && m_requiresOwnBackingStore);
#endif
#if ENABLE(WEBGL) || ENABLE(ACCELERATED_2D_CANVAS)