summaryrefslogtreecommitdiff
path: root/Userland/Libraries
diff options
context:
space:
mode:
authorSam Atkins <atkinssj@serenityos.org>2021-09-12 20:04:04 +0100
committerAndreas Kling <kling@serenityos.org>2021-09-12 21:34:57 +0200
commit5bb6936a2adad7b23c25e7c0338400a28c82fcc1 (patch)
tree88b3efa9ccf42736f46578ed7b7ae3ba55c1fad0 /Userland/Libraries
parent8f6017bc4e5fd773aa93d3e2a959034563925592 (diff)
downloadserenity-5bb6936a2adad7b23c25e7c0338400a28c82fcc1.zip
LibWeb: Tidy up CSS parser logging
Diffstat (limited to 'Userland/Libraries')
-rw-r--r--Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp
index b0db859a84..a8bd5a767c 100644
--- a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp
+++ b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp
@@ -503,7 +503,7 @@ Result<Selector::SimpleSelector, Parser::ParsingResult> Parser::parse_simple_sel
} else if (pseudo_name.equals_ignoring_case("first-line")) {
simple_selector.pseudo_element = Selector::SimpleSelector::PseudoElement::FirstLine;
} else {
- dbgln_if(CSS_PARSER_DEBUG, "Unrecognized pseudo-element: '{}'", pseudo_name);
+ dbgln("Unrecognized pseudo-element: '::{}'", pseudo_name);
return ParsingResult::SyntaxError;
}
@@ -571,7 +571,7 @@ Result<Selector::SimpleSelector, Parser::ParsingResult> Parser::parse_simple_sel
simple_selector.type = Selector::SimpleSelector::Type::PseudoElement;
simple_selector.pseudo_element = Selector::SimpleSelector::PseudoElement::FirstLine;
} else {
- dbgln_if(CSS_PARSER_DEBUG, "Unknown pseudo class: '{}'", pseudo_name);
+ dbgln("Unrecognized pseudo-class: ':{}'", pseudo_name);
return ParsingResult::SyntaxError;
}
@@ -610,7 +610,7 @@ Result<Selector::SimpleSelector, Parser::ParsingResult> Parser::parse_simple_sel
return ParsingResult::SyntaxError;
}
} else {
- dbgln_if(CSS_PARSER_DEBUG, "Unknown pseudo class: '{}'()", pseudo_function.name());
+ dbgln("Unrecognized pseudo-class function: ':{}'()", pseudo_function.name());
return ParsingResult::SyntaxError;
}
@@ -1222,7 +1222,7 @@ RefPtr<CSSRule> Parser::convert_to_rule(NonnullRefPtr<StyleRule> rule)
else
dbgln("Unable to parse url from @import rule");
} else {
- dbgln("Unrecognized CSS at-rule: {}", rule->m_name);
+ dbgln("Unrecognized CSS at-rule: @{}", rule->m_name);
}
// FIXME: More at rules!
@@ -1234,14 +1234,15 @@ RefPtr<CSSRule> Parser::convert_to_rule(NonnullRefPtr<StyleRule> rule)
if (selectors.is_error()) {
if (selectors.error() != ParsingResult::IncludesIgnoredVendorPrefix) {
dbgln("CSSParser: style rule selectors invalid; discarding.");
- prelude_stream.dump_all_tokens();
+ if constexpr (CSS_PARSER_DEBUG) {
+ prelude_stream.dump_all_tokens();
+ }
}
return {};
}
if (selectors.value().is_empty()) {
dbgln("CSSParser: empty selector; discarding.");
- prelude_stream.dump_all_tokens();
return {};
}