Bug 16790 - Problem with Auto Table Layout Algorithm
Summary: Problem with Auto Table Layout Algorithm
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tables (show other bugs)
Version: 523.x (Safari 3)
Hardware: PC Windows XP
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-08 19:30 PST by Yuzhu Shen
Modified: 2022-07-12 20:33 PDT (History)
6 users (show)

See Also:


Attachments
An example for the problem. (783 bytes, text/html)
2008-01-08 19:31 PST, Yuzhu Shen
no flags Details
Safari 15.5 differs from other browsers (388.60 KB, image/png)
2022-07-12 11:50 PDT, Ahmad Saleem
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yuzhu Shen 2008-01-08 19:30:26 PST
In Webkit, if a table contains a cell with "colspan" attribute, automatic table layout algorithm needs to transfer its minimal width constraint to all the columns it spans. The algorithm contains a step to distribute the minimal width constraint to columns in proportion to their maximum width effMaxWidth (in AutoTableLayout.cpp: AutoTableLayout::calcEffectiveWidth()). For those columns that have a pecentage width, this width doesn't affect the effMaxWidth and isn't considered in this minimal width distribution process. This may affect the final table layout.

IE and Firefox both work fine in this scenario. Please refer to the attachment for an illustration.

However, since "UAs are not required to implement this algorithm to determine the table layout in the case that ¡¯table-layout¡¯ is ¡¯auto¡¯; they can use any other algorithm even if it results in different behavior."(CSS2 17.5.2.2). I am not sure whether we should modify the algorithm.
Comment 1 Yuzhu Shen 2008-01-08 19:31:07 PST
Created attachment 18340 [details]
An example for the problem.
Comment 2 Eric Seidel (no email) 2008-01-10 11:17:01 PST
The test case is pretty clear if you open it up in Firefox as well.
Comment 3 Eric Seidel (no email) 2008-01-10 11:19:07 PST
Given that we differ from IE and FF in this test, I would suggest we change our behavior.  Especially if this can actually be found on live sites.
Comment 4 Ahmad Saleem 2022-07-12 11:50:56 PDT
Created attachment 460814 [details]
Safari 15.5 differs from other browsers

I am able to reproduce the bug in Safari 15.5 on macOS 12.4 as can be seen from attached screenshot. Second line of table layout is not same as other browsers compared to Safari.

If I am testing incorrectly, please retest accordingly. Thanks!