| Summary: | aspect-ratio should work on errored images that have display:block | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Jake Archibald <jaffathecake> | ||||
| Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> | ||||
| Status: | NEW --- | ||||||
| Severity: | Normal | CC: | bfulgham, cathiechen, changseok, david, esprehn+autocc, ews-watchlist, glenn, karlcow, kondapallykalyan, pdr, sabouhallawa, simon.fraser, webkit-bug-importer, zalan | ||||
| Priority: | P2 | Keywords: | BrowserCompat, InRadar | ||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=245136 | ||||||
| Attachments: |
|
||||||
|
Description
Jake Archibald
2022-08-26 02:12:02 PDT
I wonder if it relates to https://drafts.csswg.org/css-sizing-4/#aspect-ratio-automatic I checked the test in https://github.com/web-platform-tests/wpt/pull/35612 locally, it seems the cases are passed in Release 152 (Safari 16.0, WebKit 17615.1.2.3). It seems the wpt pipeline fails to install Safari Technology Preview. https://dev.azure.com/web-platform-tests/wpt/_build/results?buildId=86190&view=logs&jobId=bf8f5026-3d1f-5955-26be-17f9e1ef0bb3 Maybe it's an environmental issue, not specific to the test case? Loading locally the test http://wpt.live/css/css-sizing/aspect-ratio/replaced-element-028.html shows that Safari displays the image with a 1:1 aspect ratio by default and I think this is what Jake is pointing. (In reply to Karl Dubost from comment #4) > Loading locally the test > http://wpt.live/css/css-sizing/aspect-ratio/replaced-element-028.html > > shows that Safari displays the image with a 1:1 aspect ratio by default and > I think this is what Jake is pointing. I see... Yes, 1:1 aspect ratio seems not very reasonable. I think I can take a look:) Safari is passing http://wpt.live/css/css-sizing/aspect-ratio/replaced-element-028.html (as is Chrome and Firefox, although they pass it in a different way). I'm not actually sure what the correct behaviour should be for that test, other than it should ignore the aspect-ratio given by the developer. However, I think the test in https://github.com/web-platform-tests/wpt/pull/35612 is a more obvious fail. Are you sure it's passing for you? It's failing when I try it in Release 152. Another version: https://jsbin.com/zipolaj/2/edit?html,css,output. In Chrome and Firefox, the image uses the aspect ratio provided by the CSS - 2:1. In Safari it uses 1:1. (In reply to Jake Archibald from comment #6) > Safari is passing > http://wpt.live/css/css-sizing/aspect-ratio/replaced-element-028.html (as is > Chrome and Firefox, although they pass it in a different way). I'm not > actually sure what the correct behaviour should be for that test, other than > it should ignore the aspect-ratio given by the developer. Yeah, do we need to file a bug in GitHub to discuss the expected behavior? It seems Chrome and Firefox do not apply aspect-ratio if the error images are with alt. https://jsbin.com/yanocayapi/1/edit?html,css,output > > However, I think the test in > https://github.com/web-platform-tests/wpt/pull/35612 is a more obvious fail. > Are you sure it's passing for you? It's failing when I try it in Release 152. > It passes if I download the test and load it with file:/// > Another version: https://jsbin.com/zipolaj/2/edit?html,css,output. > > In Chrome and Firefox, the image uses the aspect ratio provided by the CSS - > 2:1. In Safari it uses 1:1. Yeah, it's 1:1. Again, if I download the test and load it with file:///, it's 2:1. Something might go wrong if trying to download the error image from network. Ohhh, that's fun! I bet it avoids going into an errored state as it leaks details about the file system. Created attachment 462186 [details]
WIP-patch
Filed a new bug for the file:// and http:// issue:) https://bugs.webkit.org/show_bug.cgi?id=245136 I think the cases in replaced-element-028.html and replaced-element-036.html are correct. Explained a little in GitHub. https://github.com/web-platform-tests/wpt/pull/35612#issuecomment-1245268327 |