summaryrefslogtreecommitdiff
path: root/Userland/Applications/Browser/Tab.cpp
diff options
context:
space:
mode:
authorSam Atkins <atkinssj@serenityos.org>2022-03-04 16:16:57 +0000
committerAndreas Kling <kling@serenityos.org>2022-03-10 17:30:09 +0100
commit2c970b9516cc2a89a119ea60761f947df71ffb46 (patch)
tree31ab32d74d585c907d49fc84165d07f555604bbd /Userland/Applications/Browser/Tab.cpp
parent6de2b62906f0357281206923357b15c90f7abdaf (diff)
downloadserenity-2c970b9516cc2a89a119ea60761f947df71ffb46.zip
Browser: Replace inspector's dom_node_id with a Selection struct
Diffstat (limited to 'Userland/Applications/Browser/Tab.cpp')
-rw-r--r--Userland/Applications/Browser/Tab.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Applications/Browser/Tab.cpp b/Userland/Applications/Browser/Tab.cpp
index 771cd83925..f4ea417e8f 100644
--- a/Userland/Applications/Browser/Tab.cpp
+++ b/Userland/Applications/Browser/Tab.cpp
@@ -330,7 +330,7 @@ Tab::Tab(BrowserWindow& window)
};
hooks().on_get_dom_node_properties = [this](auto node_id, auto& specified, auto& computed, auto& custom_properties, auto& node_box_sizing) {
- m_dom_inspector_widget->set_dom_node_properties_json(node_id, specified, computed, custom_properties, node_box_sizing);
+ m_dom_inspector_widget->set_dom_node_properties_json({ node_id }, specified, computed, custom_properties, node_box_sizing);
};
hooks().on_js_console_new_message = [this](auto message_index) {
@@ -537,9 +537,9 @@ void Tab::show_inspector_window(Browser::Tab::InspectorTarget inspector_target)
}
if (inspector_target == InspectorTarget::HoveredElement) {
- Optional<i32> hovered_node = m_web_content_view->get_hovered_node_id();
- VERIFY(hovered_node.has_value());
- m_dom_inspector_widget->set_inspected_node(hovered_node.value());
+ // FIXME: Handle pseudo-elements
+ auto hovered_node = m_web_content_view->get_hovered_node_id();
+ m_dom_inspector_widget->set_selection({ hovered_node });
} else {
VERIFY(inspector_target == InspectorTarget::Document);
m_dom_inspector_widget->select_default_node();