1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-30 13:58:11 +00:00

LibWeb: Add Web::HTML::parse_legacy_color_value

This function follows the "rules for parsing a legacy color value"
which is used in some legacy attributes, such as 'bgcolor' in the body
element.
This commit is contained in:
Shannon Booth 2023-05-28 15:04:40 +12:00 committed by Andreas Kling
parent 15151d7a4c
commit bc54560e59
2 changed files with 143 additions and 0 deletions

View file

@ -6,6 +6,7 @@
#pragma once
#include <LibGfx/Color.h>
#include <LibJS/Heap/Cell.h>
#include <LibWeb/DOM/Node.h>
#include <LibWeb/HTML/Parser/HTMLTokenizer.h>
@ -200,5 +201,6 @@ private:
RefPtr<CSS::StyleValue> parse_dimension_value(StringView);
RefPtr<CSS::StyleValue> parse_nonzero_dimension_value(StringView);
Optional<Color> parse_legacy_color_value(DeprecatedString input);
}