Many tests have failures due to small space differences. For instance, LayoutTests/animations/lineheight-animation.html fails in GTK since r184829, where a space was removed. Apparently the space was not being generated (anymore) in the Mac backend, but it still is in the GTK port: in effect, by editing the expectations, the test become green for Mac and at the same time become red in GTK.
Excerpt of LayoutTests/animations/lineheight-animation.html:
This test performs an animation of the line-height property. It tests whether or not we are properly getting the font-size.
Here is some text. Here is some text. [...]
Output Mac: This test performs an animation of the line-height property. It tests whether or not we are properly getting the font-size.Here is some text. Here is some text. [...]
Output GTK: This test performs an animation of the line-height property. It tests whether or not we are properly getting the font-size. Here is some text. Here is some text. [...]
This makes me wonder: Should the space be there? What causes platform variations?
Can these be harmonized? I hope we don't need to duplicate (and update accordingly) expectations for each platform with the space variation forever.
Can you post links to image diffs?
That's not the issue here. In fact, after more experimentation I've found this is due to differences in how different ports (and browsers!) implement innerText with absolute positioned elements differently.
Here is a testcase:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>innerText cross-platform differences</title>
<style type="text/css" media="screen">
document.body.innerText = document.body.innerText;
WebKit iOS (Safari):
I think this is a WebKit bug. Gecko is right on this one:
> If node's used value of 'display' is block-level or 'table-caption', then append 1 (a required line break count) at the beginning and end of items. [CSSDISPLAY]
In fact it's explicitly mentioned:
> Floats and absolutely-positioned elements fall into this category.
I filed https://bugs.chromium.org/p/chromium/issues/detail?id=916540 for the relevant chromium issue.
*** This bug has been marked as a duplicate of bug 192750 ***