mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-04 09:22:53 +00:00
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:
parent
0e3487b9ab
commit
9559f0f123
Notes:
github-actions[bot]
2024-08-15 12:59:38 +00:00
Author: https://github.com/AtkinsSJ
Commit: 9559f0f123
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1076
25 changed files with 137 additions and 136 deletions
|
@ -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)));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue