[Webkit-unassigned] [Bug 101848] REGRESSION (r133351): Layout issues at bugs.webkit.org, all standard buttons have incorrect text baseline

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Apr 11 09:32:41 PDT 2013


https://bugs.webkit.org/show_bug.cgi?id=101848





--- Comment #17 from Darin Adler <darin at apple.com>  2013-04-11 09:30:55 PST ---
I have an idea for a much simpler way to solve the immediate problem. We can still do what Hyatt suggests longer term to get all sorts of other cases right.

But I realize that the problem here comes from the fact that when we computed coordinates before, we always truncated, which meant rounding down the 0.5 case. Now we round 0.5 up to 1. But why is that important? I think we can change our rounding to round 0.5 down to 0 globally and get good results.

That would fix this problem right away.

Later we could get more sophisticated about rounding, and round up when we need to and down when we need to. But just changing the 0.5 rounding globally would fix this problem and likely cause no serious other problems. I think that’s an experiment we could do quickly that could save us a lot of time.

The function we would change is LayoutUnit::round and we’d change it to add kEffectiveFixedPointDenominator / 2 - 1 and subtract kEffectiveFixedPointDenominator / 2 rather than the other way around.

I think that this is the right thing to do to fix this bug and it will be a lot faster than rationalizing the rounding logic the way Hyatt proposes, which is still something we should do longer term.

Also, as a side note, we should be changing things so we round to pixel boundaries, not integer boundaries. No reason I can think of to round to multiples of 2 pixels on a 2X HiDPI display.

-- 
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