|
Support subtitles for native fullscreen video
In native fullscreen video mode(used by Android), videos are rendered into a separate hardware overlay that is outside of jurisdiction of our compositor. This patch adds support for subtitle by making the WebLayerTreeView transparent, and let the RenderVideo becomes the root layer, so the media controls and subtitles rendered in Blink can be overlaid on top of the hardware overlay.
In detail, the patch does the following:
* Force fullscreen video to be composited.
* Force fullscreen video to create stacking context. This is necessary, otherwise the descendant layers won't be attached under its layer.
* Add a m_currentFullscreenRenderer property in main frame RenderLayerCompositor.
* When building GraphicsLayer tree, RenderLayerCompositor will rearrange m_currentFullscreenRenderer as the root layer if it is a fullscreen video.
* RenderLayerBacking will turn off visibility of the layer if it is a fullscreen video.
* WebViewImpl will change WebLayerTreeView transparency if a media element enters fullscreen mode.
* MediaControlsChromiumAndroid will always allow media control hiding in fullscreen (ignoring hover status).
* Native fullscreen video will be moved under RenderFullScreen as well. This step was previously skipped, and is necessary to layout media controls and subtitles correctly.
* Convert USE(NATIVE_FULLSCREEN_VIDEO) to a runtime enable feature
* A layout test virtual suite is added to simulate Android behavior on Linux.
Depends on chromium patch: https://codereview.chromium.org/23597036/
BUG= 262945
R=aelias,esprehn,falken,abarth
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=158166
Total comments: 2
Total comments: 20
Total comments: 2
Total comments: 1
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+134 lines, -32 lines) |
Patch |
 |
M |
LayoutTests/NeverFixTests
|
View
|
1
2
3
5
6
7
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
M |
LayoutTests/TestExpectations
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+10 lines, -0 lines |
0 comments
|
Download
|
 |
M |
LayoutTests/fullscreen/video-controls-drag.html
|
View
|
1
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
LayoutTests/fullscreen/video-controls-timeline.html
|
View
|
1
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
LayoutTests/fullscreen/video-specified-size.html
|
View
|
1
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
A |
LayoutTests/virtual/android/fullscreen/full-screen-stacking-context-expected.png
|
View
|
1
|
Binary file |
0 comments
|
Download
|
 |
A |
LayoutTests/virtual/android/fullscreen/video-controls-drag-expected.png
|
View
|
1
|
Binary file |
0 comments
|
Download
|
 |
A |
LayoutTests/virtual/android/fullscreen/video-controls-timeline-expected.png
|
View
|
1
|
Binary file |
0 comments
|
Download
|
 |
A |
LayoutTests/virtual/android/fullscreen/video-specified-size-expected.png
|
View
|
1
|
Binary file |
0 comments
|
Download
|
 |
M |
Source/core/css/fullscreen.css
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/dom/FullscreenElementStack.cpp
|
View
|
1
|
1 chunk |
+0 lines, -5 lines |
0 comments
|
Download
|
 |
M |
Source/core/html/HTMLMediaElement.cpp
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+6 lines, -0 lines |
0 comments
|
Download
|
 |
M |
Source/core/html/shadow/MediaControlsChromiumAndroid.h
|
View
|
1
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
Source/core/page/RuntimeEnabledFeatures.in
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
Source/core/platform/graphics/MediaPlayer.h
|
View
|
1
|
1 chunk |
+3 lines, -5 lines |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderLayerBacking.cpp
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+7 lines, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderLayerCompositor.cpp
|
View
|
1
2
3
4
5
6
7
|
4 chunks |
+35 lines, -0 lines |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderLayerModelObject.h
|
View
|
1
2
|
2 chunks |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderLayerModelObject.cpp
|
View
|
1
2
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderObject.h
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
Source/web/FullscreenController.cpp
|
View
|
1
2
|
6 chunks |
+22 lines, -10 lines |
0 comments
|
Download
|
 |
M |
Source/web/WebMediaPlayerClientImpl.h
|
View
|
1
|
1 chunk |
+3 lines, -5 lines |
0 comments
|
Download
|
 |
M |
Source/web/WebMediaPlayerClientImpl.cpp
|
View
|
1
2
3
5
6
7
|
1 chunk |
+3 lines, -5 lines |
0 comments
|
Download
|
 |
M |
Source/web/WebRuntimeFeatures.cpp
|
View
|
1
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
 |
M |
Source/web/WebViewImpl.h
|
View
|
1
2
3
5
6
7
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
Tools/Scripts/webkitpy/layout_tests/port/chromium.py
|
View
|
1
2
3
5
6
7
|
1 chunk |
+8 lines, -0 lines |
0 comments
|
Download
|
 |
M |
public/web/WebRuntimeFeatures.h
|
View
|
1
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
Total messages: 25 (0 generated)
|