mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
LibWeb/CSS: Rename Declaration.original_text -> original_value_text
Otherwise this will conflict with a different original text that I'm about to add.
This commit is contained in:
parent
faba11f33c
commit
8d5eac28a4
Notes:
github-actions[bot]
2025-12-02 09:51:03 +00:00
Author: https://github.com/AtkinsSJ
Commit: 8d5eac28a4
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6986
3 changed files with 5 additions and 5 deletions
|
|
@ -1161,7 +1161,7 @@ Optional<Declaration> Parser::consume_a_declaration(TokenStream<T>& input, Neste
|
|||
for (auto const& value : declaration.value) {
|
||||
original_text.append(value.original_source_text());
|
||||
}
|
||||
declaration.original_text = original_text.to_string_without_validation();
|
||||
declaration.original_value_text = original_text.to_string_without_validation();
|
||||
}
|
||||
// Otherwise, if decl’s value contains a top-level simple block with an associated token of <{-token>,
|
||||
// and also contains any other non-<whitespace-token> value, return nothing.
|
||||
|
|
@ -1647,7 +1647,7 @@ Optional<StylePropertyAndName> Parser::convert_to_style_property(Declaration con
|
|||
}
|
||||
|
||||
auto value_token_stream = TokenStream(declaration.value);
|
||||
auto value = parse_css_value(property->id(), value_token_stream, declaration.original_text);
|
||||
auto value = parse_css_value(property->id(), value_token_stream, declaration.original_value_text);
|
||||
if (value.is_error()) {
|
||||
if (value.error() == ParseError::SyntaxError) {
|
||||
ErrorReporter::the().report(InvalidPropertyError {
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@ namespace Web::CSS::Parser {
|
|||
|
||||
String Declaration::to_string() const
|
||||
{
|
||||
if (original_text.has_value())
|
||||
return original_text.value();
|
||||
if (original_value_text.has_value())
|
||||
return original_value_text.value();
|
||||
|
||||
StringBuilder builder;
|
||||
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ struct Declaration {
|
|||
FlyString name;
|
||||
Vector<ComponentValue> value;
|
||||
Important important = Important::No;
|
||||
Optional<String> original_text = {};
|
||||
Optional<String> original_value_text = {};
|
||||
|
||||
// FIXME: Only needed by our janky @supports re-serialization-re-parse code.
|
||||
String to_string() const;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue