<?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>104573</bug_id>
          
          <creation_ts>2012-12-10 10:40:42 -0800</creation_ts>
          <short_desc>[EFL][WK2] Layers are shifted vertically by 1-2 pixels in compositing/geometry tests.</short_desc>
          <delta_ts>2012-12-30 22:26:36 -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>Layout and Rendering</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>102374</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="Viatcheslav Ostapenko">ostap73</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>cdumez</cc>
    
    <cc>d-r</cc>
    
    <cc>laszlo.gombos</cc>
    
    <cc>pnormand</cc>
    
    <cc>zimmermann</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>787515</commentid>
    <comment_count>0</comment_count>
    <who name="Viatcheslav Ostapenko">ostap73</who>
    <bug_when>2012-12-10 10:40:42 -0800</bug_when>
    <thetext>This bug is to keep track and summarize my findings about compositing/geometry tests on EFL port.
Currently it doesn&apos;t apply to EFL/wk1 because accelerated compositing is disabled.
Probably GTK port has the same problem, but they do not support AC now.

The easiest way problem reproduced on compositing/geometry/composited-in-columns.html tests. Other geometry tests also may fail or flaky.

Problem appears when RenderBoxes are positioned during layout. Layout is based on line height + line gap. For SimpleFontDataFreeType line hight is calculated like ascender + descender (FontMetrics.h) . Line gap is calculated like font_extents.height - font_extents.ascent - font_extents.descent (SimpleFontData::platformInit()).
When I run this test font_extents.height is less than font_extents.ascent + font_extents.descent and line gap becomes negative (-1) and this affects page layout.
font_extents are received from cairo_scaled_font_extents call and internally cairo gets it from freetype font library.
Freetype loads LiberationSerif-Regular.ttf font and it seems if this font is loaded 1st it gets wrong metric in face-&gt;size-&gt;metrics . 
I tried loading this test into Minibrowser. In this case font is loaded with correct metrics and page layouts correctly.
The problem looks very similar to this bug in freetype library: http://savannah.nongnu.org/bugs/?34156
EFL currently uses 2.4.2. I tried upgrading to 2.4.10 and it didn&apos;t help.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>787721</commentid>
    <comment_count>1</comment_count>
    <who name="Viatcheslav Ostapenko">ostap73</who>
    <bug_when>2012-12-10 14:32:56 -0800</bug_when>
    <thetext>r101343 removed this code with comment:

-    // There seems to be some rounding error in cairo (or in how we
-    // use cairo) with some fonts, like DejaVu Sans Mono, which makes
-    // cairo report a height smaller than ascent + descent, which is
-    // wrong and confuses WebCore&apos;s layout system. Workaround this
-    // while we figure out what&apos;s going on.
-    float lineSpacing = font_extents.height;
-    if (lineSpacing &lt; font_extents.ascent + font_extents.descent)
-        lineSpacing = font_extents.ascent + font_extents.descent;

It seems this exactly what happens here. Shouldn&apos;t we check that lineGap (in new code) is non-negative?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>798294</commentid>
    <comment_count>2</comment_count>
    <who name="Viatcheslav Ostapenko">ostap73</who>
    <bug_when>2012-12-30 22:26:36 -0800</bug_when>
    <thetext>

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

    </bug>

</bugzilla>