mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 09:07:45 +00:00
Browser: Prevent opening multiple DOM Inspectors for the same Tab
Also simplify the logic by removing `Tab::view_dom_tree()`, and making the Tab keep a pointer to the InspectorWidget instead of its Window, since that's more often what we want to access.
This commit is contained in:
parent
d7485df928
commit
2d6a02f03b
2 changed files with 20 additions and 16 deletions
|
@ -22,6 +22,7 @@ class WebViewHooks;
|
|||
namespace Browser {
|
||||
|
||||
class BrowserWindow;
|
||||
class InspectorWidget;
|
||||
|
||||
class Tab final : public GUI::Widget {
|
||||
C_OBJECT(Tab);
|
||||
|
@ -82,7 +83,6 @@ private:
|
|||
void update_bookmark_button(const String& url);
|
||||
void start_download(const URL& url);
|
||||
void view_source(const URL& url, const String& source);
|
||||
void view_dom_tree(const String&);
|
||||
|
||||
History m_history;
|
||||
|
||||
|
@ -90,6 +90,7 @@ private:
|
|||
|
||||
RefPtr<GUI::UrlBox> m_location_box;
|
||||
RefPtr<GUI::Button> m_bookmark_button;
|
||||
RefPtr<InspectorWidget> m_dom_inspector_widget;
|
||||
RefPtr<GUI::Window> m_console_window;
|
||||
RefPtr<GUI::Statusbar> m_statusbar;
|
||||
RefPtr<GUI::ToolbarContainer> m_toolbar_container;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue