mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-08 04:02:52 +00:00
LibWeb: Rename ColorStyleValue -> CSSColorValue
This matches the name in the CSS Typed OM spec. https://drafts.css-houdini.org/css-typed-om-1/#csscolorvalue This is not (yet) the same as the CSSColorValue, but one step at a time.
This commit is contained in:
parent
8952764267
commit
581d00293c
Notes:
github-actions[bot]
2024-08-21 09:53:16 +00:00
Author: https://github.com/AtkinsSJ
Commit: 581d00293c
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1091
17 changed files with 52 additions and 51 deletions
|
@ -10,7 +10,7 @@
|
|||
#include <LibWeb/CSS/Parser/Parser.h>
|
||||
#include <LibWeb/CSS/Parser/ParsingContext.h>
|
||||
#include <LibWeb/CSS/StyleProperties.h>
|
||||
#include <LibWeb/CSS/StyleValues/ColorStyleValue.h>
|
||||
#include <LibWeb/CSS/StyleValues/CSSColorValue.h>
|
||||
#include <LibWeb/HTML/HTMLFontElement.h>
|
||||
#include <LibWeb/HTML/Parser/HTMLParser.h>
|
||||
#include <LibWeb/Infra/CharacterTypes.h>
|
||||
|
@ -119,7 +119,7 @@ void HTMLFontElement::apply_presentational_hints(CSS::StyleProperties& style) co
|
|||
// https://html.spec.whatwg.org/multipage/rendering.html#phrasing-content-3:rules-for-parsing-a-legacy-colour-value
|
||||
auto color = parse_legacy_color_value(value);
|
||||
if (color.has_value())
|
||||
style.set_property(CSS::PropertyID::Color, CSS::ColorStyleValue::create(color.value()));
|
||||
style.set_property(CSS::PropertyID::Color, CSS::CSSColorValue::create(color.value()));
|
||||
} else if (name.equals_ignoring_ascii_case("size"sv)) {
|
||||
// When a font element has a size attribute, the user agent is expected to use the following steps, known as the rules for parsing a legacy font size, to treat the attribute as a presentational hint setting the element's 'font-size' property:
|
||||
auto font_size_or_empty = parse_legacy_font_size(value);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue