Bug 110360 - [New Multicolumn] Column gap is computed incorrectly
Summary: [New Multicolumn] Column gap is computed incorrectly
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: 2013-02-20 11:29 PST by Dave Hyatt
Modified: 2013-02-20 12:01 PST (History)
4 users (show)

See Also:


Attachments
Patch (10.13 KB, patch)
2013-02-20 11:32 PST, Dave Hyatt
no flags Details | Formatted Diff | Diff
Patch (10.19 KB, patch)
2013-02-20 11:33 PST, 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 Dave Hyatt 2013-02-20 11:29:09 PST
We need to go to the parent block to get the column gap, since the RenderMultiColumnSet doesn't hold that value. :)
Comment 1 Dave Hyatt 2013-02-20 11:32:02 PST
Created attachment 189346 [details]
Patch
Comment 2 Dave Hyatt 2013-02-20 11:33:49 PST
Created attachment 189347 [details]
Patch
Comment 3 Simon Fraser (smfr) 2013-02-20 11:41:17 PST
Comment on attachment 189347 [details]
Patch

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

> Source/WebCore/rendering/RenderMultiColumnSet.cpp:105
> +        return parentBlock->style()->fontDescription().computedPixelSize(); // "1em" is recommended as the normal gap setting. Matches <p> margins.

The comment makes me think that computedPixelSize() returns a value equivalent to 1em, which is confusing.

> Source/WebCore/rendering/RenderMultiColumnSet.cpp:106
> +    return static_cast<int>(parentBlock->style()->columnGap());

I think this should use clampToInteger() like roundedIntPoint() etc do. Weird that it's a float.
Comment 4 Dave Hyatt 2013-02-20 11:42:50 PST
(In reply to comment #3)
> (From update of attachment 189347 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=189347&action=review
> 
> > Source/WebCore/rendering/RenderMultiColumnSet.cpp:105
> > +        return parentBlock->style()->fontDescription().computedPixelSize(); // "1em" is recommended as the normal gap setting. Matches <p> margins.
> 
> The comment makes me think that computedPixelSize() returns a value equivalent to 1em, which is confusing.
> 
> > Source/WebCore/rendering/RenderMultiColumnSet.cpp:106
> > +    return static_cast<int>(parentBlock->style()->columnGap());
> 
> I think this should use clampToInteger() like roundedIntPoint() etc do. Weird that it's a float.

Let me try just removing the cast completely. Technically now that subpixel layout is turned on, there is no reason to force the gap to be an integer any longer.
Comment 5 Dave Hyatt 2013-02-20 12:01:40 PST
Fixed in r143484.