mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibWeb: Rename "var_or_attr" to "arbitrary_substitution_function"
This is the spec term, and will apply to many more things than var() and attr().
This commit is contained in:
committed by
Tim Ledbetter
parent
8f01297182
commit
b5ed910f1f
Notes:
github-actions[bot]
2025-07-09 15:46:26 +00:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/LadybirdBrowser/ladybird/commit/b5ed910f1f1 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5226 Reviewed-by: https://github.com/tcl3 ✅
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2020, Andreas Kling <andreas@ladybird.org>
|
||||
* Copyright (c) 2021, Tobias Christiansen <tobyase@serenityos.org>
|
||||
* Copyright (c) 2021-2023, Sam Atkins <atkinssj@serenityos.org>
|
||||
* Copyright (c) 2021-2025, Sam Atkins <sam@ladybird.org>
|
||||
* Copyright (c) 2022-2023, MacDue <macdue@dueutil.tech>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
@@ -17,30 +17,30 @@ namespace Web::CSS {
|
||||
|
||||
class UnresolvedStyleValue final : public CSSStyleValue {
|
||||
public:
|
||||
static ValueComparingNonnullRefPtr<UnresolvedStyleValue const> create(Vector<Parser::ComponentValue>&& values, bool contains_var_or_attr, Optional<String> original_source_text)
|
||||
static ValueComparingNonnullRefPtr<UnresolvedStyleValue const> create(Vector<Parser::ComponentValue>&& values, bool contains_arbitrary_substitution_function, Optional<String> original_source_text)
|
||||
{
|
||||
return adopt_ref(*new (nothrow) UnresolvedStyleValue(move(values), contains_var_or_attr, move(original_source_text)));
|
||||
return adopt_ref(*new (nothrow) UnresolvedStyleValue(move(values), contains_arbitrary_substitution_function, move(original_source_text)));
|
||||
}
|
||||
virtual ~UnresolvedStyleValue() override = default;
|
||||
|
||||
virtual String to_string(SerializationMode) const override;
|
||||
|
||||
Vector<Parser::ComponentValue> const& values() const { return m_values; }
|
||||
bool contains_var_or_attr() const { return m_contains_var_or_attr; }
|
||||
bool contains_arbitrary_substitution_function() const { return m_contains_arbitrary_substitution_function; }
|
||||
|
||||
virtual bool equals(CSSStyleValue const& other) const override;
|
||||
|
||||
private:
|
||||
UnresolvedStyleValue(Vector<Parser::ComponentValue>&& values, bool contains_var_or_attr, Optional<String> original_source_text)
|
||||
UnresolvedStyleValue(Vector<Parser::ComponentValue>&& values, bool contains_arbitrary_substitution_function, Optional<String> original_source_text)
|
||||
: CSSStyleValue(Type::Unresolved)
|
||||
, m_values(move(values))
|
||||
, m_contains_var_or_attr(contains_var_or_attr)
|
||||
, m_contains_arbitrary_substitution_function(contains_arbitrary_substitution_function)
|
||||
, m_original_source_text(move(original_source_text))
|
||||
{
|
||||
}
|
||||
|
||||
Vector<Parser::ComponentValue> m_values;
|
||||
bool m_contains_var_or_attr { false };
|
||||
bool m_contains_arbitrary_substitution_function { false };
|
||||
Optional<String> m_original_source_text;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user