mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-05 07:39:16 +00:00
LibWeb/CSS: Use ErrorReporter for value-parsing errors
Also remove some redundant reporting for `<urange>` parsing errors.
This commit is contained in:
parent
3b7aa736e7
commit
cebdcd9f69
Notes:
github-actions[bot]
2025-08-04 09:52:05 +00:00
Author: https://github.com/AtkinsSJ
Commit: cebdcd9f69
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5576
5 changed files with 239 additions and 61 deletions
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include <AK/GenericShorthands.h>
|
||||
#include <LibWeb/CSS/Parser/ArbitrarySubstitutionFunctions.h>
|
||||
#include <LibWeb/CSS/Parser/ErrorReporter.h>
|
||||
#include <LibWeb/CSS/Parser/Parser.h>
|
||||
#include <LibWeb/CSS/Parser/Syntax.h>
|
||||
#include <LibWeb/CSS/Parser/SyntaxParsing.h>
|
||||
|
@ -251,7 +252,11 @@ RefPtr<CSSStyleValue const> Parser::parse_according_to_syntax_node(TokenStream<C
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
dbgln_if(CSS_PARSER_DEBUG, "Couldn't parse `<{}>` because we don't know what it is.", type_name);
|
||||
ErrorReporter::the().report(InvalidValueError {
|
||||
.value_type = MUST(String::formatted("<{}>", type_name)),
|
||||
.value_string = tokens.dump_string(),
|
||||
.description = "Unknown type in <syntax>."_string,
|
||||
});
|
||||
return nullptr;
|
||||
}
|
||||
case SyntaxNode::NodeType::Multiplier: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue