Bug 55103 - Clipping layer doesn't resize when FrameView changes size
Summary: Clipping layer doesn't resize when FrameView changes size
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Vangelis Kokkevis
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-23 16:42 PST by Vangelis Kokkevis
Modified: 2011-02-25 11:00 PST (History)
2 users (show)

See Also:


Attachments
Patch (1.50 KB, patch)
2011-02-23 16:48 PST, Vangelis Kokkevis
simon.fraser: review+
vangelis: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vangelis Kokkevis 2011-02-23 16:42:53 PST
The size of the m_clipLayer created by RenderLayerCompositor doesn't get updated when the layoutWidth of the associated frameView changes.  This can happen if for example the content of the page changes and the scrollbar is removed.

It's fairly easy to reproduce the problem in Chromium by visiting:

http://www.youtube.com/watch?v=PEZiZ9G-gNs

and switching the video over to full screen mode (note that in this case the video doesn't expand to cover the entire screen, it just stretches to use the entire window size).  You'll notice that the video doesn't render in the area that used to be occupied by the scroll bar.  What happens here is that in non-fullscreen mode the page has a scrollbar whereas in fullscreen mode it doesn't. Switching between the two modes effectively changes the layoutWidth of the FrameView.  If you change the window size the problem goes away. 

(Safari on mac doesn't exhibit the issue in this particular case as it handles scrolling differently and the RenderLayerCompositor doesn't create a clip or scroll layer)

The problem appears to be that when RenderLayerCompositor::rebuildCompositingLayerTree() is called, even though the size of m_rootPlayerformLayer is set correctly, the clip layer size doesn't get updated.  The most natural place to update the clip layer size appears to be in RenderLayerCompositor::updateRootLayerPosition.
Comment 1 Vangelis Kokkevis 2011-02-23 16:48:31 PST
Created attachment 83577 [details]
Patch
Comment 2 Simon Fraser (smfr) 2011-02-23 16:55:42 PST
Comment on attachment 83577 [details]
Patch

Is it possible to make a layout test with pixel results that test this?
Comment 3 Vangelis Kokkevis 2011-02-23 23:42:13 PST
(In reply to comment #2)
> (From update of attachment 83577 [details])
> Is it possible to make a layout test with pixel results that test this?

A layout test would be useful here. Ideally I'd like to find a way to programmatically change the frame's layout width that doesn't involve scrollbars.  This would make the test useful for safari mac as well.  Any ideas?
Comment 4 Vangelis Kokkevis 2011-02-25 11:00:04 PST
Committed r79699: <http://trac.webkit.org/changeset/79699>