Bug 81366 - Add a RenderMultiColumnBlock subclass for multi-column layout.
Summary: Add a RenderMultiColumnBlock subclass for multi-column layout.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Dave Hyatt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-16 10:27 PDT by Dave Hyatt
Modified: 2012-03-16 12:55 PDT (History)
2 users (show)

See Also:


Attachments
Patch (23.72 KB, patch)
2012-03-16 10:31 PDT, Dave Hyatt
mitz: review+
Details | Formatted Diff | Diff
New patch just to test EWS (23.86 KB, patch)
2012-03-16 12:31 PDT, Dave Hyatt
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Hyatt 2012-03-16 10:27:44 PDT
Add RenderMultiColumnBlock to handle layout of multi-column blocks. This will allow most of the multi-column code that is polluting RenderBlock to be implemented in the subclass instead.
Comment 1 Dave Hyatt 2012-03-16 10:31:04 PDT
Created attachment 132313 [details]
Patch
Comment 2 mitz 2012-03-16 10:37:48 PDT
Comment on attachment 132313 [details]
Patch

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

> Source/WebCore/rendering/RenderMultiColumnBlock.cpp:43
> +    if (isAnonymousBlock())
> +        return "RenderMultiColumnBlock (anonymous)";

Just curious, can this case ever happen?
Comment 3 Peter Beverloo 2012-03-16 10:42:17 PDT
Comment on attachment 132313 [details]
Patch

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

> Source/WebCore/rendering/RenderMultiColumnBlock.cpp:44
> +    else if (isAnonymous())

drive-by nit: s/else if/if/ for consistency, considering that we know that isAnonymousBlock() and other previous checks are false.
Comment 4 Dave Hyatt 2012-03-16 11:41:18 PDT
(In reply to comment #3)
> (From update of attachment 132313 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=132313&action=review
> 
> > Source/WebCore/rendering/RenderMultiColumnBlock.cpp:44
> > +    else if (isAnonymous())
> 
> drive-by nit: s/else if/if/ for consistency, considering that we know that isAnonymousBlock() and other previous checks are false.

Yup, sure. This was cut-and-paste from RenderBlock, which has the same issue.
Comment 5 Dave Hyatt 2012-03-16 11:42:33 PDT
(In reply to comment #2)
> (From update of attachment 132313 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=132313&action=review
> 
> > Source/WebCore/rendering/RenderMultiColumnBlock.cpp:43
> > +    if (isAnonymousBlock())
> > +        return "RenderMultiColumnBlock (anonymous)";
> 
> Just curious, can this case ever happen?

Theoretically it will be possible to create anonymous multi-column layouts using CSS Page Templates, so I figured I might as well leave it in.
Comment 6 Dave Hyatt 2012-03-16 12:31:19 PDT
Created attachment 132347 [details]
New patch just to test EWS
Comment 7 WebKit Review Bot 2012-03-16 12:33:23 PDT
Attachment 132347 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/CMakeLists.txt', u'Source/W..." exit_code: 1
Source/WebCore/rendering/RenderMultiColumnBlock.h:35:  This { should be at the end of the previous line  [whitespace/braces] [4]
Total errors found: 1 in 16 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 8 Dave Hyatt 2012-03-16 12:55:59 PDT
Fixed in r111048. Will watch bots.