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

Issue 138833005: Replace RenderFullScreen with top layer (Closed)

Created:
6 years, 10 months ago by falken
Modified:
6 years, 6 months ago
Reviewers:
wjmaclean, esprehn, eseidel
CC:
blink-reviews, zoltan1, dsinclair, sof, eae+blinkwatch, ed+blinkwatch_opera.com, leviw+renderwatch, blink-layers+watch_chromium.org, dglazkov+blink, apavlov+blink_chromium.org, adamk+blink_chromium.org, jchaffraix+rendering, darktears, bemjb+rendering_chromium.org, Inactive
Visibility:
Public.

Description

Replace RenderFullScreen with top layer This patch makes the Fullscreen API use the top layer, as per the latest Fullscreen spec. The previous attempt apparently broke plugin reloading on setAttribute, but there is not a simple test case for it (empirically, a plugin-based app broke after the change). The cause was the m_protectWidgetDuringReattach mechanism that saves a plugin from reloading when entering/exiting fullscreen. In this case, the m_protectWidgetDuringReattach mechanism inappropriately kicked in during a reattach triggered by recalcStyle. The fix is to only set m_protectWidgetDuringReattach in setIsInTopLayer, rather than in detach. Previously landed as r165904, r165710, 166304 Codereviews: https://codereview.chromium.org/134753003/ https://codereview.chromium.org/139743005/ https://codereview.chromium.org/142653003/ BUG=240576, 246077

Patch Set 1 #

Patch Set 2 : previous attempt #

Patch Set 3 : protect only for top layer changes #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+303 lines, -498 lines) Patch
M LayoutTests/TestExpectations View 4 chunks +12 lines, -5 lines 0 comments Download
A LayoutTests/fast/dom/HTMLDialogElement/fullscreen-elements-do-not-affect-modality.html View 1 1 chunk +109 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/HTMLDialogElement/fullscreen-elements-do-not-affect-modality-expected.txt View 1 chunk +12 lines, -0 lines 0 comments Download
M LayoutTests/fullscreen/anonymous-block-merge-crash.html View 1 chunk +9 lines, -3 lines 0 comments Download
A LayoutTests/fullscreen/full-screen-is-in-top-layer.html View 1 chunk +40 lines, -0 lines 0 comments Download
D LayoutTests/fullscreen/full-screen-placeholder.html View 1 chunk +0 lines, -73 lines 0 comments Download
D LayoutTests/fullscreen/full-screen-placeholder-expected.txt View 1 chunk +0 lines, -17 lines 0 comments Download
A LayoutTests/fullscreen/full-screen-video-has-backdrop.html View 1 chunk +31 lines, -0 lines 0 comments Download
D LayoutTests/platform/linux/fullscreen/parent-flow-inline-with-block-child-expected.png View Binary file 0 comments Download
D LayoutTests/platform/win/fullscreen/full-screen-placeholder-expected.txt View 1 chunk +0 lines, -17 lines 0 comments Download
M Source/core/core.gypi View 1 chunk +0 lines, -2 lines 0 comments Download
M Source/core/css/fullscreen.css View 1 chunk +22 lines, -1 line 0 comments Download
M Source/core/css/resolver/StyleResolver.cpp View 1 chunk +3 lines, -1 line 0 comments Download
M Source/core/dom/Document.cpp View 1 chunk +9 lines, -3 lines 0 comments Download
M Source/core/dom/Element.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/dom/FullscreenElementStack.h View 3 chunks +0 lines, -6 lines 0 comments Download
M Source/core/dom/FullscreenElementStack.cpp View 10 chunks +14 lines, -50 lines 0 comments Download
M Source/core/dom/RenderTreeBuilder.cpp View 2 chunks +0 lines, -9 lines 0 comments Download
M Source/core/html/HTMLDialogElement.h View 2 chunks +3 lines, -0 lines 0 comments Download
M Source/core/html/HTMLDialogElement.cpp View 4 chunks +10 lines, -0 lines 0 comments Download
M Source/core/html/HTMLPlugInElement.h View 1 2 2 chunks +2 lines, -0 lines 0 comments Download
M Source/core/html/HTMLPlugInElement.cpp View 1 2 4 chunks +26 lines, -1 line 2 comments Download
D Source/core/rendering/RenderFullScreen.h View 1 chunk +0 lines, -60 lines 0 comments Download
D Source/core/rendering/RenderFullScreen.cpp View 1 chunk +0 lines, -189 lines 0 comments Download
M Source/core/rendering/RenderInline.cpp View 2 chunks +0 lines, -12 lines 0 comments Download
M Source/core/rendering/RenderLayerCompositor.cpp View 1 chunk +0 lines, -1 line 0 comments Download
M Source/core/rendering/RenderVideo.h View 1 chunk +0 lines, -5 lines 0 comments Download
M Source/core/rendering/RenderVideo.cpp View 2 chunks +0 lines, -42 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
falken
eseidel: could you review this in esprehn's absence? This makes a small change from the ...
6 years, 10 months ago (2014-02-05 09:38:56 UTC) #1
esprehn
This patch is not correct, what if you full screen an ancestor of the plugin? ...
6 years, 10 months ago (2014-02-11 00:25:15 UTC) #2
falken
https://codereview.chromium.org/138833005/diff/200001/Source/core/html/HTMLPlugInElement.cpp File Source/core/html/HTMLPlugInElement.cpp (right): https://codereview.chromium.org/138833005/diff/200001/Source/core/html/HTMLPlugInElement.cpp#newcode302 Source/core/html/HTMLPlugInElement.cpp:302: m_protectWidgetDuringReattach = existingRenderWidget()->widget(); On 2014/02/11 00:25:16, esprehn wrote: > ...
6 years, 10 months ago (2014-02-11 14:39:57 UTC) #3
esprehn
On 2014/02/11 at 14:39:57, falken wrote: > https://codereview.chromium.org/138833005/diff/200001/Source/core/html/HTMLPlugInElement.cpp > File Source/core/html/HTMLPlugInElement.cpp (right): > > https://codereview.chromium.org/138833005/diff/200001/Source/core/html/HTMLPlugInElement.cpp#newcode302 ...
6 years, 9 months ago (2014-03-06 06:59:30 UTC) #4
falken
6 years, 9 months ago (2014-03-06 16:15:59 UTC) #5
On 2014/03/06 06:59:30, esprehn wrote:
> On 2014/02/11 at 14:39:57, falken wrote:
> >
>
https://codereview.chromium.org/138833005/diff/200001/Source/core/html/HTMLPl...
> > File Source/core/html/HTMLPlugInElement.cpp (right):
> > 
> >
>
https://codereview.chromium.org/138833005/diff/200001/Source/core/html/HTMLPl...
> > Source/core/html/HTMLPlugInElement.cpp:302: m_protectWidgetDuringReattach =
> existingRenderWidget()->widget();
> > On 2014/02/11 00:25:16, esprehn wrote:
> > > This doesn't seem right, what if you have <div><object ...></div>
> > > 
> > > Now the plugin will reload since it's not the thing that's going into the
> top
> > > layer, its parent is.
> > 
> > Ah, good point. How about adding "topLayerChanged" to AttachContext, or else
> making Element::setIsInTopLayer traverse descendants and have any
> HTMLPlugInElements protect their widgets?
> > 
> > From the breakage caused by the previous patch, it seems reloading the
plugin
> even when needsWidgetUpdate is false during a reattach is necessary in some
> cases. So HTMLPlugInElement somehow needs to know when the reattach was caused
> by something entering/exiting top layer.
> 
> I've been trying to understand this more, how did the old full screen not
> reattach everything? The wrapping for full screen happened inside
> NodeRenderingContext (now RenderTreeBuilder) so it's not clear why plugins
> didn't restart then?

Looking at http://trac.webkit.org/changeset/95371

It looks like by directly doing remove() then addChild(), a reattach doesn't
occur.

Another possibility I was considering is if we could somehow make
entering/exiting top layer not require a reattach...

Powered by Google App Engine
This is Rietveld 408576698