mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 02:12:09 -05:00
WebContent: Add plumbing for 'is scripting enabled' setting
This commit is contained in:
parent
7bdbac7fd9
commit
780e5441b4
5 changed files with 13 additions and 1 deletions
|
@ -459,4 +459,9 @@ void ConnectionFromClient::set_has_focus(bool has_focus)
|
|||
m_page_host->set_has_focus(has_focus);
|
||||
}
|
||||
|
||||
void ConnectionFromClient::set_is_scripting_enabled(bool is_scripting_enabled)
|
||||
{
|
||||
m_page_host->set_is_scripting_enabled(is_scripting_enabled);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -61,6 +61,7 @@ private:
|
|||
virtual void set_content_filters(Vector<String> const&) override;
|
||||
virtual void set_preferred_color_scheme(Web::CSS::PreferredColorScheme const&) override;
|
||||
virtual void set_has_focus(bool) override;
|
||||
virtual void set_is_scripting_enabled(bool) override;
|
||||
|
||||
virtual void js_console_input(String const&) override;
|
||||
virtual void run_javascript(String const&) override;
|
||||
|
|
|
@ -62,6 +62,11 @@ void PageHost::set_preferred_color_scheme(Web::CSS::PreferredColorScheme color_s
|
|||
document->invalidate_style();
|
||||
}
|
||||
|
||||
void PageHost::set_is_scripting_enabled(bool is_scripting_enabled)
|
||||
{
|
||||
page().set_is_scripting_enabled(is_scripting_enabled);
|
||||
}
|
||||
|
||||
Web::Layout::InitialContainingBlock* PageHost::layout_root()
|
||||
{
|
||||
auto* document = page().top_level_browsing_context().active_document();
|
||||
|
|
|
@ -33,6 +33,7 @@ public:
|
|||
|
||||
void set_should_show_line_box_borders(bool b) { m_should_show_line_box_borders = b; }
|
||||
void set_has_focus(bool);
|
||||
void set_is_scripting_enabled(bool);
|
||||
|
||||
private:
|
||||
// ^PageClient
|
||||
|
|
|
@ -44,7 +44,7 @@ endpoint WebContentServer
|
|||
|
||||
set_content_filters(Vector<String> filters) =|
|
||||
set_preferred_color_scheme(Web::CSS::PreferredColorScheme color_scheme) =|
|
||||
|
||||
set_has_focus(bool has_focus) =|
|
||||
set_is_scripting_enabled(bool is_scripting_enabled) =|
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue