mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 22:27:35 +00:00
LibWeb+LibWebView+WebContent: Add an Inspector IDL object to the Window
This is an internal object that must be explicitly enabled by the chrome before it is added to the Window. The Inspector object will be used by a special WebView that will replace all chrome-specific inspector windows. The IDL defines methods that this WebView will need to inform the chrome of various events, such as the user clicking a DOM node.
This commit is contained in:
parent
30e96749de
commit
ffdc2d8add
21 changed files with 156 additions and 1 deletions
|
@ -929,4 +929,9 @@ void ConnectionFromClient::inspect_accessibility_tree()
|
|||
}
|
||||
}
|
||||
|
||||
void ConnectionFromClient::enable_inspector_prototype()
|
||||
{
|
||||
Web::HTML::Window::set_inspector_object_exposed(true);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -106,6 +106,8 @@ private:
|
|||
|
||||
virtual void set_user_style(String const&) override;
|
||||
|
||||
virtual void enable_inspector_prototype() override;
|
||||
|
||||
virtual Messages::WebContentServer::TakeDocumentScreenshotResponse take_document_screenshot() override;
|
||||
|
||||
virtual Messages::WebContentServer::GetLocalStorageEntriesResponse get_local_storage_entries() override;
|
||||
|
|
|
@ -503,4 +503,14 @@ void PageHost::page_did_insert_clipboard_entry(String data, String presentation_
|
|||
m_client.async_did_insert_clipboard_entry(move(data), move(presentation_style), move(mime_type));
|
||||
}
|
||||
|
||||
void PageHost::inspector_did_load()
|
||||
{
|
||||
m_client.async_inspector_did_load();
|
||||
}
|
||||
|
||||
void PageHost::inspector_did_select_dom_node(i32 node_id, Optional<Web::CSS::Selector::PseudoElement> const& pseudo_element)
|
||||
{
|
||||
m_client.async_inspector_did_select_dom_node(node_id, pseudo_element);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -121,6 +121,8 @@ private:
|
|||
virtual void page_did_finish_text_test() override;
|
||||
virtual void page_did_change_theme_color(Gfx::Color color) override;
|
||||
virtual void page_did_insert_clipboard_entry(String data, String presentation_style, String mime_type) override;
|
||||
virtual void inspector_did_load() override;
|
||||
virtual void inspector_did_select_dom_node(i32 node_id, Optional<Web::CSS::Selector::PseudoElement> const& pseudo_element) override;
|
||||
|
||||
explicit PageHost(ConnectionFromClient&);
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include <LibGfx/ShareableBitmap.h>
|
||||
#include <LibWeb/Cookie/Cookie.h>
|
||||
#include <LibWeb/Cookie/ParsedCookie.h>
|
||||
#include <LibWeb/CSS/Selector.h>
|
||||
#include <LibWeb/HTML/ActivateTab.h>
|
||||
#include <LibWeb/Page/Page.h>
|
||||
|
||||
|
@ -69,4 +70,7 @@ endpoint WebContentClient
|
|||
|
||||
did_finish_text_test() =|
|
||||
|
||||
inspector_did_load() =|
|
||||
inspector_did_select_dom_node(i32 node_id, Optional<Web::CSS::Selector::PseudoElement> pseudo_element) =|
|
||||
|
||||
}
|
||||
|
|
|
@ -86,4 +86,6 @@ endpoint WebContentServer
|
|||
toggle_media_controls_state() =|
|
||||
|
||||
set_user_style(String source) =|
|
||||
|
||||
enable_inspector_prototype() =|
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue