mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 09:45:06 +02:00
LibWeb/CSS: Use generated FooUnit types instead of Foo::Type
I've also renamed the `m_type` and `type()` members to be `m_unit` and `unit()` instead, to match what they actually are.
This commit is contained in:
Notes:
github-actions[bot]
2025-09-11 16:08:15 +00:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/LadybirdBrowser/ladybird/commit/b3e32445d36 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6071
@@ -342,7 +342,7 @@ Optional<Vector<CSS::LengthPercentage>> IntersectionObserver::parse_a_margin(JS:
|
||||
for (auto const& token : tokens) {
|
||||
// If token is an absolute length dimension token, replace it with a an equivalent pixel length.
|
||||
if (token.is(CSS::Parser::Token::Type::Dimension)) {
|
||||
auto length = CSS::Length(token.token().dimension_value(), CSS::Length::unit_from_name(token.token().dimension_unit()).value());
|
||||
auto length = CSS::Length(token.token().dimension_value(), CSS::string_to_length_unit(token.token().dimension_unit()).value());
|
||||
if (length.is_absolute()) {
|
||||
length.absolute_length_to_px();
|
||||
tokens_length_percentage.append(length);
|
||||
|
||||
Reference in New Issue
Block a user