DescriptionEnsure that positioned objects list is always in parent first order
This patch fixes a case where the positioned objects list may contain an
element after its descendant. RenderBlock::layoutPositionedObjects()'s
logic relies on "parent first" positioned object ordering. Wrong ordering
could end up having dirty children, after finishing layouting positioned
objects.
When an element's position property is changed from a non-static value to
to another non-static value, if its descendants have non-static position
value, it may be inserted into the new containing block's positioned
objects list after the descendants.
Three changes to the logic are:
1. Invalidation of descendants from the list of containing block (of
newStyle) occurs not only when non-static-to-static but also
non-static-to-non-static (e.g., absolute->fixed) changes.
2. LayoutBlock::styleWillChange had a copy of the logic in contaningBlock()
that assumes position:absolute, which gets wrong result for position:fixed.
Changed to call contaningBlock().
3. LayoutBlock::styleDidChange invalidates the list of new containing block
in case the containing block changes by the property change, and the new
containing block already has descendants.
Test debug build with some real content:
http://binged.it/K9uLcw
http://www.bing.com/maps/
http://www.nytimes.com (scroll down)
http://www.awwwards.com/22-experimental-webgl-demo-examples.html (scroll down)
Patch was developed by Zalan Bujtas <zbujtas@gmail.com>;
see original bug https://bugs.webkit.org/show_bug.cgi?id=93891
then polished by alexanderk@opera.com
https://codereview.chromium.org/875563003/
BUG=407356, 416210, 351709, 144608, 500511
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=197189
Patch Set 1 : Copied from https://codereview.chromium.org/875563003/ and rebase #Patch Set 2 : Re-constructed #Patch Set 3 : Avoid invalidations too often than necessary #Patch Set 4 : Simplified logic #Patch Set 5 : More comprehensive test cases #
Total comments: 2
Patch Set 6 : Rebase #Patch Set 7 : mstensho's review and transform fix for crbug.com/500511 #Patch Set 8 : Invalidate both in styleWillChange and styleDidChange #Patch Set 9 : Rebaseline one repaint order change for https://storage.googleapis.com/chromium-layout-test-archives/linux_blink_rel/66793/layout-test-results/results.html #
Total comments: 8
Patch Set 10 : Rebase #Patch Set 11 : mstensho's nits and change test to avoid timeouts #
Messages
Total messages: 12 (4 generated)
|