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

Re: About floats-145

From: Gérard Talbot <css21testsuite@gtalbot.org>
Date: Tue, 19 Apr 2016 19:21:21 -0400
To: Ms2ger <ms2ger@gmail.com>
Cc: Public CSS test suite mailing list <public-css-testsuite@w3.org>
Message-ID: <1158a7eea173a2e77a0c2e571713abc4@gtalbot.org>
Le 2016-04-15 07:39, Ms2ger a écrit :

Ms2ger, Patrick,

Sorry for the long delay. I have been very busy lately.

[src, test]
http://test.csswg.org/source/css21/floats-clear/floats-145.xht

[src, reference file]
http://test.csswg.org/source/css21/floats-clear/floats-145-ref.xht

[RC6, test]
http://test.csswg.org/suites/css2.1/nightly-unstable/html4/floats-145.htm

[RC6, reference file]
http://test.csswg.org/suites/css2.1/nightly-unstable/html4/floats-145-ref.htm


> Quoting from <https://github.com/servo/servo/pull/10458>:
> 
>> I believe that |floats-145.htm| is a bad test


Right now, I think floats-145.htm test is imprecise. Whenever 
'line-height' is set to or defaults to 'normal', then such test is not 
strict and can be imprecise.

It is not perfectly clear in my mind what exactly the test was 
originally trying to test... just the rendering of a margin bottom of a 
float?

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

I will carefully check again the spec and a bunch of other tests I have. 
The reference file I created may not have been precise or careful to 
begin with.

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

Agreed. Baseline position and font descent distance are not predictable. 
Best would be to use Ahem font here.


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

I assume that
ceiling == outer top edge
and
is equal to == is flush with

and then I need to re-read the spec and all this again...


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

Very possible. When I made that reference file, I was using Linux and I 
did not have a Mac.

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


Patrick, Ms2ger I am ready to replace the test and the reference file 
with the following:

http://www.gtalbot.org/BrowserBugsSection/css21testsuite/floats-145-GT-draft2.xhtml

http://www.gtalbot.org/BrowserBugsSection/css21testsuite/floats-145-GT-draft2-ref.xhtml


Gérard
-- 
Test Format Guidelines
http://testthewebforward.org/docs/test-format-guidelines.html

Test Style Guidelines
http://testthewebforward.org/docs/test-style-guidelines.html

Test Templates
http://testthewebforward.org/docs/test-templates.html

CSS Naming Guidelines
http://testthewebforward.org/docs/css-naming.html

Test Review Checklist
http://testthewebforward.org/docs/review-checklist.html

CSS Metadata
http://testthewebforward.org/docs/css-metadata.html
Received on Tuesday, 19 April 2016 23:21:54 UTC

This archive was generated by hypermail 2.4.0 : Friday, 20 January 2023 19:58:21 UTC