[Webkit-unassigned] [Bug 89572] New: Breaking LayoutUnits down to ints for baseline position and ascents needs rounding
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Jun 20 07:56:12 PDT 2012
https://bugs.webkit.org/show_bug.cgi?id=89572
Summary: Breaking LayoutUnits down to ints for baseline
position and ascents needs rounding
Product: WebKit
Version: 528+ (Nightly build)
Platform: Unspecified
OS/Version: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: Layout and Rendering
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: dominik.rottsches at intel.com
When activating sub-pixel layout on EFL, I found that in a lot of cases, there was a vertical offset of -1 from the baseline (I attached an example compositing_generated-content-wdiff.html). This results from a by-one-mismatch between the return value of RenderBlock::baselinePosition (which is assigned to maxAscent later), and fontMetrics.ascent(baselineType).
InlineFlowBox::placeBoxesInBlockDirection sets the logical top:
setLogicalTop(roundToInt(top + maxAscent - fontMetrics.ascent(baselineType)));
Here, maxAscent in this particular case is 14, while the ascent is 15 - shifting the logical top up to -1.
In my understanding, the reason is the default toInt() of LayoutUnit being called when the RenderBlock::baselinePosition() is assigned to ascent values in
RootInlineBox::ascentAndDescentForBox. If we consistently use rounding here, I can get the test failures on EFL down from initially around 3800 to 563. My understanding is still limited - but I guess that the proper fix would be to also transition all the ascent/descent/maxAscent/maxDescent calculations to LayoutUnits and round later? Is that something that you're planning to do, Levi & Emil?
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list