diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2021-10-08 15:40:19 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-10-08 23:02:57 +0200 |
commit | 87a30418bfff4d1a8481eec0a11a947f4c3b2485 (patch) | |
tree | 4541bc4c500dc5d34cbeff2f900d5528ca255890 /Userland/Libraries/LibWeb/Painting | |
parent | 2a2efdedf73cbc6b23f5b24e29f715fff09707cd (diff) | |
download | serenity-87a30418bfff4d1a8481eec0a11a947f4c3b2485.zip |
LibWeb: Add CSS 'Supports' class
The name is a little awkward, but this corresponds to the condition of a
`@supports` rule or the `CSS.supports("")` function.
A supports query only gets evaluated once, since its condition cannot
change during runtime. (We either support something or we don't, and the
spec specifically mentions that user preferences that disable features
do not affect the result here.) We keep a representation of it around
though, so that it can be serialized if needed. This is a little awkward
since we hold onto a `StyleDeclarationRule` which should be an internal
Parser class. This means making some Parser functions more public.
Potentially we could evaluate the Supports inside the Parser, and have
it only store a String representation of itself. But this works for now.
:^)
Diffstat (limited to 'Userland/Libraries/LibWeb/Painting')
0 files changed, 0 insertions, 0 deletions