W3C home > Mailing lists > Public > public-css-testsuite@w3.org > April 2012

Re: [RC6] At least 12 background-position-* tests have fractional pixel issues

From: Gérard Talbot <css21testsuite@gtalbot.org>
Date: Wed, 25 Apr 2012 20:39:50 -0400
Message-ID: <8c92d6fd2ffecd2320fd44b1e2f43ae3.squirrel@ed-sh-cp3.entirelydigital.com>
To: "Arron Eicholz" <arron.eicholz@microsoft.com>
Cc: "Public CSS test suite mailing list" <public-css-testsuite@w3.org>

Le Lun 23 avril 2012 19:59, "Gérard Talbot" a écrit :
> Arron,
>
> [RC6]
> http://test.csswg.org/suites/css2.1/20110323/html4/background-position-019.htm
>
> [nightly-unstable]
> http://test.csswg.org/suites/css2.1/nightly-unstable/html4/background-position-019.htm
>
> [RC6]
> http://test.csswg.org/suites/css2.1/20110323/html4/background-position-020.htm
>
> [nightly-unstable]
> http://test.csswg.org/suites/css2.1/nightly-unstable/html4/background-position-020.htm
>
> [RC6]
> http://test.csswg.org/suites/css2.1/20110323/html4/background-position-031.htm
>
> [nightly-unstable]
> http://test.csswg.org/suites/css2.1/nightly-unstable/html4/background-position-031.htm
>
> [RC6]
> http://test.csswg.org/suites/css2.1/20110323/html4/background-position-032.htm
>
> [nightly-unstable]
> http://test.csswg.org/suites/css2.1/nightly-unstable/html4/background-position-032.htm
>
> [RC6]
> http://test.csswg.org/suites/css2.1/20110323/html4/background-position-043.htm
>
> [nightly-unstable]
> http://test.csswg.org/suites/css2.1/nightly-unstable/html4/background-position-043.htm
>
> [RC6]
> http://test.csswg.org/suites/css2.1/20110323/html4/background-position-044.htm
>
> [nightly-unstable]
> http://test.csswg.org/suites/css2.1/nightly-unstable/html4/background-position-044.htm
>
> [RC6]
> http://test.csswg.org/suites/css2.1/20110323/html4/background-position-055.htm
>
> [nightly-unstable]
> http://test.csswg.org/suites/css2.1/nightly-unstable/html4/background-position-055.htm
>
> [RC6]
> http://test.csswg.org/suites/css2.1/20110323/html4/background-position-056.htm
>
> [nightly-unstable]
> http://test.csswg.org/suites/css2.1/nightly-unstable/html4/background-position-056.htm
>
> [RC6]
> http://test.csswg.org/suites/css2.1/20110323/html4/background-position-067.htm
>
> [nightly-unstable]
> http://test.csswg.org/suites/css2.1/nightly-unstable/html4/background-position-067.htm
>
> [RC6]
> http://test.csswg.org/suites/css2.1/20110323/html4/background-position-068.htm
>
> [nightly-unstable]
> http://test.csswg.org/suites/css2.1/nightly-unstable/html4/background-position-068.htm
>
> [RC6]
> http://test.csswg.org/suites/css2.1/20110323/html4/background-position-103.htm
>
> [nightly-unstable]
> http://test.csswg.org/suites/css2.1/nightly-unstable/html4/background-position-103.htm
>
> [RC6]
> http://test.csswg.org/suites/css2.1/20110323/html4/background-position-104.htm
>
> [nightly-unstable]
> http://test.csswg.org/suites/css2.1/nightly-unstable/html4/background-position-104.htm
>
> and possibly a few others.


These 4 following other tests are also affected of
- background-image is 15px tall causing the positioning of its vertical
middle point not reliable, not accurate
- having 2 divs when the test only requires 1 div


[RC6]
http://test.csswg.org/suites/css2.1/20110323/html4/background-position-079.htm

[nightly-unstable]
http://test.csswg.org/suites/css2.1/nightly-unstable/html4/background-position-079.htm

[RC6]
http://test.csswg.org/suites/css2.1/20110323/html4/background-position-080.htm

[nightly-unstable]
http://test.csswg.org/suites/css2.1/nightly-unstable/html4/background-position-080.htm

[RC6]
http://test.csswg.org/suites/css2.1/20110323/html4/background-position-091.htm

[nightly-unstable]
http://test.csswg.org/suites/css2.1/nightly-unstable/html4/background-position-091.htm

[RC6]
http://test.csswg.org/suites/css2.1/20110323/html4/background-position-092.htm

[nightly-unstable]
http://test.csswg.org/suites/css2.1/nightly-unstable/html4/background-position-092.htm


Gérard




>
>
> There are 2 problems with e.g.
> http://test.csswg.org/suites/css2.1/20110323/html4/background-position-067.htm
>
> 1st problem
> -----------
>
> line 18 width: 1.16in;
>
> 96px mult by 1.16  ==  111.36px
>
> Since the width should be 96px plus width of "support/black15x15.png",
> then it was more precise to use 111px instead of 1.16in
>
> 2nd problem
> -----------
> This one is more coriaceous.
>
> line 23 background-position: 1in;
>
> "
> If only one value is specified, the second value is assumed to be
> 'center'. If at least one value is not a keyword, then the first value
> represents the horizontal position and the second represents the
> vertical position.
> (...)
> center
>     Equivalent to '50%' for the horizontal position if it is not
> otherwise given, or '50%' for the vertical position if it is.
> "
>
> So,
>
> background-position: 1in;
>
> is eventually parsed as
>
> background-position: 1in 50%;
>
> and percentage is rendered according to the following logic:
> "
> With a value pair of '14% 84%', the point 14% across and 84% down the
> image is to be placed at the point 14% across and 84% down the padding
> box.
> "
>
> So, the vertical middle point of support/black15x15.png image should be
> positioned at the vertical middle point of the padding box of its
> element.
> 15px must be divided by 2 to get such vertical middle point and then
> position the image at pixel 48 of padding box. So, there we have a
> fractional pixel issue and it could be at pixel 7 (rounded down) or
> pixel 8 (rounded up) of the black15x15.png.
>
>
> format issue
> ------------
>
> There is a format/code issue with all these tests: they all position a
> background-image inside one single element. There is no need at all for
> these tests to be using 2 divs.
>
> How to correct these tests? Obviously, the image dimensions should
> have/use even numbers. And then all the tests divs' widths should be
> recalculated. Since these 12 tests use the same design logic and code,
> then the same fix could be done to all tests.
>
>
> Proposed replacement (eg. for background-position-019.xht) which fixes
> all 3 issues
> --------------------
>
> http://www.gtalbot.org/BrowserBugsSection/css21testsuite/background-position-019-GT.xht

-- 
Contributions to the CSS 2.1 test suite:
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/

CSS 2.1 Test suite RC6, March 23rd 2011:
http://test.csswg.org/suites/css2.1/20110323/html4/toc.html

CSS 2.1 test suite harness:
http://test.csswg.org/harness/

Contributing to to CSS 2.1 test suite:
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/web-authors-contributions-css21-testsuite.html
Received on Thursday, 26 April 2012 00:40:24 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 April 2012 00:40:34 GMT