DescriptionAvoid over-eager clipping of child layers in multicol.
Self-painting layers (caused by e.g. position:relative) don't contribute to
visual overflow in their parent layout object; see
LayoutBox::addOverflowFromChild(). We cannot use the visual overflow rectangle
set on the flow thread when calculating the bounding box of a fragment
established by a child layer.
Therefore, only clip in the flow thread's block direction in
overflowRectForFlowThreadPortion(), and leave the inline axis alone. I
simplified the implementation, since it's now way easier to start with an
infinite rectangle, and just limit the dimensions that need it afterwards.
Also got rid of an old check for hasOverflowClip(), which must have been
residue from the CSS regions implementation.
This also happened to fix some inaccuracies mostly invisible to the naked
eye, when it comes to transform:scale()d text with glyphs that have negative
left bearing or overflow the line box vertically. It looks like we measure and
lay out with the CSS computed font, and then switch to a scaled font when
painting, so that it looks crisp and nice. This may result in tiny
inaccuracies in the bounding box of the text, and
fast/borders/border-antialiasing.html exhibited this, and had to be
rebaselined. Added fast/multicol/scale-transform-text.html to better
demonstrate what we're fixing.
paint/invalidation/multicol-with-relpos.html also had to be rebaselined,
since it turns out that it has never painted its stuff correctly until now.
BUG=571978
Review-Url: https://codereview.chromium.org/2699653002
Cr-Commit-Position: refs/heads/master@{#451376}
Committed: https://chromium.googlesource.com/chromium/src/+/e500cbd3ba36bf3216087481790f5aece0e778a5
Patch Set 1 #Patch Set 2 : Rebaseline tests. #Patch Set 3 : Add test that demonstrates what is now fixed in the rebaselined border-antialiasing.html #Messages
Total messages: 17 (13 generated)
|