<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>192851</bug_id>
          
          <creation_ts>2018-12-19 06:10:32 -0800</creation_ts>
          <short_desc>Space differences between GTK and Mac ports in tests</short_desc>
          <delta_ts>2018-12-19 06:55:33 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Text</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>192750</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alicia Boya García">aboya</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>cgarcia</cc>
    
    <cc>emilio</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>mmaxfield</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1489284</commentid>
    <comment_count>0</comment_count>
    <who name="Alicia Boya García">aboya</who>
    <bug_when>2018-12-19 06:10:32 -0800</bug_when>
    <thetext>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.
&lt;div id=&quot;box&quot;&gt;
Here is some text. Here is some text. [...]
&lt;/div&gt;

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&apos;t need to duplicate (and update accordingly) expectations for each platform with the space variation forever.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1489285</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2018-12-19 06:13:08 -0800</bug_when>
    <thetext>Can you post links to image diffs?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1489287</commentid>
    <comment_count>2</comment_count>
    <who name="Alicia Boya García">aboya</who>
    <bug_when>2018-12-19 06:27:45 -0800</bug_when>
    <thetext>That&apos;s not the issue here. In fact, after more experimentation I&apos;ve found this is due to differences in how different ports (and browsers!) implement innerText with absolute positioned elements differently.

Here is a testcase:

&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot; &quot;http://www.w3.org/TR/html4/loose.dtd&quot;&gt;
&lt;html lang=&quot;en&quot;&gt;
&lt;head&gt;
  &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot;&gt;
  &lt;title&gt;innerText cross-platform differences&lt;/title&gt;
  &lt;style type=&quot;text/css&quot; media=&quot;screen&quot;&gt;
    #box {
        position: absolute;
    }
    &lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
Hello
&lt;div id=&quot;box&quot;&gt;
CSS
&lt;/div&gt;
&lt;script&gt;
  document.body.innerText = document.body.innerText;
&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;

WebKitGTK:

Hello CSS

WebKit iOS (Safari):

HelloCSS

Firefox:

Hello
CSS

Google Chrome:

Hello CSS</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1489290</commentid>
    <comment_count>3</comment_count>
    <who name="Emilio Cobos Álvarez (:emilio)">emilio</who>
    <bug_when>2018-12-19 06:36:12 -0800</bug_when>
    <thetext>I think this is a WebKit bug. Gecko is right on this one:

https://html.spec.whatwg.org/#the-innertext-idl-attribute says:

&gt; If node&apos;s used value of &apos;display&apos; is block-level or &apos;table-caption&apos;, then append 1 (a required line break count) at the beginning and end of items. [CSSDISPLAY]

In fact it&apos;s explicitly mentioned:

&gt; Floats and absolutely-positioned elements fall into this category.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1489292</commentid>
    <comment_count>4</comment_count>
    <who name="Emilio Cobos Álvarez (:emilio)">emilio</who>
    <bug_when>2018-12-19 06:42:56 -0800</bug_when>
    <thetext>I filed https://bugs.chromium.org/p/chromium/issues/detail?id=916540 for the relevant chromium issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1489295</commentid>
    <comment_count>5</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2018-12-19 06:55:33 -0800</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 192750 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>