Bug 57981 - Update the CSS3 column width and count algorithm to match the spec.
Summary: Update the CSS3 column width and count algorithm to match the spec.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Dave Hyatt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-06 14:07 PDT by Dave Hyatt
Modified: 2011-04-06 14:26 PDT (History)
2 users (show)

See Also:


Attachments
Patch (3.28 KB, patch)
2011-04-06 14:09 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 Dave Hyatt 2011-04-06 14:07:44 PDT
Update the CSS3 column width and count algorithm to match the spec.   I honestly have no idea what the differences are.  None of our tests change results.  I just want the code to match the pseudo-algorithm in the latest draft.
Comment 1 Dave Hyatt 2011-04-06 14:09:15 PDT
Created attachment 88508 [details]
Patch
Comment 2 Simon Fraser (smfr) 2011-04-06 14:13:20 PDT
Comment on attachment 88508 [details]
Patch

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

> Source/WebCore/rendering/RenderBlock.cpp:4215
> +        desiredColumnCount = max(1, (int)((float)(availWidth + colGap) / (colWidth + colGap)));

To avoid the (int) cast you could use max<int>().

> Source/WebCore/rendering/RenderBlock.cpp:4218
> +        desiredColumnCount = min(colCount, (int)((float)(availWidth + colGap) / (colWidth + colGap)));

Ditto
Comment 3 Dave Hyatt 2011-04-06 14:23:06 PDT
Fixed in r83099.
Comment 4 WebKit Review Bot 2011-04-06 14:26:08 PDT
Attachment 88508 [details] did not build on chromium:
Build output: http://queues.webkit.org/results/8348315