Summary: | Don't use intrinsic width if our container's width is zero | ||
---|---|---|---|
Product: | WebKit | Reporter: | Tim Horton <thorton> |
Component: | Layout and Rendering | Assignee: | Manuel Rego Casasnovas <rego> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | bfulgham, buildbot, commit-queue, darin, hyatt, jfernandez, rego, rniwa, simon.fraser, svillar, webkit-bug-importer, zalan |
Priority: | P2 | Keywords: | BlinkMergeCandidate, InRadar |
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
See Also: | https://bugs.chromium.org/p/chromium/issues/detail?id=235189 | ||
Bug Depends on: | |||
Bug Blocks: | 178337 | ||
Attachments: |
Description
Tim Horton
2017-10-09 01:13:36 PDT
Created attachment 323160 [details]
testcase
Created attachment 323161 [details]
screenshot of safari (bad case)
Created attachment 323172 [details]
Another example to reproduce the issue
The problem is easily reproducible with an image too.
Check the new attached example, the size of the image depends on the "1fr" column. When it's very close to 0, the image is size 100% of the column breadth, but when it goes to 0 then the image uses the intrisic size for width (100px in the example).
In Chromium and Firefox the image just disppears when the column size is 0px.
We need to investigate what's going on with that image, and why it's not using the 0px breadth of the column to resolve its 100% width.
The differences between Firefox and Chromium in the first example might be related to the intrinsic size of the SVG or something like that.
Created attachment 323173 [details]
Simplified test case
This last example is even more simple, just a grid with a column of 0px.
Then the image has a 100% width and is inside a grid item on the first column.
The width of the image should be 0px but it's 100px.
Ok so the issue is not related to Grid Layout but is a generic issue for replaced elements. It has been fixed a while ago in Blink: https://codereview.chromium.org/253743008/ But it seems the patch was never imported into WebKit. The patch is quite small so I guess we can easily import it. Created attachment 323664 [details]
Patch
The patch is missing the Mac baselines for width100percent-image.html but I'll get them from the EWS. Comment on attachment 323664 [details] Patch Attachment 323664 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/4844499 New failing tests: fast/replaced/width100percent-image.html Created attachment 323665 [details]
Archive of layout-test-results from ews107 for mac-elcapitan-wk2
The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews107 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Comment on attachment 323664 [details] Patch Attachment 323664 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/4844481 New failing tests: fast/replaced/width100percent-image.html Created attachment 323666 [details]
Archive of layout-test-results from ews115 for mac-elcapitan
The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews115 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Comment on attachment 323664 [details] Patch Attachment 323664 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/4844561 New failing tests: fast/replaced/width100percent-image.html Created attachment 323669 [details]
Archive of layout-test-results from ews121 for ios-simulator-wk2
The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews121 Port: ios-simulator-wk2 Platform: Mac OS X 10.12.6
Created attachment 323680 [details]
Patch
Comment on attachment 323680 [details] Patch Attachment 323680 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/4846322 New failing tests: http/tests/loading/basic-credentials-sent-automatically.html Created attachment 323702 [details]
Archive of layout-test-results from ews115 for mac-elcapitan
The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews115 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Comment on attachment 323680 [details]
Patch
Makes sense. Bonus points for interoperability
Created attachment 323889 [details]
Patch for landing
Comment on attachment 323889 [details] Patch for landing Clearing flags on attachment: 323889 Committed r223389: <https://trac.webkit.org/changeset/223389> All reviewed patches have been landed. Closing bug. |