Bug 97497 - [chromium] REGRESSION: Incorrect preferred width calculation for table cells
Summary: [chromium] REGRESSION: Incorrect preferred width calculation for table cells
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: Emil A Eklund
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-24 16:47 PDT by Emil A Eklund
Modified: 2012-09-25 11:19 PDT (History)
3 users (show)

See Also:


Attachments
Patch (127.04 KB, patch)
2012-09-24 17:06 PDT, Emil A Eklund
no flags Details | Formatted Diff | Diff
Patch (128.12 KB, patch)
2012-09-24 19:26 PDT, Emil A Eklund
no flags Details | Formatted Diff | Diff
Patch (128.43 KB, patch)
2012-09-25 09:17 PDT, Emil A Eklund
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Emil A Eklund 2012-09-24 16:47:15 PDT
In fixing bug 93911 r125694 caused a problem with the preferred width calculations for table cells with a fractional padding where the logic to ensure that the cell is wide enough for the content returns different results for cells with a fixed width and cells with an automatic width.
Comment 1 Emil A Eklund 2012-09-24 17:06:45 PDT
Created attachment 165471 [details]
Patch
Comment 2 Emil A Eklund 2012-09-24 17:07:39 PDT
Downstream chromium bug: http://code.google.com/p/chromium/issues/detail?id=147496
Comment 3 Levi Weintraub 2012-09-24 17:19:04 PDT
Comment on attachment 165471 [details]
Patch

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

This LGTM other than coverage for Fixed tables. I'd feel better if Julien can give it a look as well before we land.

> Source/WebCore/ChangeLog:12
> +        In fixing bug 93911 r125694 caused a problem with the preferred
> +        width calculations for table cells with a fractional padding
> +        where the logic to ensure that the cell is wide enough for the
> +        content returns different results for cells with a fixed width
> +        and cells with an automatic width.

This change will also affect FixedTableLayout when we specify a fractional width, as it will be ceiled. Probably worth mentioning in the ChangeLog, and it wouldn't be a bad idea to have a specific test for that just so we note the behavior and track if it changes.
Comment 4 Julien Chaffraix 2012-09-24 17:59:44 PDT
Comment on attachment 165471 [details]
Patch

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

This change is fine. I would r+ if we had the proper fixed table layout testing.

>> Source/WebCore/ChangeLog:12
>> +        and cells with an automatic width.
> 
> This change will also affect FixedTableLayout when we specify a fractional width, as it will be ceiled. Probably worth mentioning in the ChangeLog, and it wouldn't be a bad idea to have a specific test for that just so we note the behavior and track if it changes.

Spot on, this should prevent a similar issue with fixed table layout so it should be tested.
Comment 5 Emil A Eklund 2012-09-24 19:08:28 PDT
Cool, I'll add a test for fixed layout and re-upload.
Thanks for the quick review!
Comment 6 Emil A Eklund 2012-09-24 19:26:24 PDT
Created attachment 165500 [details]
Patch
Comment 7 Build Bot 2012-09-24 20:51:57 PDT
Comment on attachment 165500 [details]
Patch

Attachment 165500 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/13992858

New failing tests:
fast/sub-pixel/table-cells-have-stable-width.html
Comment 8 Emil A Eklund 2012-09-25 09:17:44 PDT
Created attachment 165625 [details]
Patch
Comment 9 Levi Weintraub 2012-09-25 10:03:14 PDT
Comment on attachment 165625 [details]
Patch

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

Fix that changelog and we're good to go :)

> Source/WebCore/ChangeLog:14
> +        This also affects

Trailed off there ;)
Comment 10 Emil A Eklund 2012-09-25 10:08:15 PDT
(In reply to comment #9)
> (From update of attachment 165625 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=165625&action=review
> 
> Fix that changelog and we're good to go :)
> 
> > Source/WebCore/ChangeLog:14
> > +        This also affects
> 
> Trailed off there ;)

Good catch, thanks!
Comment 11 Emil A Eklund 2012-09-25 11:19:23 PDT
Committed r129529: <http://trac.webkit.org/changeset/129529>