mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-18 22:19:50 +00:00
LibWeb: Move and rename CSSStyleValue to StyleValues/StyleValue.{h,cpp}
This reverts 0e3487b9ab
.
Back when I made that change, I thought we could make our StyleValue
classes match the typed-om definitions directly. However, they have
different requirements. Typed-om types need to be mutable and GCed,
whereas StyleValues are immutable and ideally wouldn't require a JS VM.
While I was already making such a cataclysmic change, I've moved it into
the StyleValues directory, because it *not* being there has bothered me
for a long time. 😅
This commit is contained in:
parent
0d8ad0a9fe
commit
c57975c9fd
Notes:
github-actions[bot]
2025-08-08 14:20:54 +00:00
Author: https://github.com/AtkinsSJ
Commit: c57975c9fd
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5775
Reviewed-by: https://github.com/tcl3 ✅
167 changed files with 989 additions and 990 deletions
|
@ -5386,7 +5386,7 @@ String HTMLParser::serialize_html_fragment(DOM::Node const& node, SerializableSh
|
|||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#current-dimension-value
|
||||
static RefPtr<CSS::CSSStyleValue const> parse_current_dimension_value(float value, Utf8View input, Utf8View::Iterator position)
|
||||
static RefPtr<CSS::StyleValue const> parse_current_dimension_value(float value, Utf8View input, Utf8View::Iterator position)
|
||||
{
|
||||
// 1. If position is past the end of input, then return value as a length.
|
||||
if (position == input.end())
|
||||
|
@ -5401,7 +5401,7 @@ static RefPtr<CSS::CSSStyleValue const> parse_current_dimension_value(float valu
|
|||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#rules-for-parsing-dimension-values
|
||||
RefPtr<CSS::CSSStyleValue const> parse_dimension_value(StringView string)
|
||||
RefPtr<CSS::StyleValue const> parse_dimension_value(StringView string)
|
||||
{
|
||||
// 1. Let input be the string being parsed.
|
||||
auto input = Utf8View(string);
|
||||
|
@ -5475,7 +5475,7 @@ RefPtr<CSS::CSSStyleValue const> parse_dimension_value(StringView string)
|
|||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#rules-for-parsing-non-zero-dimension-values
|
||||
RefPtr<CSS::CSSStyleValue const> parse_nonzero_dimension_value(StringView string)
|
||||
RefPtr<CSS::StyleValue const> parse_nonzero_dimension_value(StringView string)
|
||||
{
|
||||
// 1. Let input be the string being parsed.
|
||||
// 2. Let value be the result of parsing input using the rules for parsing dimension values.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue