mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 15:57:35 +00:00
Everywhere: Replace dbgln<flag>(...) with dbgln_if(flag, ...)
Replacement made by `find Kernel Userland -name '*.h' -o -name '*.cpp' | sed -i -Ee 's/dbgln\b<(\w+)>\(/dbgln_if(\1, /g'`
This commit is contained in:
parent
1f8a633cc7
commit
09a43969ba
95 changed files with 427 additions and 425 deletions
|
@ -85,9 +85,9 @@ void HTMLScriptElement::execute_script()
|
|||
document().set_current_script({}, nullptr);
|
||||
|
||||
if (m_from_an_external_file)
|
||||
dbgln<HTML_SCRIPT_DEBUG>("HTMLScriptElement: Running script {}", attribute(HTML::AttributeNames::src));
|
||||
dbgln_if(HTML_SCRIPT_DEBUG, "HTMLScriptElement: Running script {}", attribute(HTML::AttributeNames::src));
|
||||
else
|
||||
dbgln<HTML_SCRIPT_DEBUG>("HTMLScriptElement: Running inline script");
|
||||
dbgln_if(HTML_SCRIPT_DEBUG, "HTMLScriptElement: Running inline script");
|
||||
|
||||
document().run_javascript(m_script_source);
|
||||
|
||||
|
|
|
@ -141,7 +141,7 @@ void HTMLDocumentParser::run(const URL& url)
|
|||
break;
|
||||
auto& token = optional_token.value();
|
||||
|
||||
dbgln<PARSER_DEBUG>("[{}] {}", insertion_mode_name(), token.to_string());
|
||||
dbgln_if(PARSER_DEBUG, "[{}] {}", insertion_mode_name(), token.to_string());
|
||||
|
||||
// FIXME: If the adjusted current node is a MathML text integration point and the token is a start tag whose tag name is neither "mglyph" nor "malignmark"
|
||||
// FIXME: If the adjusted current node is a MathML text integration point and the token is a character token
|
||||
|
@ -157,7 +157,7 @@ void HTMLDocumentParser::run(const URL& url)
|
|||
}
|
||||
|
||||
if (m_stop_parsing) {
|
||||
dbgln<PARSER_DEBUG>("Stop parsing{}! :^)", m_parsing_fragment ? " fragment" : "");
|
||||
dbgln_if(PARSER_DEBUG, "Stop parsing{}! :^)", m_parsing_fragment ? " fragment" : "");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -221,7 +221,7 @@ Optional<u32> HTMLTokenizer::next_code_point()
|
|||
return {};
|
||||
m_prev_utf8_iterator = m_utf8_iterator;
|
||||
++m_utf8_iterator;
|
||||
dbgln<TOKENIZER_TRACE_DEBUG>("(Tokenizer) Next code_point: {}", (char)*m_prev_utf8_iterator);
|
||||
dbgln_if(TOKENIZER_TRACE_DEBUG, "(Tokenizer) Next code_point: {}", (char)*m_prev_utf8_iterator);
|
||||
return *m_prev_utf8_iterator;
|
||||
}
|
||||
|
||||
|
@ -2618,17 +2618,17 @@ HTMLTokenizer::HTMLTokenizer(const StringView& input, const String& encoding)
|
|||
|
||||
void HTMLTokenizer::will_switch_to([[maybe_unused]] State new_state)
|
||||
{
|
||||
dbgln<TOKENIZER_TRACE_DEBUG>("[{}] Switch to {}", state_name(m_state), state_name(new_state));
|
||||
dbgln_if(TOKENIZER_TRACE_DEBUG, "[{}] Switch to {}", state_name(m_state), state_name(new_state));
|
||||
}
|
||||
|
||||
void HTMLTokenizer::will_reconsume_in([[maybe_unused]] State new_state)
|
||||
{
|
||||
dbgln<TOKENIZER_TRACE_DEBUG>("[{}] Reconsume in {}", state_name(m_state), state_name(new_state));
|
||||
dbgln_if(TOKENIZER_TRACE_DEBUG, "[{}] Reconsume in {}", state_name(m_state), state_name(new_state));
|
||||
}
|
||||
|
||||
void HTMLTokenizer::switch_to(Badge<HTMLDocumentParser>, State new_state)
|
||||
{
|
||||
dbgln<TOKENIZER_TRACE_DEBUG>("[{}] Parser switches tokenizer state to {}", state_name(m_state), state_name(new_state));
|
||||
dbgln_if(TOKENIZER_TRACE_DEBUG, "[{}] Parser switches tokenizer state to {}", state_name(m_state), state_name(new_state));
|
||||
m_state = new_state;
|
||||
}
|
||||
|
||||
|
|
|
@ -100,7 +100,7 @@ void Resource::did_load(Badge<ResourceLoader>, ReadonlyBytes data, const HashMap
|
|||
m_encoding = encoding_from_content_type(content_type.value());
|
||||
m_mime_type = mime_type_from_content_type(content_type.value());
|
||||
} else if (url().protocol() == "data" && !url().data_mime_type().is_empty()) {
|
||||
dbgln<RESOURCE_DEBUG>("This is a data URL with mime-type _{}_", url().data_mime_type());
|
||||
dbgln_if(RESOURCE_DEBUG, "This is a data URL with mime-type _{}_", url().data_mime_type());
|
||||
m_encoding = "utf-8"; // FIXME: This doesn't seem nice.
|
||||
m_mime_type = url().data_mime_type();
|
||||
} else {
|
||||
|
|
|
@ -86,7 +86,7 @@ RefPtr<Resource> ResourceLoader::load_resource(Resource::Type type, const LoadRe
|
|||
if (it->value->type() != type) {
|
||||
dbgln("FIXME: Not using cached resource for {} since there's a type mismatch.", request.url());
|
||||
} else {
|
||||
dbgln<CACHE_DEBUG>("Reusing cached resource for: {}", request.url());
|
||||
dbgln_if(CACHE_DEBUG, "Reusing cached resource for: {}", request.url());
|
||||
return it->value;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ void WebContentClient::handle([[maybe_unused]] const Messages::WebContentClient:
|
|||
|
||||
void WebContentClient::handle(const Messages::WebContentClient::DidInvalidateContentRect& message)
|
||||
{
|
||||
dbgln<SPAM_DEBUG>("handle: WebContentClient::DidInvalidateContentRect! content_rect={}", message.content_rect());
|
||||
dbgln_if(SPAM_DEBUG, "handle: WebContentClient::DidInvalidateContentRect! content_rect={}", message.content_rect());
|
||||
|
||||
// FIXME: Figure out a way to coalesce these messages to reduce unnecessary painting
|
||||
m_view.notify_server_did_invalidate_content_rect({}, message.content_rect());
|
||||
|
@ -76,25 +76,25 @@ void WebContentClient::handle(const Messages::WebContentClient::DidChangeSelecti
|
|||
|
||||
void WebContentClient::handle(const Messages::WebContentClient::DidLayout& message)
|
||||
{
|
||||
dbgln<SPAM_DEBUG>("handle: WebContentClient::DidLayout! content_size={}", message.content_size());
|
||||
dbgln_if(SPAM_DEBUG, "handle: WebContentClient::DidLayout! content_size={}", message.content_size());
|
||||
m_view.notify_server_did_layout({}, message.content_size());
|
||||
}
|
||||
|
||||
void WebContentClient::handle(const Messages::WebContentClient::DidChangeTitle& message)
|
||||
{
|
||||
dbgln<SPAM_DEBUG>("handle: WebContentClient::DidChangeTitle! title={}", message.title());
|
||||
dbgln_if(SPAM_DEBUG, "handle: WebContentClient::DidChangeTitle! title={}", message.title());
|
||||
m_view.notify_server_did_change_title({}, message.title());
|
||||
}
|
||||
|
||||
void WebContentClient::handle(const Messages::WebContentClient::DidRequestScrollIntoView& message)
|
||||
{
|
||||
dbgln<SPAM_DEBUG>("handle: WebContentClient::DidRequestScrollIntoView! rect={}", message.rect());
|
||||
dbgln_if(SPAM_DEBUG, "handle: WebContentClient::DidRequestScrollIntoView! rect={}", message.rect());
|
||||
m_view.notify_server_did_request_scroll_into_view({}, message.rect());
|
||||
}
|
||||
|
||||
void WebContentClient::handle(const Messages::WebContentClient::DidHoverLink& message)
|
||||
{
|
||||
dbgln<SPAM_DEBUG>("handle: WebContentClient::DidHoverLink! url={}", message.url());
|
||||
dbgln_if(SPAM_DEBUG, "handle: WebContentClient::DidHoverLink! url={}", message.url());
|
||||
m_view.notify_server_did_hover_link({}, message.url());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue