summaryrefslogtreecommitdiff
path: root/content/handlers/html/dom_event.c
diff options
context:
space:
mode:
Diffstat (limited to 'content/handlers/html/dom_event.c')
-rw-r--r--content/handlers/html/dom_event.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/content/handlers/html/dom_event.c b/content/handlers/html/dom_event.c
index 36a020b6d..d42882515 100644
--- a/content/handlers/html/dom_event.c
+++ b/content/handlers/html/dom_event.c
@@ -25,6 +25,7 @@
#include <string.h>
#include "utils/config.h"
+#include "utils/utils.h"
#include "utils/corestrings.h"
#include "utils/nsoption.h"
#include "utils/log.h"
@@ -622,7 +623,9 @@ dom_default_action_DOMNodeInserted_cb(struct dom_event *evt, void *pw)
break;
case DOM_HTML_ELEMENT_TYPE_STYLE:
- html_css_process_style(htmlc, (dom_node *)node);
+ if (nsoption_bool(author_level_css)) {
+ html_css_process_style(htmlc, (dom_node *)node);
+ }
break;
case DOM_HTML_ELEMENT_TYPE_SCRIPT:
@@ -689,6 +692,7 @@ dom_default_action_DOMNodeInsertedIntoDocument_cb(struct dom_event *evt,
switch (tag_type) {
case DOM_HTML_ELEMENT_TYPE_SCRIPT:
dom_SCRIPT_showed_up(htmlc, (dom_html_script_element *) node);
+ fallthrough;
default:
break;
}
@@ -730,11 +734,15 @@ dom_default_action_DOMSubtreeModified_cb(struct dom_event *evt, void *pw)
switch (tag_type) {
case DOM_HTML_ELEMENT_TYPE_STYLE:
- html_css_update_style(htmlc, (dom_node *)node);
+ if (nsoption_bool(author_level_css)) {
+ html_css_update_style(htmlc,
+ (dom_node *)node);
+ }
break;
case DOM_HTML_ELEMENT_TYPE_TEXTAREA:
case DOM_HTML_ELEMENT_TYPE_INPUT:
html_texty_element_update(htmlc, (dom_node *)node);
+ fallthrough;
default:
break;
}