Bug 47750 - Redraw problem on elements above a playing video element
Summary: Redraw problem on elements above a playing video element
Status: ASSIGNED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac (Intel) OS X 10.6
: P2 Normal
Assignee: Simon Fraser (smfr)
URL: http://gist.github.com/629104
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2010-10-15 16:10 PDT by Andrew Smith
Modified: 2011-11-17 15:15 PST (History)
4 users (show)

See Also:


Attachments
Example rendering issue when updating css of element with overflow:hidden while sitting over video (1.79 KB, text/html)
2011-09-21 16:51 PDT, Mike Stead
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Smith 2010-10-15 16:10:27 PDT
I don't have a suitable way to host a web page right now so I linked to some source HTML(http://gist.github.com/629104)  which you can download and run locally.

This bug requires a few things to be detected:

1) A video element that is currently playing
2) A containing element on top of the video which has overflow:hidden
3) A child of the container element which is absolutely positioned

With all three things in motion, try to increase the width of the child element and it will not be rendered immediately. Change the size of the window and the size of the child element will be updated correctly. If you remove overflow:hidden, the bug will disappear.

This happens in the latest Safari and the latest WebKit.

It's taken me days trying to isolate this issue. I... I need a hug.
Comment 1 Simon Fraser (smfr) 2010-10-17 12:14:44 PDT
Thanks for the report, and the nice testcase.
Comment 2 Simon Fraser (smfr) 2010-10-17 12:16:12 PDT
<rdar://problem/8561001>
Comment 3 Simon Fraser (smfr) 2010-10-17 12:20:19 PDT
An easy workaround is to add z-index:0 to #controls.
Comment 4 Simon Fraser (smfr) 2010-10-17 14:56:36 PDT
The bug is that RenderLayerBacking::updateAfterLayout() doesn't actually update layer geometry for the layer itself; it relies on updateCompositingDescendantGeometry() being called on some z-order ancestor; this was a fix for bug 26430.

However, the isUpdateRoot flag is sent in from RenderLayer::updateLayerPositions(), which uses parentage, rather than z-order hierarchy to determine if it's the root.
Comment 5 Mike Stead 2011-09-21 16:51:00 PDT
Created attachment 108253 [details]
Example rendering issue when updating css of element with overflow:hidden while sitting over video

I've been debugging this issue recently and have another supporting test file which may be helpful when testing the fix. 

Simply click the track to move the thumb to the point clicked. Inspecting the dom shows the thumb is in the new position but visually is still rendered in its old position. Clicking the track again will render the thumb in the previous position but move its dom position to the new one i.e. it's aways one step behind.
Comment 6 Simon Fraser (smfr) 2011-09-21 16:56:21 PDT
Can't test the attachment because it uses theora video.
Comment 7 Mike Stead 2011-11-17 15:15:17 PST
(In reply to comment #6)
> Can't test the attachment because it uses theora video.

Sorry, that was the only free video I could find at the time. It will run fine under Chrome, just not Safari. You'll need to provide your own video under safari but the bug manifests the the same under both.