Re: [css-writing-modes-3] 16 margin-collapsing tests submitted

Le 2015-02-25 09:29, 塩澤 元 a écrit :
> Gérard,
> 
> I have reviewed margin collapse tests.
> 
> - margin-collapse-vrl-022.xht and margin-collapse-vlr-023.xht
> "
> Test passes if the top square has a layout identical to one of the 
> squares
> below it.
> "
> I could not understand why the rendering result of this test-case is
> determined to the ONE result.
> Could you explain that?

Hajime,

There are some areas of CSS2.1 where the spec gives latitude ( 緯度 ), 
freedom to browsers. Those areas will use the following typical 
expressions: "not defined", "undefined", "may use", "free to use" or 
"free to make a guess". This is the case here.

When an abs. pos. element has 'left: auto' or 'top: auto', the spec 
says:

"
But rather than actually calculating the dimensions of that hypothetical 
box, user agents are free to make a guess at its probable position.
"
http://www.w3.org/TR/2011/REC-CSS2-20110607/visudet.html#abs-non-replaced-width

and

http://www.w3.org/TR/2011/REC-CSS2-20110607/visudet.html#abs-non-replaced-height

So:
(with vendor-prefixes)
http://www.gtalbot.org/BrowserBugsSection/CSS3WritingModes/s74-margin-collapse-022.xht

In the margin-collapse-vrl-022.xht test, div#abs-pos has 'right: auto'. 
So, you have to find the static position for div#abs-pos in order to 
determine its 'right: auto' position. The static position for 
div#abs-pos is the position div#abs-pos would have had if its 'position' 
had been static. Now, in 'position: static', div#abs-pos would have its 
right margin collapse with div#widthless-static's right margin ... or 
would it?

[Note: div#widthless-static is a collapsed-through element: its right 
margin (1em) and left margin (0em) are adjoining]

Browser manufacturers when they first implementing margin collapsing 
wondered what to do when trying to determine the 'top: auto' position 
(in a horizontal-tb writing-mode context). Some decided to not collapse 
the adjoining margin, others (Opera, Presto engine) decided to collapse 
the adjoining margin. With CSS2.1, it was too late to specify this area 
because some browser manufacturers had already implemented in their 
margin collapsing functions their interpretation of unspecified 
situations. So latitude and granting 2 possible interpretations of the 
spec were kept in the spec.

-------

In the margin-collapse-vrl-022 test, in the middle box scenario, the 
div#abs-pos margin-right is kept intact: the div#abs-pos margin-right 
does *not* collapse with the div#widthless-static margin-right. This is 
what Firefox38 and IE11 do.

In the margin-collapse-vrl-022 test, the bottom box scenario has 
div#abs-pos margin-right collapse with the div#widthless-static 
margin-right. You will easily notice this if you toggle on and off 
'position: absolute' with Web Inspect tool.

-------

This area is a difficult area to understand.

I've looked for ways to improve this margin-collapse-vrl-022 test and I 
do not see one.


> - margin-collapse-vrl-024.xht and margin-collapse-vlr-025.xht
> I could not understand what these test intent.
> It seems to me that there is no margin collapsing because two elements 
> of
> div.widthless have only left margin.

(with vendor-prefixes)
http://www.gtalbot.org/BrowserBugsSection/CSS3WritingModes/s74-margin-collapse-024.xht

There are 2 div.widthless and they both, each have a 2em left margin. 
The green horizontal gap in the background image is only 2em wide. So, 
there must be margin collapsing otherwise we would see red.

max(2em, 2em) == 2em
is not
2em + 2em == 4em

"If the top and bottom margins of a box are adjoining, then it is 
possible for margins to collapse through it."
http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#collapsed-through

This "collapse-through" definition applies to those 2 div.widthless.

This area of the spec is also a difficult area to understand.



> - filing bug
> I will file the bug in margin-collapse-vrl-022.xht and
> margin-collapse-vlr-023.xht.
> 
> Hajime.


