WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
106603
Setting a width on a table element overrides intrinsic min-width/max-width values
https://bugs.webkit.org/show_bug.cgi?id=106603
Summary
Setting a width on a table element overrides intrinsic min-width/max-width va...
Ojan Vafai
Reported
2013-01-10 14:22:17 PST
Setting a width on a block overrides intrinsic min-width/max-width values
Attachments
To check if max-width overrides width
(754 bytes, text/html)
2013-09-03 04:45 PDT
,
gur.trio
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
gur.trio
Comment 1
2013-09-03 04:43:07 PDT
(In reply to
comment #0
)
> Setting a width on a block overrides intrinsic min-width/max-width values
Hi Ojan I am trying to understand the bug and for that I have attached a test case for DIV and TABLE along with WIDTH and MAX-WIDTH. Once you run the test case you will see that the alert will show the width of div and table. So for div width is set to 500px and max-width to 200 px and it takes 200px and so max-width doesn't override width. But for table width is 500px and max-width is 200px but still it takes 500px and hence max-width is overridden. Is this the bug? If not then please attach test case explaining your issue.
gur.trio
Comment 2
2013-09-03 04:45:00 PDT
Created
attachment 210351
[details]
To check if max-width overrides width
Ahmad Saleem
Comment 3
2023-02-10 06:58:44 PST
I am able to reproduce this bug in Safari 16.3 and WebKit ToT and it shows 204 and 500 while all other browsers (Chrome Canary 112 and Firefox Nightly 111) show '204' and '200'.
Karl Dubost
Comment 4
2023-02-12 18:32:35 PST
In the test case: The first div and the table have for style div, table { width: 500px; max-width: 200px; } Results: For Safari: - div: max-width wins. - table: width winds. For Chrome and Firefox: max-width always wins.
Ahmad Saleem
Comment 5
2023-07-27 05:03:45 PDT
It might be somewhere here:
https://searchfox.org/wubkat/source/Source/WebCore/rendering/RenderTable.cpp#290
First - we do this "Ensure we aren't bigger than our available width." and then "// Ensure we aren't bigger than our max-width style." and then "// Ensure we aren't smaller than our min-width style." I think first thing, we should move 'min-width' before 'max-width'. Also need to look into more about 'width' here.
Radar WebKit Bug Importer
Comment 6
2024-02-08 15:29:55 PST
<
rdar://problem/122587460
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug