diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2016-01-21 14:11:36 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2016-01-21 14:11:36 +0000 |
commit | 594012ef52a6237995d1100d1a3315470b191cbe (patch) | |
tree | a87c4caf156b6b37073110962a507954b0598d90 /render/html_internal.h | |
parent | 3dcf7d80a140d5c02a56423dbc3575bbdf51ff82 (diff) | |
download | netsurf-594012ef52a6237995d1100d1a3315470b191cbe.tar.gz netsurf-594012ef52a6237995d1100d1a3315470b191cbe.tar.bz2 |
Ensure constant javascript_enabled for HTML contents.
Now we take the value of the javascript_enabled option when the
content is created. We then use the content's script_enabled
boolean everywhere else.
This prevents us getting inconsistent values for javascript_enabled
if a user toggles the setting while a page is loading.
It was read frequently during box construction, and also the
parser's script enabled setting could change where we handled
a change of encoding.
Now we only care about the setting of the javascript_enabled
option at time of html_content creation.
Diffstat (limited to 'render/html_internal.h')
-rw-r--r-- | render/html_internal.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/render/html_internal.h b/render/html_internal.h index e5740dbda..aaecb7823 100644 --- a/render/html_internal.h +++ b/render/html_internal.h @@ -97,6 +97,9 @@ typedef struct html_content { /** Whether a layout (reflow) is in progress */ bool reflowing; + /** Whether scripts are enabled for this content */ + bool enable_scripting; + /* Title element node */ dom_node *title; |