W3C home > Mailing lists > Public > public-css-testsuite@w3.org > September 2006

bug in t100801-c544-valgn-01-d-ag

From: Peter Sorotokin <psorotok@adobe.com>
Date: Thu, 21 Sep 2006 18:35:08 -0700
Message-ID: <40CE68F1F8CAFB48B998C328517EA92AFCAF41@namail2.corp.adobe.com>
To: <public-css-testsuite@w3.org>
I am looking at this test file:

 

http://www.w3.org/Style/CSS/Test/CSS2.1/current/t100801-c544-valgn-01-d-
ag.xht

 

Here is the bitmap that is used for the background image

 

http://www.w3.org/Style/CSS/Test/CSS2.1/current/support/css1test544b.png

 

It has a problem in the third row: the edge of the small square in 10
pixels below the edge of the rectangle. My calculation gives different
result:

 

Big square will be covered by the image which determines the line height
in this case. It is 30 pixels high. The middle of the image must be
aligned with the "baseline of the parent box plus half the x-height of
the parent". Midpoint is 15 pixels below the top of the image. In this
case Ahem font is used which has x-height of 0.8 of the font size. Font
size is 15 pixels, so x-height is 12, and half of x-height is 6.
Therefore the baseline should be 15 + 6 = 21 pixels below image's top
edge. The ascent for Ahem is also 0.8 of the font size = 12 pixels, so
the top edge of the Ahem character should be 21 - 12 = 9 pixels below
the top edge of the image.

 

The fixed image can be found at:

 

http://www.sorotokin.com/test/css21/support/css1test544b.png

 

and the test with the new image can be viewed at

 

http://sorotokin.com/test/css21/t100801-c544-valgn-01-d-ag.xht

 

The fixed test passes on Firefox (original, buggy one, did not).

 

Can this be fixed on the official site?

 

Thanks!

 

Peter 
Received on Friday, 22 September 2006 01:36:02 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 20 September 2010 17:51:54 GMT