• Rune Lillesveen's avatar
    Empty ::-webkit-scrollbar rules should not affect scrollbars. · 45c100b4
    Rune Lillesveen authored
    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: default avatarXiaocheng Hu <xiaochengh@chromium.org>
    Commit-Queue: Rune Lillesveen <futhark@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#708576}
    45c100b4
custom-scrollbar-empty-rule-expected.html 80 Bytes