2 scenarios it appears I did not do in the margin collapsing serie and 
must do:

right margin of a box and right margin of its first in-flow child 
collapse in a vertical-rl context

left margin of a last in-flow child and left margin of its parent if the 
parent has 'auto' computed height in a vertical-rl context

and then do the same 2 scenarios for vertical-lr context == 4 tests.

Gérard


> 2015-02-22 7:44 GMT+09:00 Gérard Talbot <css21testsuite@gtalbot.org>:
> 
>> Hello,
>> 
>> http://test.csswg.org/source/css-writing-modes-3/margin-
>> collapse-vrl-002.xht
>> 
>> http://test.csswg.org/source/css-writing-modes-3/margin-
>> collapse-vlr-003.xht
>> 
>> http://test.csswg.org/source/css-writing-modes-3/margin-
>> collapse-vrl-008.xht
>> 
>> http://test.csswg.org/source/css-writing-modes-3/margin-
>> collapse-vlr-009.xht
>> 
>> http://test.csswg.org/source/css-writing-modes-3/margin-
>> collapse-vrl-010.xht
>> 
>> http://test.csswg.org/source/css-writing-modes-3/margin-
>> collapse-vlr-011.xht
>> 
>> http://test.csswg.org/source/css-writing-modes-3/margin-
>> collapse-vrl-014.xht
>> 
>> http://test.csswg.org/source/css-writing-modes-3/margin-
>> collapse-vlr-015.xht
>> 
>> http://test.csswg.org/source/css-writing-modes-3/margin-
>> collapse-vrl-016.xht
>> 
>> http://test.csswg.org/source/css-writing-modes-3/margin-
>> collapse-vlr-017.xht
>> 
>> http://test.csswg.org/source/css-writing-modes-3/margin-
>> collapse-vrl-022.xht
>> 
>> http://test.csswg.org/source/css-writing-modes-3/margin-
>> collapse-vlr-023.xht
>> 
>> http://test.csswg.org/source/css-writing-modes-3/margin-
>> collapse-vrl-024.xht
>> 
>> http://test.csswg.org/source/css-writing-modes-3/margin-
>> collapse-vlr-025.xht
>> 
>> http://test.csswg.org/source/css-writing-modes-3/margin-
>> collapse-vrl-030.xht
>> 
>> http://test.csswg.org/source/css-writing-modes-3/margin-
>> collapse-vlr-031.xht
>> 
>> committed changeset 7034:775adbc04af3
>> http://hg.csswg.org/test/rev/775adbc04af3
>> 
>> ---------
>> 
>> Regarding margin-collapse-vrl-022 and margin-collapse-vlr-023:
>> 
>> Chrome 40.0.2214.115 fails these 2 tests. In margin-collapse-vlr-023, 
>> the
>> right-most blue stripe is 8px too far to the right.
>> 
>> Firefox 38.0a1 buildID=20150219021531 does not consistently render 
>> both
>> tests in the same manner. Firefox 38 establishes the left static 
>> position
>> of div#abs-pos *withOUT* "margin-collapsing" with div#widthless-static 
>> in
>> margin-collapse-vrl-022 and then it establishes the left static 
>> position of
>> div#abs-pos *with* "margin-collapsing" with div#widthless-static in
>> margin-collapse-vlr-023. Strictly speaking, this is not a bug but it
>> certainly is confusing, inconsistent and not desirable for web 
>> authors.
>> 
>> IE11 pass both tests and IE11's behavior is consistent and clear: IE11
>> establishes the left static position of div#abs-pos without
>> "margin-collapsing" with div#widthless-static in both tests.
>> 
>> ---------
>> 
>> Prince 9.0.5 passes all vertical-rl tests except 
>> margin-collapse-vrl-022.
>> 
>> 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
>> 
>> 
>> 

-- 
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 Wednesday, 25 February 2015 20:00:14 UTC