LibWeb: Rename IdentifierStyleValue -> CSSKeywordValue

This matches the name in the CSS Typed OM spec.
https://drafts.css-houdini.org/css-typed-om-1/#csskeywordvalue
This commit is contained in:
Sam Atkins 2024-08-14 11:46:56 +01:00 committed by Sam Atkins
parent 0e3487b9ab
commit 9559f0f123
Notes: github-actions[bot] 2024-08-15 12:59:38 +00:00
25 changed files with 137 additions and 136 deletions

View file

@ -9,8 +9,8 @@
#include <LibWeb/Bindings/Intrinsics.h>
#include <LibWeb/CSS/Parser/Parser.h>
#include <LibWeb/CSS/StyleProperties.h>
#include <LibWeb/CSS/StyleValues/CSSKeywordValue.h>
#include <LibWeb/CSS/StyleValues/ColorStyleValue.h>
#include <LibWeb/CSS/StyleValues/IdentifierStyleValue.h>
#include <LibWeb/CSS/StyleValues/LengthStyleValue.h>
#include <LibWeb/DOM/ElementFactory.h>
#include <LibWeb/DOM/HTMLCollection.h>
@ -65,8 +65,8 @@ void HTMLTableElement::apply_presentational_hints(CSS::StyleProperties& style) c
}
if (name == HTML::AttributeNames::align) {
if (value.equals_ignoring_ascii_case("center"sv)) {
style.set_property(CSS::PropertyID::MarginLeft, CSS::IdentifierStyleValue::create(CSS::ValueID::Auto));
style.set_property(CSS::PropertyID::MarginRight, CSS::IdentifierStyleValue::create(CSS::ValueID::Auto));
style.set_property(CSS::PropertyID::MarginLeft, CSS::CSSKeywordValue::create(CSS::ValueID::Auto));
style.set_property(CSS::PropertyID::MarginRight, CSS::CSSKeywordValue::create(CSS::ValueID::Auto));
} else if (auto parsed_value = parse_css_value(CSS::Parser::ParsingContext { document() }, value, CSS::PropertyID::Float)) {
style.set_property(CSS::PropertyID::Float, parsed_value.release_nonnull());
}
@ -89,7 +89,7 @@ void HTMLTableElement::apply_presentational_hints(CSS::StyleProperties& style) c
if (!border)
return;
auto apply_border_style = [&](CSS::PropertyID style_property, CSS::PropertyID width_property, CSS::PropertyID color_property) {
auto legacy_line_style = CSS::IdentifierStyleValue::create(CSS::ValueID::Outset);
auto legacy_line_style = CSS::CSSKeywordValue::create(CSS::ValueID::Outset);
style.set_property(style_property, legacy_line_style);
style.set_property(width_property, CSS::LengthStyleValue::create(CSS::Length::make_px(border)));
style.set_property(color_property, CSS::ColorStyleValue::create(Color(128, 128, 128)));