mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 09:45:06 +02:00
WebContent: Move console handling from WebContentCC to InspectorCC
The idea originally was that the WebContentConsoleClient would perform some amount of console handling that both InspectorConsoleClient and DevToolsConsoleClient needed. But in implementing the DevTools console, it's become clear that these implementations will not overlap at all. So this patch moves the existing Inspector functionality away from WebContentConsoleClient.
This commit is contained in:
Notes:
github-actions[bot]
2025-03-04 20:35:05 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/14a8ffa867a Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3801 Reviewed-by: https://github.com/AtkinsSJ
@@ -54,33 +54,4 @@ void WebContentConsoleClient::handle_input(StringView js_source)
|
||||
}
|
||||
}
|
||||
|
||||
void WebContentConsoleClient::print_html(String const& line)
|
||||
{
|
||||
m_message_log.append({ .type = ConsoleOutput::Type::HTML, .data = line });
|
||||
m_client->did_output_js_console_message(m_message_log.size() - 1);
|
||||
}
|
||||
|
||||
void WebContentConsoleClient::clear()
|
||||
{
|
||||
clear_output();
|
||||
}
|
||||
|
||||
void WebContentConsoleClient::clear_output()
|
||||
{
|
||||
m_message_log.append({ .type = ConsoleOutput::Type::Clear, .data = String {} });
|
||||
m_client->did_output_js_console_message(m_message_log.size() - 1);
|
||||
}
|
||||
|
||||
void WebContentConsoleClient::begin_group(String const& label, bool start_expanded)
|
||||
{
|
||||
m_message_log.append({ .type = start_expanded ? ConsoleOutput::Type::BeginGroup : ConsoleOutput::Type::BeginGroupCollapsed, .data = label });
|
||||
m_client->did_output_js_console_message(m_message_log.size() - 1);
|
||||
}
|
||||
|
||||
void WebContentConsoleClient::end_group()
|
||||
{
|
||||
m_message_log.append({ .type = ConsoleOutput::Type::EndGroup, .data = String {} });
|
||||
m_client->did_output_js_console_message(m_message_log.size() - 1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user