mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00: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:
parent
1adcaf7181
commit
14a8ffa867
Notes:
github-actions[bot]
2025-03-04 20:35:05 +00:00
Author: https://github.com/trflynn89
Commit: 14a8ffa867
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3801
Reviewed-by: https://github.com/AtkinsSJ
5 changed files with 53 additions and 60 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue