WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 102374
104573
[EFL][WK2] Layers are shifted vertically by 1-2 pixels in compositing/geometry tests.
https://bugs.webkit.org/show_bug.cgi?id=104573
Summary
[EFL][WK2] Layers are shifted vertically by 1-2 pixels in compositing/geometr...
Viatcheslav Ostapenko
Reported
2012-12-10 10:40:42 PST
This bug is to keep track and summarize my findings about compositing/geometry tests on EFL port. Currently it doesn'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->size->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't help.
Attachments
Add attachment
proposed patch, testcase, etc.
Viatcheslav Ostapenko
Comment 1
2012-12-10 14:32:56 PST
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's layout system. Workaround this - // while we figure out what's going on. - float lineSpacing = font_extents.height; - if (lineSpacing < font_extents.ascent + font_extents.descent) - lineSpacing = font_extents.ascent + font_extents.descent; It seems this exactly what happens here. Shouldn't we check that lineGap (in new code) is non-negative?
Viatcheslav Ostapenko
Comment 2
2012-12-30 22:26:36 PST
*** This bug has been marked as a duplicate of
bug 102374
***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug