Summary: | aspect-ratio not recomputed on hover | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Simon Fraser (smfr) <simon.fraser> | ||||||||
Component: | Layout and Rendering | Assignee: | Rob Buis <rbuis> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | bfulgham, changseok, clopez, esprehn+autocc, ews-watchlist, glenn, kondapallykalyan, pdr, rbuis, simon.fraser, webkit-bug-importer, youennf, zalan | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | Safari Technology Preview | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Bug Depends on: | 226673 | ||||||||||
Bug Blocks: | |||||||||||
Attachments: |
|
Description
Simon Fraser (smfr)
2021-03-31 17:19:50 PDT
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]. 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 |