Strange difference between a single line paragraph vs a multi-line one |
||
Issue descriptionI stumbled upon this strange issue while working on something completely unrelated. The problem appears if you have a layout test where the original file and the reference only varies in the number of lines but not the content. Basically the following simple test: <!DOCTYPE html> <p>Test passes if, when the element below is focused, it is surrounded by a thick green border. There must be no red or blue once it is focused.</p> vs the 1-line version: <!DOCTYPE html> <p>Test passes if, when the element below is focused, it is surrounded by a thick green border. There must be no red or blue once it is focused.</p> I created a CL to test this and it only fails on Mac: https://codereview.chromium.org/2788683004/ The diff seems to be around *be no red* letters. On Linux I cannot reproduce it, however on HDPI screens I can see a small difference if I use zoom (the test still passes though). Dunno if this is a fonts issue or something else, but it was really strange to get a failure in a test due to this. :-)
,
Apr 6 2017
This has to do with snapping of line boxes and whitespace collapsing. With the current line layout implementation we cannot make any guarantees about pixel perfect rendering if the source content has different amounts of whitspace. LayoutNG will fix this as it seprates white space collapsing into a separate pipeline stage and merges adjacent items before painting.
,
Apr 7 2017
@eae thanks for the info. I was somehow suspecting this was already a known issue. |
||
►
Sign in to add a comment |
||
Comment 1 by rtoy@chromium.org
, Apr 4 2017