[Webkit-unassigned] [Bug 78713] Absolute positioned elements with Inline Relative Positioned Container are not layout correctly

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Feb 21 19:42:11 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=78713





--- Comment #11 from Julien Chaffraix <jchaffraix at webkit.org>  2012-02-21 19:42:11 PST ---
(From update of attachment 127186)
View in context: https://bugs.webkit.org/attachment.cgi?id=127186&action=review

>> Source/WebCore/ChangeLog:12
>> +        change markContainingBlocksForLayout() to match the change in containingBlock().
> 
> Your analysis is good but the conclusion is wrong. container() and containingBlock() should return the same result and here they don't.

Correcting myself: the conclusion is right. Sharing more code between the 2 functions is a separate issue even if it feels like markContainingBlocksForLayout() is embedding a safer alternative to containingBlock() build on top of container().

> Source/WebCore/rendering/RenderObject.cpp:630
>              bool willSkipRelativelyPositionedInlines = !object->isRenderBlock();

There is an issue here: |willSkipRelativelyPositionedInlines| will not be set if object->isAnonymousBlock() is true. This means that you would not update |container| below and actually still mark some of the anonymous blocks as needing layout.

It looks like this line should be:

bool willSkipRenderObjects = !object->isRenderBlock() || object->isAnonymousBlock();

> Source/WebCore/rendering/RenderObject.cpp:634
> +            while (object && (!object->isRenderBlock() || object->isAnonymousBlock()))
>                  object = object->container();

Noteworthy: this is not strictly equivalent to what containingBlock() is doing after r104183 (for example, we don't check if |object| is relatively positioned in the loop even if we mention it in the comment above). I wonder if that will bite us down the road.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list