Bug 97497

Summary: [chromium] REGRESSION: Incorrect preferred width calculation for table cells
Product: WebKit Reporter: Emil A Eklund <eae>
Component: Layout and RenderingAssignee: Emil A Eklund <eae>
Status: RESOLVED FIXED    
Severity: Normal CC: eric, jchaffraix, leviw
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

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>