Bug 58397

Summary: [chromium] Descendants of layers whose parent preserves-3d don't always render in DOM order
Product: WebKit Reporter: Vangelis Kokkevis <vangelis>
Component: WebCore Misc.Assignee: Vangelis Kokkevis <vangelis>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, jamesr
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
Patch none

Description Vangelis Kokkevis 2011-04-12 17:10:14 PDT
The chromium compositor sorts all descendants of a layer that sets the preserves-3d property based on the layer center's z coordinate.  The algorithm relies on the properties of stable sort to keep layers with the same z coordinate render with their correct DOM order.  The z coordinate of layers whose parent doesn't preserve 3d are set to the z coordinate of their parent.  Due to a bug in the code, we grab the z coordinate of the parent layer before it's actually set so as things animate, child layers use the z coordinate of their parent from the previous frame, messing up the sorting order.
Comment 1 Vangelis Kokkevis 2011-04-12 17:40:05 PDT
Created attachment 89319 [details]
Patch
Comment 2 Vangelis Kokkevis 2011-04-12 17:41:57 PDT
I should probably mention that I put the layout test under platform/chromium as it's really a regression test for a bug found in chrome.  Not worth adding to the common test pool...
Comment 3 James Robinson 2011-04-12 17:55:42 PDT
Comment on attachment 89319 [details]
Patch

Good catch!
Comment 4 WebKit Commit Bot 2011-04-12 21:13:53 PDT
Comment on attachment 89319 [details]
Patch

Clearing flags on attachment: 89319

Committed r83694: <http://trac.webkit.org/changeset/83694>
Comment 5 WebKit Commit Bot 2011-04-12 21:14:00 PDT
All reviewed patches have been landed.  Closing bug.