Empty ::-webkit-scrollbar rules should not affect scrollbars.
In the presence of ::-webkit-scrollbar rules, author styling is applied to scrollbars, but only if they actually contain declarations. Before introducing lazy parsing of declaration blocks, we would not consider empty style rules for matching. With lazy parsing, we do not necessarily know if the rule is empty before we perform the actual parsing. That caused a discrepancy between sheets from <style> elements and external stylesheets for empty scrollbar rules because <style> element sheets do not do lazy parsing of declaration blocks. To make this consistent, check if a matched style rule is empty before we mark the ComputedStyle as having pseudo element style. Bug: 897100 Change-Id: I8b808271ca322f42b5ae5e5627a5d17a81658885 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1874467Reviewed-by:Xiaocheng Hu <xiaochengh@chromium.org> Commit-Queue: Rune Lillesveen <futhark@chromium.org> Cr-Commit-Position: refs/heads/master@{#708576}
Showing
Please register or sign in to comment