1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 01:47:35 +00:00

Ladybird: Allow creating new tabs with plain HTML

This will allow us to internally create a new tab with HTML, to be used
by the View Source command.
This commit is contained in:
Timothy Flynn 2023-08-28 16:14:34 -04:00 committed by Tim Flynn
parent 9c4ce1b80b
commit a718a1f3a6
10 changed files with 83 additions and 29 deletions

View file

@ -73,6 +73,7 @@ public slots:
void tab_title_changed(int index, QString const&);
void tab_favicon_changed(int index, QIcon const& icon);
Tab& new_tab(QString const&, Web::HTML::ActivateTab);
Tab& new_tab(StringView html, URL const& url, Web::HTML::ActivateTab);
void activate_tab(int index);
void close_tab(int index);
void close_current_tab();
@ -98,6 +99,8 @@ private:
virtual void wheelEvent(QWheelEvent*) override;
virtual void closeEvent(QCloseEvent*) override;
Tab& create_new_tab(Web::HTML::ActivateTab activate_tab);
void debug_request(DeprecatedString const& request, DeprecatedString const& argument = "");
void set_current_tab(Tab* tab);