mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-17 13:39:25 +00:00
LibWeb/CSS: Rename CSSKeywordValue -> KeywordStyleValue
The typed-om CSSKeywordValue will need to be a separate class.
This commit is contained in:
parent
c57975c9fd
commit
4e92ab52e3
Notes:
github-actions[bot]
2025-08-08 14:20:48 +00:00
Author: https://github.com/AtkinsSJ
Commit: 4e92ab52e3
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5775
Reviewed-by: https://github.com/tcl3 ✅
51 changed files with 189 additions and 191 deletions
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
#include <LibWeb/Bindings/HTMLLIElementPrototype.h>
|
||||
#include <LibWeb/CSS/StyleValues/CSSKeywordValue.h>
|
||||
#include <LibWeb/CSS/StyleValues/KeywordStyleValue.h>
|
||||
#include <LibWeb/HTML/HTMLLIElement.h>
|
||||
#include <LibWeb/HTML/Numbers.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
|
@ -65,23 +65,23 @@ void HTMLLIElement::apply_presentational_hints(GC::Ref<CSS::CascadedProperties>
|
|||
for_each_attribute([&](auto& name, auto& value) {
|
||||
if (name == HTML::AttributeNames::type) {
|
||||
if (value == "1"sv) {
|
||||
cascaded_properties->set_property_from_presentational_hint(CSS::PropertyID::ListStyleType, CSS::CSSKeywordValue::create(CSS::Keyword::Decimal));
|
||||
cascaded_properties->set_property_from_presentational_hint(CSS::PropertyID::ListStyleType, CSS::KeywordStyleValue::create(CSS::Keyword::Decimal));
|
||||
} else if (value == "a"sv) {
|
||||
cascaded_properties->set_property_from_presentational_hint(CSS::PropertyID::ListStyleType, CSS::CSSKeywordValue::create(CSS::Keyword::LowerAlpha));
|
||||
cascaded_properties->set_property_from_presentational_hint(CSS::PropertyID::ListStyleType, CSS::KeywordStyleValue::create(CSS::Keyword::LowerAlpha));
|
||||
} else if (value == "A"sv) {
|
||||
cascaded_properties->set_property_from_presentational_hint(CSS::PropertyID::ListStyleType, CSS::CSSKeywordValue::create(CSS::Keyword::UpperAlpha));
|
||||
cascaded_properties->set_property_from_presentational_hint(CSS::PropertyID::ListStyleType, CSS::KeywordStyleValue::create(CSS::Keyword::UpperAlpha));
|
||||
} else if (value == "i"sv) {
|
||||
cascaded_properties->set_property_from_presentational_hint(CSS::PropertyID::ListStyleType, CSS::CSSKeywordValue::create(CSS::Keyword::LowerRoman));
|
||||
cascaded_properties->set_property_from_presentational_hint(CSS::PropertyID::ListStyleType, CSS::KeywordStyleValue::create(CSS::Keyword::LowerRoman));
|
||||
} else if (value == "I"sv) {
|
||||
cascaded_properties->set_property_from_presentational_hint(CSS::PropertyID::ListStyleType, CSS::CSSKeywordValue::create(CSS::Keyword::UpperRoman));
|
||||
cascaded_properties->set_property_from_presentational_hint(CSS::PropertyID::ListStyleType, CSS::KeywordStyleValue::create(CSS::Keyword::UpperRoman));
|
||||
} else if (value.equals_ignoring_ascii_case("none"sv)) {
|
||||
cascaded_properties->set_property_from_presentational_hint(CSS::PropertyID::ListStyleType, CSS::CSSKeywordValue::create(CSS::Keyword::None));
|
||||
cascaded_properties->set_property_from_presentational_hint(CSS::PropertyID::ListStyleType, CSS::KeywordStyleValue::create(CSS::Keyword::None));
|
||||
} else if (value.equals_ignoring_ascii_case("disc"sv)) {
|
||||
cascaded_properties->set_property_from_presentational_hint(CSS::PropertyID::ListStyleType, CSS::CSSKeywordValue::create(CSS::Keyword::Disc));
|
||||
cascaded_properties->set_property_from_presentational_hint(CSS::PropertyID::ListStyleType, CSS::KeywordStyleValue::create(CSS::Keyword::Disc));
|
||||
} else if (value.equals_ignoring_ascii_case("circle"sv)) {
|
||||
cascaded_properties->set_property_from_presentational_hint(CSS::PropertyID::ListStyleType, CSS::CSSKeywordValue::create(CSS::Keyword::Circle));
|
||||
cascaded_properties->set_property_from_presentational_hint(CSS::PropertyID::ListStyleType, CSS::KeywordStyleValue::create(CSS::Keyword::Circle));
|
||||
} else if (value.equals_ignoring_ascii_case("square"sv)) {
|
||||
cascaded_properties->set_property_from_presentational_hint(CSS::PropertyID::ListStyleType, CSS::CSSKeywordValue::create(CSS::Keyword::Square));
|
||||
cascaded_properties->set_property_from_presentational_hint(CSS::PropertyID::ListStyleType, CSS::KeywordStyleValue::create(CSS::Keyword::Square));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue