19 #ifndef NET_INSTAWEB_REWRITER_PUBLIC_JAVASCRIPT_FILTER_H_
20 #define NET_INSTAWEB_REWRITER_PUBLIC_JAVASCRIPT_FILTER_H_
36 namespace net_instaweb {
66 void StartElementImpl(
HtmlElement* element)
override;
71 const char*
Name()
const override {
return "JavascriptFilter"; }
72 const char* id()
const override {
return RewriteOptions::kJavascriptMinId; }
91 inline void RewriteInlineScript(HtmlCharactersNode* body_node);
92 inline void RewriteExternalScript(
93 HtmlElement* script_in_progress, HtmlElement::Attribute* script_src);
98 void InitializeConfigIfNecessary();
102 virtual bool output_source_map()
const {
return false; }
104 ScriptType script_type_;
107 bool some_missing_scripts_;
108 scoped_ptr<JavascriptRewriteConfig> config_;
109 ScriptTagScanner script_tag_scanner_;
119 const char*
Name()
const override {
return "Javascript_Source_Map"; }
120 const char* id()
const override {
121 return RewriteOptions::kJavascriptMinSourceMapId;
125 bool output_source_map()
const override {
return true; }
ScriptUsage GetScriptUsage() const override
Definition: javascript_filter.h:74
RewriteContext * MakeRewriteContext() override
const char * Name() const override
The name of this filter – used for logging and debugging.
Definition: javascript_filter.h:119
Definition: javascript_filter.h:59
Leaf node representing raw characters in HTML.
Definition: html_node.h:167
Base class for implementations of monitoring statistics.
Definition: statistics.h:342
Definition: html_element.h:42
Definition: ref_counted_ptr.h:69
void IEDirective(HtmlIEDirectiveNode *directive) override
void Characters(HtmlCharactersNode *characters) override
RewriteContext * MakeNestedRewriteContext(RewriteContext *parent, const ResourceSlotPtr &slot) override
const char * Name() const override
The name of this filter – used for logging and debugging.
Definition: javascript_filter.h:71
ScriptUsage
Describes a filter's relationship with scripts.
Definition: html_filter.h:38
Definition: rewrite_filter.h:35
Definition: rewrite_driver.h:100
void StartDocumentImpl() override
Definition: javascript_filter.h:65
Definition: rewrite_context.h:155
Definition: html_filter.h:43
Definition: javascript_code_block.h:45
Definition: javascript_filter.h:114
Leaf node representing an HTML IE directive.
Definition: html_node.h:213