When LayoutNG is enabled, we create an anonymous block for leading OOF since https://codereview.chromium.org/2847823002
This causes the following test to fail:
fast/css/text-indent-first-line-002.html
<div class="container">
<span style="float:right;">Float</span>
Block
<div class="control"></div>
</div>
CSS Text says:
> For example, the first line of an anonymous block box is only affected
> if it is the first child of its parent element.
https://drafts.csswg.org/css-text-3/#text-indent-property
The existing code thinks "Block" is not a "first formatted line" because the float creates an anonymous block box.
I can think of two options:
a. Revert the CL.
b. Change the first line logic to match to the new tree structure.
IIUC the CL was only needed because our inline float code was not mature enough at that point, and we're now much better, but if there were more reasons to do the change, I can try option b.
Quick investigation tells me that there are two pieces of code that need to change for option b; one in style (for ::first-line) and another in layout (for text-indent).
Thoughts?
Comment 1 by kojii@chromium.org
, Jun 19 2017