Re: [RC6] absolute-replaced-height-022 : feedback welcomed

Le Lun 3 septembre 2012 23:12, "Gérard Talbot" a écrit :
> Arron,
>
> [RC6]
> http://test.csswg.org/suites/css2.1/20110323/html4/absolute-replaced-height-022.htm
>
> [nightly-unstable]
> http://test.csswg.org/suites/css2.1/nightly-unstable/html4/absolute-replaced-height-022.htm
>
> <meta name="assert" content="An absolutely positioned inline replaced
> element with only one value as 'auto' solves for that value
> (margin-bottom).">
>
>
> Firefox 15 (as reported by DOM inspector):
>   bottom computed value: -96px
>   margin-bottom computed value: 0px
>
> Chrome 21.0.1180.89 (as reported by Web inspector):
>   bottom computed value: 96px
>   margin-bottom computed value: -192px
> (this -192px margin-bottom is possibly what the test expected, was
> predicting)
>
> Opera 12.02 (as reported by DragonFly):
>   bottom computed value:  96px
>   margin-bottom computed value: 0px
>
> and all 3 browsers render the test identically.




> [RC6]
> http://test.csswg.org/suites/css2.1/20110323/html4/absolute-replaced-height-029.htm
>
> [nightly-unstable]
> http://test.csswg.org/suites/css2.1/nightly-unstable/html4/absolute-replaced-height-029.htm
>
>
> <meta name="assert" content="An absolutely positioned replaced element
> with over-constrained values solves for 'bottom'.">
>
>
> In this test, the containing block (which is div#div1) has no set height
> (or rather it is implicitly 'height: auto'). The computed height for
> div#div1 is 15px which is caused by the inner rel. pos. div.
>
> The test does not demonstrate the text assert. If given values
> overconstrain the equation, and therefore set bottom value has to be
> ignored and must be set a value that will balance the equation, then the
> test as designed does not demonstrate this, does not verify somehow or
> check or measure the computed bottom value.
>
> In the test, this is the equation with values:
>
>   0.5in : 'top'
> +
>   0.5in : 'margin-top'
> +
>   0     : 'border-top-width'
> +
>   0     : 'padding-top'
> +
>   15px  : 'height' (intrinsic height of inline replaced element)
> +
>   0     : 'padding-bottom'
> +
>   0     : 'border-bottom-width'
> +
>   0.5in : 'margin-bottom'
> +
>   0.5in : 'bottom'
> ===========
>   15px  : height of containing block
>
>
> 207px != 15px
>
> So, bottom has to be ignored and forced to have the value that will
> balance the equation. So, this brings up
>
>
>   0.5in : 'top'
> +
>   0.5in : 'margin-top'
> +
>   0     : 'border-top-width'
> +
>   0     : 'padding-top'
> +
>   15px  : 'height' (intrinsic height)
> +
>   0     : 'padding-bottom'
> +
>   0     : 'border-bottom-width'
> +
>   0.5in : 'margin-bottom'
> +
>  (solve): 'bottom'
> ===========
>   15px  : height of containing block
>
> So, the used bottom value must be -1.5in (or -144px).


Arron,


After a talk with fantasai, I am approving this 022 test and others
(029, 030, 031). As far as used height of replaced element and top
offset of replaced element matters (and in general correctness of
rendering), this test and others are correct.

The mentioned issue still remains. The only way to really verify,
control how margin-bottom (and/or bottom) are solved would be via
javascript:

document.defaultView.getComputedStyle(document.getElementsByTagName("img").item(0),
null).marginBottom

document.defaultView.getComputedStyle(document.getElementsByTagName("img").item(0),
null).bottom

How browsers actually untangle used values and computed values may not
be a pure CSS issue.

Gérard
-- 
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 Wednesday, 5 September 2012 21:24:53 UTC