1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:37:37 +00:00

LibWeb: Introduce and parse CSS Ratio type

This is only used by media-queries, so for now we can skip
adding/parsing a StyleValue for these.
This commit is contained in:
Sam Atkins 2022-03-06 13:48:32 +00:00 committed by Andreas Kling
parent e30bfabbca
commit 5f93f1c161
5 changed files with 99 additions and 0 deletions

View file

@ -22,6 +22,7 @@
#include <LibWeb/CSS/Parser/StyleFunctionRule.h>
#include <LibWeb/CSS/Parser/StyleRule.h>
#include <LibWeb/CSS/Parser/Tokenizer.h>
#include <LibWeb/CSS/Ratio.h>
#include <LibWeb/CSS/Selector.h>
#include <LibWeb/CSS/StyleValue.h>
#include <LibWeb/CSS/Supports.h>
@ -243,6 +244,7 @@ private:
Optional<Dimension> parse_dimension(StyleComponentValueRule const&);
Optional<Color> parse_color(StyleComponentValueRule const&);
Optional<Length> parse_length(StyleComponentValueRule const&);
Optional<Ratio> parse_ratio(TokenStream<StyleComponentValueRule>&);
enum class AllowedDataUrlType {
None,