Bug 198032 - Inherited width does not respect max-width and min-width algorithm
Summary: Inherited width does not respect max-width and min-width algorithm
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Safari 12
Hardware: Macintosh macOS 10.14
: P2 Normal
Assignee: Joonghun Park
URL: https://jsfiddle.net/booc0mtaco/Lr9bz...
Keywords: BrowserCompat, InRadar
Depends on:
Blocks:
 
Reported: 2019-05-20 00:07 PDT by Andrew H
Modified: 2019-05-31 09:37 PDT (History)
8 users (show)

See Also:


Attachments
Patch (3.32 KB, patch)
2019-05-30 08:15 PDT, Joonghun Park
no flags Details | Formatted Diff | Diff
Add a WPT test (6.84 KB, patch)
2019-05-30 22:03 PDT, Joonghun Park
no flags Details | Formatted Diff | Diff
Complete the WPT test's export process (6.84 KB, patch)
2019-05-30 22:11 PDT, Joonghun Park
no flags Details | Formatted Diff | Diff
Complete the WPT test's export process (6.84 KB, patch)
2019-05-30 22:12 PDT, Joonghun Park
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew H 2019-05-20 00:07:22 PDT
if an inner element is positioned relative, and has both min-width and max-width specified where min-width > max-width, an outer element with position absolute won't receive the proper width value.

min-width / max-width algorithm: 10.4 @ https://www.w3.org/TR/CSS2/visudet.html#min-max-widths

JSFiddle demonstrating this behavior: https://jsfiddle.net/booc0mtaco/Lr9bzh07/ (chrome and firefox appear to resolve the width as expected)

Expected: outer wrapper (blue) should be as wide as the inner element due to the width algorithm.

Actual result: the outer element appears to simply take the max-width value, while the sized element does the proper calculation.
Comment 1 Radar WebKit Bug Importer 2019-05-20 17:18:38 PDT
<rdar://problem/50967601>
Comment 2 Joonghun Park 2019-05-30 08:15:38 PDT
Created attachment 370942 [details]
Patch
Comment 3 Joonghun Park 2019-05-30 22:03:45 PDT
Created attachment 371034 [details]
Add a WPT test
Comment 4 Joonghun Park 2019-05-30 22:11:32 PDT
Created attachment 371035 [details]
Complete the WPT test's export process
Comment 5 Joonghun Park 2019-05-30 22:12:39 PDT
Created attachment 371036 [details]
Complete the WPT test's export process
Comment 6 Joonghun Park 2019-05-30 22:18:26 PDT
Could you please review this change?
And I wonder the included wpt test case will be merged automatically
to the wpt github repository.

At the command prompt below,

Would you like to export the web-platform-tests changes to a WPT GitHub repository? [Y/n]: y

I coundn't proceed the process smoothly(failed with some error in fact),
so I wonder I don't have to care about that wpt export failure message.
Comment 7 Joonghun Park 2019-05-30 23:00:29 PDT
I've read https://lists.webkit.org/pipermail/webkit-dev/2017-December/029837.html,
and succeeded to update wpt test case with PR form using it.
So current state of this patch is that if this patch get r+, the included wpt test can be merged too into wpt github repo.
Comment 8 WebKit Commit Bot 2019-05-31 09:37:19 PDT
Comment on attachment 371036 [details]
Complete the WPT test's export process

Clearing flags on attachment: 371036

Committed r245966: <https://trac.webkit.org/changeset/245966>
Comment 9 WebKit Commit Bot 2019-05-31 09:37:21 PDT
All reviewed patches have been landed.  Closing bug.