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

Issue 1139033006: Implement FullScreen using top layer. (Closed)

Created:
5 years, 7 months ago by dsinclair
Modified:
5 years, 2 months ago
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, blink-reviews-dom_chromium.org, blink-reviews-html_chromium.org, blink-reviews-rendering, blink-reviews-style_chromium.org, dglazkov+blink, eae+blinkwatch, jchaffraix+rendering, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, rwlbuis, sof, szager+layoutwatch_chromium.org, zoltan1
Target Ref:
refs/remotes/origin/master
Project:
blink
Visibility:
Public.

Description

This CL is based off of https://codereview.chromium.org/788073004 by jchaffraix@. Replace RenderFullscreen with top layer - Take II This patch is strongly inspired by https://codereview.chromium.org/134753003/ but is a complete rewrite of the change to: - understand why every bits was needed (some were not). - better document the differences we have with the specification so that we can track and fix them. The issue with re-attaching plugins went away due to https://codereview.chromium.org/23618022, which moved the plugin's lifecycle to the DOM. The tests' changes are because fullscreen doesn't center by default anymore but stretches the element to the viewport's size. Some tests were also not accounting for the backdrop and where thus modified. That change didn't land due to plugin persistence issues. Those issues should now be resolved and plugins should survive over reattach. BUG=240576, 246077, 398599

Patch Set 1 #

Patch Set 2 : Rebase to master #

Patch Set 3 : Add missing CORE_EXPORT #

Patch Set 4 : Rebase to master #

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : #

Total comments: 6

Patch Set 8 : Rebase to master #

Unified diffs Side-by-side diffs Delta from patch set Stats (+199 lines, -479 lines) Patch
M LayoutTests/fast/css/invalidation/fullscreen.html View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/fast/css/invalidation/fullscreen-expected.txt View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/fullscreen/enter-exit-full-screen-hover.html View 1 2 chunks +9 lines, -1 line 0 comments Download
M LayoutTests/fullscreen/full-screen-iframe-zIndex-expected.html View 1 1 chunk +1 line, -0 lines 0 comments Download
A LayoutTests/fullscreen/full-screen-is-in-top-layer.html View 1 1 chunk +38 lines, -0 lines 0 comments Download
A LayoutTests/fullscreen/full-screen-is-in-top-layer-expected.html View 1 1 chunk +10 lines, -0 lines 0 comments Download
M LayoutTests/fullscreen/full-screen-render-inline-expected.html View 1 1 chunk +1 line, -2 lines 0 comments Download
A LayoutTests/fullscreen/full-screen-video-has-backdrop.html View 1 1 chunk +31 lines, -0 lines 0 comments Download
A LayoutTests/fullscreen/full-screen-video-has-backdrop-expected.html View 1 1 chunk +18 lines, -0 lines 0 comments Download
M LayoutTests/fullscreen/full-screen-zIndex-expected.html View 1 1 chunk +5 lines, -6 lines 0 comments Download
M LayoutTests/fullscreen/parent-flow-inline-with-block-child-expected.html View 1 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/fullscreen/resources/empty.html View 1 2 3 4 1 chunk +7 lines, -1 line 0 comments Download
M Source/core/core.gypi View 1 2 3 4 5 6 7 1 chunk +0 lines, -2 lines 0 comments Download
M Source/core/css/fullscreen.css View 1 chunk +30 lines, -47 lines 0 comments Download
M Source/core/css/resolver/StyleAdjuster.cpp View 1 2 3 3 chunks +15 lines, -0 lines 0 comments Download
M Source/core/css/resolver/StyleResolver.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/dom/Document.cpp View 1 2 3 4 5 6 7 1 chunk +7 lines, -3 lines 0 comments Download
M Source/core/dom/Fullscreen.h View 1 4 chunks +2 lines, -6 lines 0 comments Download
M Source/core/dom/Fullscreen.cpp View 1 2 3 4 5 6 7 8 chunks +8 lines, -49 lines 0 comments Download
M Source/core/dom/LayoutTreeBuilder.cpp View 1 2 chunks +0 lines, -7 lines 0 comments Download
M Source/core/dom/StyleChangeReason.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/HTMLPlugInElement.cpp View 1 1 chunk +0 lines, -1 line 0 comments Download
M Source/core/layout/LayoutBlock.cpp View 1 2 3 1 chunk +1 line, -5 lines 0 comments Download
D Source/core/layout/LayoutFullScreen.h View 1 1 chunk +0 lines, -63 lines 0 comments Download
D Source/core/layout/LayoutFullScreen.cpp View 1 1 chunk +0 lines, -203 lines 0 comments Download
M Source/core/layout/LayoutInline.cpp View 1 2 3 2 chunks +0 lines, -12 lines 0 comments Download
M Source/core/layout/LayoutMenuList.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/layout/LayoutObject.h View 1 2 3 4 5 6 7 3 chunks +1 line, -7 lines 0 comments Download
M Source/core/layout/LayoutObject.cpp View 1 2 3 4 5 6 7 1 chunk +0 lines, -3 lines 0 comments Download
M Source/core/layout/LayoutVideo.h View 1 1 chunk +0 lines, -5 lines 0 comments Download
M Source/core/layout/LayoutVideo.cpp View 1 2 chunks +0 lines, -42 lines 0 comments Download
M Source/web/FullscreenController.h View 1 1 chunk +0 lines, -1 line 0 comments Download
M Source/web/FullscreenController.cpp View 1 1 chunk +4 lines, -3 lines 0 comments Download
M Source/web/tests/WebFrameTest.cpp View 1 2 3 4 5 6 7 3 chunks +4 lines, -3 lines 0 comments Download

