Chromium Code Reviews
DescriptionPercent height in auto height containers no longer computes as auto
https://drafts.csswg.org/css2/visudet.html#the-height-property has changed.
See http://lists.w3.org/Archives/Public/www-style/2013May/0201.html
The section on percentage now reads:
"<percentage>
Specifies a percentage height. The percentage is calculated with respect to the
height of the generated box's containing block. If the height of the containing
block is not specified explicitly (i.e., it depends on content height), and this
element is not absolutely positioned, the used height is calculated as if 'auto'
was specified."
The last clause used to read: "the value computes to 'auto'."
So remove our attempt to treat percentage height in auto height containers as
computed in RenderReplaced::computeReplacedLogicalWidth() and only treat actual
computed style of auto as such.
Once we remove this feature we find that when calculating used width for replaced
elements we can end up in a situation where we need to factor in the 'used height'
to our calculation. In certain circumstances, calculating the 'used height'
requires the 'used width'. :) When this situation arises, use an estimate of the
used width based on the intrinsic width of the replaced object if it's available
and failing that use the width made available by its container.
This circularity always existed I think and we always had to assume the 'used'
width in this situation - it's just easier to surface now.
BUG=396717
Committed: https://crrev.com/4f61ad0df953092181eb059d6c119893e4202d34
Cr-Commit-Position: refs/heads/master@{#388878}
Patch Set 1 #Patch Set 2 : Updated #Patch Set 3 : Updated #
Total comments: 1
Patch Set 4 : Updated #Patch Set 5 : Updated #Depends on Patchset: Dependent Patchsets: Messages
Total messages: 27 (9 generated)
|