RESOLVED FIXED 211219
Dynamically added custom scrollbar styles don't apply
https://bugs.webkit.org/show_bug.cgi?id=211219
Summary Dynamically added custom scrollbar styles don't apply
mustafa.0x
Reported 2020-04-29 21:30:16 PDT
Created attachment 398033 [details] Bug reproduction See Attached file. Deleting line #23 will allow the ::-webkit-scrollbar styles to apply. Note: this also occurs in Chrome.
Attachments
Bug reproduction (1.92 KB, text/html)
2020-04-29 21:30 PDT, mustafa.0x
no flags
safari-css-bug-simplified (509 bytes, text/html)
2020-05-01 14:20 PDT, mustafa.0x
no flags
Testcase (2.97 KB, text/html)
2020-05-01 20:11 PDT, Simon Fraser (smfr)
no flags
Alexey Proskuryakov
Comment 1 2020-05-01 12:52:03 PDT
This is a somewhat large script. Could you please clarify what makes you think that this is a browser engine bug?
mustafa.0x
Comment 2 2020-05-01 14:20:07 PDT
Created attachment 398239 [details] safari-css-bug-simplified Regardless of the script size, it shouldn't affect the scrollbar. In any case, I made the script much lot simpler — one line. So, for some reason, accessing `window.visualViewport.height` is affecting the scrollbars. Remove it and the scrollbars will be as set by the CSS. Also, I previously mentioned that Chrome has the same issue. It does not in fact. Open the file in Chrome and the scrollbars will be set as the CSS says.
Simon Fraser (smfr)
Comment 3 2020-05-01 15:00:49 PDT
Does this reproduce in a recent STP? We fixed bug for sheets with large numbers of rules.
mustafa.0x
Comment 4 2020-05-01 15:09:54 PDT
Reproduced in Release 105 (Safari 13.2, WebKit 15610.1.10) Also, there aren't a large number of rules here. The whole file is 500 bytes.
Simon Fraser (smfr)
Comment 5 2020-05-01 20:03:31 PDT
My guess is that the call to window.visualViewport.height triggers a layout before we see the custom scrollbar styles, then fail to dynamically change to the custom scrollbars.
Simon Fraser (smfr)
Comment 6 2020-05-01 20:11:08 PDT
Created attachment 398274 [details] Testcase This testcase clarifies what's happening.
Radar WebKit Bug Importer
Comment 7 2022-07-01 11:16:23 PDT
Vitaly Dyackhov
Comment 8 2023-05-26 03:01:33 PDT
EWS
Comment 9 2023-06-09 03:56:19 PDT
Committed 265015@main (1ac712cb8d9b): <https://commits.webkit.org/265015@main> Reviewed commits have been landed. Closing PR #14386 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.