Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Issue 22454003: Support subtitles for native fullscreen video (Closed)

Created:
7 years, 4 months ago by trchen
Modified:
7 years, 3 months ago
CC:
blink-reviews, kenneth.christiansen, eae+blinkwatch, leviw+renderwatch, feature-media-reviews_chromium.org, dglazkov+blink, apavlov+blink_chromium.org, adamk+blink_chromium.org, jchaffraix+rendering, darktears, vcarbune.chromium, scherkus (not reviewing)
Visibility:
Public.

Description

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

Patch Set 1 #

Total comments: 2

Patch Set 2 : enabling layout tests #

Total comments: 20

Patch Set 3 : revised as suggested #

Patch Set 4 : add dangling pointer check #

Total comments: 2

Patch Set 5 : remove the scary cross-frame pointer #

Patch Set 6 : fixed crash #

Patch Set 7 : revert video-controls-override.html #

Total comments: 1

Patch Set 8 : rebased #

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

Messages

Total messages: 25 (0 generated)
trchen
Hello James, This patch implements subtitles for native fullscreen video. Please let me know if ...
7 years, 4 months ago (2013-08-07 07:45:42 UTC) #1
trchen
Hello falken, Here is a fullscreen video implementation for Android. Please take a look and ...
7 years, 4 months ago (2013-08-22 00:01:51 UTC) #2
falken
Hey trchen, I still think I'm missing a lot of context before I can understand ...
7 years, 4 months ago (2013-08-22 12:40:34 UTC) #3
trchen
On 2013/08/22 12:40:34, falken wrote: > Hey trchen, > > I still think I'm missing ...
7 years, 4 months ago (2013-08-22 21:55:40 UTC) #4
falken
OK cool, I think the approach lg to me. Just some more questions to make ...
7 years, 4 months ago (2013-08-23 10:32:35 UTC) #5
trchen
On 2013/08/23 10:32:35, falken wrote: > OK cool, I think the approach lg to me. ...
7 years, 4 months ago (2013-08-23 11:24:13 UTC) #6
falken
lgtm Is it possible to write a test for this? https://codereview.chromium.org/22454003/diff/1/Source/core/rendering/RenderLayerCompositor.cpp File Source/core/rendering/RenderLayerCompositor.cpp (right): https://codereview.chromium.org/22454003/diff/1/Source/core/rendering/RenderLayerCompositor.cpp#newcode446 ...
7 years, 4 months ago (2013-08-24 05:25:40 UTC) #7
trchen
On 2013/08/24 05:25:40, falken wrote: > lgtm > > Is it possible to write a ...
7 years, 4 months ago (2013-08-24 05:33:31 UTC) #8
trchen
+jochen for Tools/ and public/ Hello jamesr, PTAL at the RenderLayerCompositor change. Thanks! This new ...
7 years, 3 months ago (2013-09-12 10:55:28 UTC) #9
trchen
+esprehn, will you be able to look at the fullscreen related changes under Source/core? Thanks!
7 years, 3 months ago (2013-09-12 21:56:27 UTC) #10
esprehn
Keeping RenderObjects across frames is _very_ scary. https://codereview.chromium.org/22454003/diff/13001/Source/core/dom/Element.cpp File Source/core/dom/Element.cpp (right): https://codereview.chromium.org/22454003/diff/13001/Source/core/dom/Element.cpp#newcode1358 Source/core/dom/Element.cpp:1358: if (FrameView* ...
7 years, 3 months ago (2013-09-13 02:46:07 UTC) #11
trchen
https://codereview.chromium.org/22454003/diff/13001/Source/core/dom/Element.cpp File Source/core/dom/Element.cpp (right): https://codereview.chromium.org/22454003/diff/13001/Source/core/dom/Element.cpp#newcode1358 Source/core/dom/Element.cpp:1358: if (FrameView* view = document().view()) On 2013/09/13 02:46:07, esprehn ...
7 years, 3 months ago (2013-09-13 05:14:57 UTC) #12
scherkus (not reviewing)
drive-by: you mention subtitles ... but I'm not seeing much in the way of subtitle/track ...
7 years, 3 months ago (2013-09-13 18:14:19 UTC) #13
trchen
On 2013/09/13 18:14:19, scherkus wrote: > drive-by: you mention subtitles ... but I'm not seeing ...
7 years, 3 months ago (2013-09-13 20:05:15 UTC) #14
trchen
Hello esprehn, I just added the dangling pointer test you recommended. Due to the way ...
7 years, 3 months ago (2013-09-20 01:38:23 UTC) #15
esprehn
This really doesn't feel right adding all this logic into recalcStyle and keeping RenderObject* pointers ...
7 years, 3 months ago (2013-09-20 22:01:08 UTC) #16
esprehn
LGTM please make LayoutTests/virtual/android/fullscreen/video-controls-override a text test though, all the output is text :)
7 years, 3 months ago (2013-09-21 00:25:31 UTC) #17
trchen
Hello abarth, Could you take a look at the Source/web and public/web part of the ...
7 years, 3 months ago (2013-09-21 00:36:41 UTC) #18
aelias_OOO_until_Jul13
Source/web lgtm
7 years, 3 months ago (2013-09-21 02:30:18 UTC) #19
esprehn
ojan had wondered why I had been like "this patch doesn't feel right" and then ...
7 years, 3 months ago (2013-09-21 02:54:49 UTC) #20
abarth-chromium
https://codereview.chromium.org/22454003/diff/104001/public/web/WebRuntimeFeatures.h File public/web/WebRuntimeFeatures.h (right): https://codereview.chromium.org/22454003/diff/104001/public/web/WebRuntimeFeatures.h#newcode149 public/web/WebRuntimeFeatures.h:149: WEBKIT_EXPORT static void enableOverlayFullscreenVideo(bool); public/web <-- LGTM
7 years, 3 months ago (2013-09-21 20:56:56 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/trchen@chromium.org/22454003/118001
7 years, 3 months ago (2013-09-23 04:07:46 UTC) #22
commit-bot: I haz the power
Commit queue rejected this change because the description was changed between the time the change ...
7 years, 3 months ago (2013-09-23 08:11:38 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/trchen@chromium.org/22454003/118001
7 years, 3 months ago (2013-09-23 08:14:14 UTC) #24
commit-bot: I haz the power
7 years, 3 months ago (2013-09-23 08:22:18 UTC) #25
Message was sent while issue was closed.
Change committed as 158166

Powered by Google App Engine
This is Rietveld 408576698