Messages

Total messages: 10 (5 generated)
dsinclair
PTAL. This is the work jchaffraix@ did to port fullscreen top layer. The one outstanding ...
5 years, 3 months ago (2015-09-17 18:48:25 UTC) #5
dsinclair
ping
5 years, 3 months ago (2015-09-21 14:15:59 UTC) #6
leviw_travelin_and_unemployed
Few comments. Looks like you'll want to give this another go at the try jobs, ...
5 years, 3 months ago (2015-09-21 20:26:22 UTC) #7
rune
https://codereview.chromium.org/1139033006/diff/180001/Source/core/dom/StyleChangeReason.h File Source/core/dom/StyleChangeReason.h (right): https://codereview.chromium.org/1139033006/diff/180001/Source/core/dom/StyleChangeReason.h#newcode29 Source/core/dom/StyleChangeReason.h:29: CORE_EXPORT extern const char FullScreen[]; On 2015/09/21 20:26:22, leviw ...
5 years, 3 months ago (2015-09-22 11:47:57 UTC) #9
dsinclair
5 years, 3 months ago (2015-09-23 19:47:59 UTC) #10
On 2015/09/22 11:47:57, rune wrote:
>
https://codereview.chromium.org/1139033006/diff/180001/Source/core/dom/StyleC...
> File Source/core/dom/StyleChangeReason.h (right):
> 
>
https://codereview.chromium.org/1139033006/diff/180001/Source/core/dom/StyleC...
> Source/core/dom/StyleChangeReason.h:29: CORE_EXPORT extern const char
> FullScreen[];
> On 2015/09/21 20:26:22, leviw (UTCplus1 until 9-17) wrote:
> > Why is this necessary for FullScreen but nowhere else?
> 
> I suspect that's because it's passed to setNeedsStyleRecalc in web/.
> 
>
https://codereview.chromium.org/1139033006/diff/180001/Source/web/FullscreenC...
> File Source/web/FullscreenController.cpp (right):
> 
>
https://codereview.chromium.org/1139033006/diff/180001/Source/web/FullscreenC...
> Source/web/FullscreenController.cpp:184:
> document->setNeedsStyleRecalc(SubtreeStyleChange,
> StyleChangeReasonForTracing::create(StyleChangeReason::FullScreen));
> So, what is actually requiring a style recalc here?
> 
> It used to just recalculate the style for just the LayoutFullScreen, and since
> it sets the width and height in px based on the viewport size, I understand
why
> it's necessary when changing the viewport size, but for all the other
elements?
> 
> Couldn't you just use fullscreenElement->setNeedsStyleRecalc(LocalStyleChange,
> ...), to trigger the recalc + styleAdjustment (where the viewport px sizes are
> now set)?
> 
> Also, if you implemented a method inside blink (Fullscreen for instance) that
> looked up and did setNeeds..., you'd avoid the CORE_EXPORT on the FullScreen
> constant. The setNeeds... calls for entering and exiting fullscreen are
> contained in the Fullscreen class.


Continuing here: https://codereview.chromium.org/1363023005

Powered by Google App Engine
This is Rietveld 408576698