Bug 58397 - [chromium] Descendants of layers whose parent preserves-3d don't always render in DOM order
Summary: [chromium] Descendants of layers whose parent preserves-3d don't always rende...
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Vangelis Kokkevis
Depends on:
Reported: 2011-04-12 17:10 PDT by Vangelis Kokkevis
Modified: 2011-04-12 21:14 PDT (History)
2 users (show)

See Also:

Patch (12.15 KB, patch)
2011-04-12 17:40 PDT, Vangelis Kokkevis
no flags 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-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]
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]

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

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.