I'm planning to add some advanced filters to the layout test expectations page. One of them can be by minor text diff, for example, if the text diff is whitespace only.
I think this can help us collect a good number of such failures and understand the cause.
Got bunch of this failure by reviewing fast/text/international failures. I guess it's better to rebaseline than keeping them as failures.
Currently there are 87 txt rebaselines:
LayoutTests/flag-specific/enable-blink-features=LayoutNG [3322]% find . -name '*txt'|wc -l
87
I haven't checked them all, but probably most of them are caused by this issue.
Found the cause. Probably not the root cause, though.
TextIterator, the class generating the text dump, appends extra newlines after a block element if it has large margin after. For example, double '\n's are appended after a <p> element.
However, in LayoutNG, the margin is not set. LayoutBox::MarginTop/Bottom() for <p> return 0 instead of the correct positive value.
I prefer changing TextIterator. Although TI is not quite doing the same thing as the spec, we can make them a little bit closer.
According to the spec, the only case where we append two consecutive linebreaks after a block element is after a <p>. TextIterator can follow this by changing only a few lines.
Comment 1 by xiaoche...@chromium.org
, Aug 25 2017