Bug 45957 - Pixel test fast/multicol/column-rules-stacking.html regression
Summary: Pixel test fast/multicol/column-rules-stacking.html regression
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Dave Hyatt
URL:
Keywords:
Depends on: 38402
Blocks:
  Show dependency treegraph
 
Reported: 2010-09-17 04:04 PDT by Satish Sampath
Modified: 2010-09-22 12:35 PDT (History)
4 users (show)

See Also:


Attachments
Patch (235.54 KB, patch)
2010-09-22 11:58 PDT, Dave Hyatt
simon.fraser: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Satish Sampath 2010-09-17 04:04:11 PDT
The patch submitted as part of https://bugs.webkit.org/show_bug.cgi?id=38402 has an incorrect pixel test baseline for fast/multicol/column-rules-stacking.html. The image has text above which says "You should see no red below" but the image below shows red.
Comment 1 Jeremy Orlow 2010-09-17 04:13:31 PDT
Normally I'd think reverting the patch would be the best course of action, but given the size of this patch and the nature of Dave's work, I suggested to Satish we go this route instead.  Dave, can you please suggest a course of action?
Comment 2 Satish Sampath 2010-09-17 04:17:46 PDT
To add more info on the baseline:
http://trac.webkit.org/log/trunk/LayoutTests/platform/mac/fast/multicol/column-rules-stacking-expected.png shows the mac baseline image before and after this change. The original baseline image (r41153) looks as expected with no red bars, whereas the new baseline image (r67660) has the red bars and contradicts the text instructions at the top of the image.
Comment 3 Satish Sampath 2010-09-17 04:48:11 PDT
I tested with a latest build of Webkit with Safari on mac and I see this layout test html is indeed displaying red columns. Looks like the "negative z-index child" part being tested here is broken.
Comment 4 Jeremy Orlow 2010-09-20 07:12:04 PDT
Dave, any word?  If not, I guess we should probably just revert this?
Comment 5 Dave Hyatt 2010-09-22 11:16:34 PDT
I just found out about this bug.  Next time, send me an email. I'm cc'd on every single Bugzilla bug, so I didn't even know this had been filed.

I'll look into it now.
Comment 6 Jeremy Orlow 2010-09-22 11:25:36 PDT
(In reply to comment #5)
> I just found out about this bug.  Next time, send me an email. I'm cc'd on every single Bugzilla bug, so I didn't even know this had been filed.
> 
> I'll look into it now.

Sorry about that Dave.  Will keep it in mind from now on!
Comment 7 Dave Hyatt 2010-09-22 11:58:27 PDT
Created attachment 68409 [details]
Patch
Comment 8 Simon Fraser (smfr) 2010-09-22 12:10:22 PDT
Comment on attachment 68409 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=68409&action=review

Which return clause in checkContainingBlockChainForPagination() does this layout test exercise? If necessary, we should have tests for both.

> WebCore/rendering/RenderLayer.cpp:471
> +static bool checkContainingBlockChainForPagination(RenderBoxModelObject* renderer, RenderBox* columnsRenderer)

It's hard to wrap my brain around which of these is a descendant of the other. A comment would help.

> WebCore/rendering/RenderLayer.cpp:486
> +    // If the previous block is absolutely positioned, then we can't be paginated by the columns block.
> +    if (prevBlock->isPositioned())

Just absolutely positioned, or relatively positioned too?
Comment 9 Dave Hyatt 2010-09-22 12:20:12 PDT
(In reply to comment #8)
> (From update of attachment 68409 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=68409&action=review
> 
> Which return clause in checkContainingBlockChainForPagination() does this layout test exercise? If necessary, we should have tests for both.
> 

fast/multicol/positioned-split.html exercises the other clause.

Basically the original code worked with column-rules-stacking.html but not with positioned-split.html.

When I landed the new pagination model I made positioned-split.html work but broke column-rules-stacking.html.

This new code makes both work.

> > WebCore/rendering/RenderLayer.cpp:471
> > +static bool checkContainingBlockChainForPagination(RenderBoxModelObject* renderer, RenderBox* columnsRenderer)
> 
> It's hard to wrap my brain around which of these is a descendant of the other. A comment would help.
>

I'll rename columnsRenderer to ancestorColumnsRenderer.
 
> > WebCore/rendering/RenderLayer.cpp:486
> > +    // If the previous block is absolutely positioned, then we can't be paginated by the columns block.
> > +    if (prevBlock->isPositioned())
> 
> Just absolutely positioned, or relatively positioned too?

This is an excellent question.  My own take on relative positioning is that it is in the flow of the columns and therefore it should be paginated by them.   This is the sensible behavior in my opinion.

Firefox disagrees with me though and refuses to paginate relative positioned objects.  Instead it just applies the offset to all the column boxes and pushes them out of the columns container.  It looks awful.

I don't know if Firefox's behavior is intentional given that they can't paginate many kinds of objects in columns (tables, floats, etc.).

I need to raise this with the CSS WG.
Comment 10 Dave Hyatt 2010-09-22 12:35:33 PDT
Fixed in r68069.