About floats-145

Quoting from <https://github.com/servo/servo/pull/10458>:

> I believe that |floats-145.htm| is a bad test for the following 
> reason. The test assumes that a border on the bottom of an inline 
> element is placed in the exact same Y position as a float with 
> ceiling below that inline. The border on the bottom of an inline box 
> is placed right below the content area of that box—in the case of 
> text, this is the baseline position + the font descent value. The 
> ceiling of a float below a block with auto height containing inlines 
> and no borders/padding/margins is equal to the top of that block plus
> the line height of the inline's line box. This inline has 
> |line-height| set to |normal|. Thus the test assumes that the 
> |normal| line height of the inline's line box is equal to the ascent 
> plus the descent of the font. However, there is no guarantee in the 
> spec that this is the case. 
> https://www.w3.org/TR/CSS22/visudet.html#propdef-line-height 
> specifies:
> 
> "|normal|: Tells user agents to set the used value to a "reasonable"
>  value based on the font of the element. The value has the same 
> meaning as |<number>|. We recommend a used value for 'normal'
> between 1.0 to 1.2. The computed value is 'normal'."
> 
> In Servo, in order to handle |normal| we ask the font for a 
> reasonable line height given its metrics. (See 
> |layout::text::line_height_from_style()|.) I believe that this yields
> different values on Linux and Mac, and as a result the test fails on
> Mac and passes on Linux. The spec seems to allow us to do this. Gecko
> is doing something similar, and as a result Gecko fails this test
> just as Servo does. Blink and WebKit seem to pass this test.

Gérard, I believe you wrote the reference for this test. Do you have
thoughts on the above?

Thanks
Ms2ger

Received on Friday, 15 April 2016 11:39:41 UTC