| Summary: | REGRESSION (255063@main): visibility:visible child of visibility:hidden button remains invisible | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | account+webkit-bugzilla <account+webkit-bugzilla> | ||||||||||
| Component: | Layout and Rendering | Assignee: | zalan <zalan> | ||||||||||
| Status: | RESOLVED FIXED | ||||||||||||
| Severity: | Major | CC: | bfulgham, darin, koivisto, ntim, simon.fraser, webkit-bug-importer, zalan | ||||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||||
| Version: | Safari Technology Preview | ||||||||||||
| Hardware: | Mac (Apple Silicon) | ||||||||||||
| OS: | macOS 13 | ||||||||||||
| URL: | https://jumpy-exciting-weeder.glitch.me/ | ||||||||||||
| Attachments: |
|
||||||||||||
Created attachment 464615 [details]
Patch
(In reply to account+webkit-bugzilla@boermans.name from comment #0) > When `visibility:hidden;` is applied to an element, I expect visibility of > child elements with `visibility:visible` to be restored. > > In Release 161 (Safari 16.4, WebKit 18615.1.17.6) this does not work as > expected when the hidden parent element is a `<button>`, e.g.: > > <button style="visibility: hidden"> > <b style="visibility: visible">Remains hidden</b> > </button> > > Test page: > https://jumpy-exciting-weeder.glitch.me/ > > Practical use case for this pattern: > https://www.scottohara.me/blog/2022/11/07/responsive-accessibility.html Thank you for the detailed bug report and test reduction! Created attachment 464623 [details]
Patch
Created attachment 464632 [details]
Patch
Comment on attachment 464623 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=464623&action=review > Source/WebCore/layout/integration/inline/LayoutIntegrationInlineContentPainter.cpp:71 > + // Fully truncated boxes are visually empty and they down show their descendants either (unlike visibility property). Typo here: "down" instead of "don't". Created attachment 464634 [details]
Patch
Committed 259306@main (7a1613fa8b15): <https://commits.webkit.org/259306@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 464634 [details]. |
When `visibility:hidden;` is applied to an element, I expect visibility of child elements with `visibility:visible` to be restored. In Release 161 (Safari 16.4, WebKit 18615.1.17.6) this does not work as expected when the hidden parent element is a `<button>`, e.g.: <button style="visibility: hidden"> <b style="visibility: visible">Remains hidden</b> </button> Test page: https://jumpy-exciting-weeder.glitch.me/ Practical use case for this pattern: https://www.scottohara.me/blog/2022/11/07/responsive-accessibility.html