[Webkit-unassigned] [Bug 14956] 1 pixel background-image shift

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Oct 16 19:54:56 PDT 2009


Dominic Cooney <dominicc at google.com> changed:

           What    |Removed                     |Added
                 CC|                            |dominicc at google.com

--- Comment #9 from Dominic Cooney <dominicc at google.com>  2009-10-16 19:54:56 PDT ---
Centered backgrounds and centered content are out of alignment because
background position is calculated with floating-point arithmetic and content
alignment is calculated with integer arithmetic (division truncates).

This bug could be fixed by making background positions also truncate, but that
would break sites that work around this bug by aligning their backgrounds at
49.99etc.%. It would also mean taking % computations for content and making
them truncate too (otherwise backgrounds at n% and content at n% will shimmer.)

Because a lot of tests gratuitously use centered content to look purty,
changing how content is aligned requires rebaselining lots of tests.

Firefox 3.5.4 doesn't truncate when it computes centered content position. For
example, 500px content in a 1375px container is at offsetLeft 438 and a
centered 500px background image is also at 438; Safari would truncate 437.5 and
put the image at offsetLeft 437, but round up and put the background image at

I'm not sure if IE always truncates or rounds. But it does it consistently and
doesn't exhibit this bug.

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