https://codepen.io/smfr/pen/abppGyQ Hover the image. aspect-ratio should change but does not.
Created attachment 424878 [details] Patch
Created attachment 424899 [details] Patch
This patch modifies the imported WPT tests. Please ensure that any changes on the tests (not coming from a WPT import) are exported to WPT. Please see https://trac.webkit.org/wiki/WPTExportProcess
Comment on attachment 424899 [details] Patch Don't use hover in the test. A test with a simple class change should be enough.
Created attachment 424916 [details] Patch
Comment on attachment 424916 [details] Patch It's a pity that this will trigger layout on renderers where the property is not applicable.
Comment on attachment 424916 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=424916&action=review > LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/replaced-element-dynamic-aspect-ratio.html:7 > +.applyAspectRatio { this could be body.changed #aspectRatio { > LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/replaced-element-dynamic-aspect-ratio.html:12 > +<body onload="aspectRatio.classList.add('applyAspectRatio')"> This could be document.body.classList.add('changed')
Committed r275377: <https://commits.webkit.org/r275377> All reviewed patches have been landed. Closing bug and clearing flags on attachment 424916 [details].
<rdar://problem/76119937>
Comment on attachment 424916 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=424916&action=review >> LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/replaced-element-dynamic-aspect-ratio.html:7 >> +.applyAspectRatio { > > this could be body.changed #aspectRatio { I was not aware changed existed. >> LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/replaced-element-dynamic-aspect-ratio.html:12 >> +<body onload="aspectRatio.classList.add('applyAspectRatio')"> > > This could be document.body.classList.add('changed') Thanks, I will fix the test when upstreaming to WPT tomorrow and then we can re-import it.
(In reply to Rob Buis from comment #10) > Comment on attachment 424916 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=424916&action=review > > >> LayoutTests/imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/replaced-element-dynamic-aspect-ratio.html:7 > >> +.applyAspectRatio { > > > > this could be body.changed #aspectRatio { > > I was not aware changed existed. 'changed' is just an arbitrary classname. The simplicity is that you can just set a class on the body and write the appropriate selectors, instead of targeting the element from script.
(In reply to Simon Fraser (smfr) from comment #11) > > I was not aware changed existed. > > 'changed' is just an arbitrary classname. The simplicity is that you can > just set a class on the body and write the appropriate selectors, instead of > targeting the element from script. Got it. I ended up importing the improved WPT test here: https://bugs.webkit.org/show_bug.cgi?id=222266