Re: block-in-inline-relpos-002 invalid

On 01/27/2011 01:59 PM, L. David Baron wrote:
>
> In any case, I adjusted the test so that I believe it is correct;
> patch to the test is attached.  The basic idea of the changes is
> that the spec says that floats are positioned relative to their
> containing block.  Therefore, they are moved by relative positioning
> of an inline only when there is a block inside that inline that is
> the containing block for the float, and is moved since 9.2.1.1 says:
>    # When such an inline box is affected by relative positioning, the
>    # relative positioning also affects the block-level box contained
>    # in the inline box.
>
> The test had previously been testing that floats contained within
> a relatively positioned inline *without* a block intervening were
> affected by relative positioning, which is incorrect.  Therefore, I
> adjusted the test to:
>   * assume that the .float.L and .float.R are not affected by
>     relative positioning (by swapping their colors and no longer
>     relative positioning .float.R)
>   * add a float inside the nested block that is affected by relative
>     positioning
>
> This leads to the test passing in Gecko (Firefox 4 beta).  It still
> does not pass in WebKit or Opera, because they do not appear to
> implement the part of 9.2.1.1 quoted above.  Maybe it passes in IE9?
>
>
> fantasai, could you review the attached diff?

If floats inside inlines are indeed not affected by relative positioning
the inline, then your patch is correct. I would also update the assert
to say "the block" instead of "it".

~fantasai

Received on Wednesday, 2 February 2011 09:35:36 UTC