Page Speed Optimization Libraries
1.13.35.1
|
#include "empty_html_filter.h"
Public Member Functions | |
virtual void | StartDocument () |
virtual void | EndDocument () |
virtual void | StartElement (HtmlElement *element) |
virtual void | EndElement (HtmlElement *element) |
virtual void | Cdata (HtmlCdataNode *cdata) |
Called for CDATA blocks (e.g. <![CDATA[foobar]]>) | |
virtual void | Comment (HtmlCommentNode *comment) |
Called for HTML comments that aren't IE directives (e.g. ). | |
virtual void | IEDirective (HtmlIEDirectiveNode *directive) |
virtual void | Characters (HtmlCharactersNode *characters) |
Called for raw characters between tags. | |
virtual void | Directive (HtmlDirectiveNode *directive) |
Called for HTML directives (e.g. <!doctype foobar>). | |
virtual void | Flush () |
virtual void | DetermineEnabled (GoogleString *disabled_reason) |
virtual bool | CanModifyUrls () |
ScriptUsage | GetScriptUsage () const override |
Public Member Functions inherited from net_instaweb::HtmlFilter | |
virtual void | RenderDone () |
bool | is_enabled () const |
void | set_is_enabled (bool is_enabled) |
virtual const char * | Name () const =0 |
The name of this filter – used for logging and debugging. | |
Additional Inherited Members | |
Public Types inherited from net_instaweb::HtmlFilter | |
enum | ScriptUsage { kWillInjectScripts, kMayInjectScripts, kNeverInjectsScripts } |
Describes a filter's relationship with scripts. More... | |
Base class for rewriting filters that don't need to be sure to override every filter method. Other filters that need to be sure they override every method would derive directly from HtmlFilter.
|
inlinevirtual |
This filter and derived classes will not rewrite urls. If a derived filter wants to rewrite urls, override this function.
Implements net_instaweb::HtmlFilter.
Reimplemented in net_instaweb::RewriteFilter.
|
virtual |
Invoked by rewrite driver where all filters should determine whether they are enabled for this request. The re-writer my optionally set disabled_reason to explain why it disabled itself, which will appear in the debug output.
Implements net_instaweb::HtmlFilter.
Reimplemented in net_instaweb::CriticalSelectorFilter, net_instaweb::DelayImagesFilter, net_instaweb::CriticalCssBeaconFilter, net_instaweb::DeferIframeFilter, net_instaweb::DedupInlinedImagesFilter, net_instaweb::AddInstrumentationFilter, net_instaweb::CssCombineFilter, net_instaweb::JsDisableFilter, net_instaweb::RewriteFilter, net_instaweb::CriticalImagesBeaconFilter, net_instaweb::PushPreloadFilter, net_instaweb::InsertDnsPrefetchFilter, net_instaweb::JsDeferDisabledFilter, net_instaweb::FixReflowFilter, net_instaweb::SupportNoscriptFilter, net_instaweb::InsertAmpLinkFilter, and net_instaweb::DisableTestFilter.
|
virtual |
Note: EndDocument will be called immediately before the last Flush call. (which also means that in the RewriteDriver use it is called before rendering for the last flush window).
Implements net_instaweb::HtmlFilter.
Reimplemented in net_instaweb::CssSummarizerBase, net_instaweb::GoogleAnalyticsFilter, net_instaweb::ImageRewriteFilter, net_instaweb::ResponsiveImageSecondFilter, net_instaweb::CriticalSelectorFilter, net_instaweb::DelayImagesFilter, net_instaweb::MockFilter, net_instaweb::LocalStorageCacheFilter, net_instaweb::AmpDocumentFilter, net_instaweb::DedupInlinedImagesFilter, net_instaweb::DomainRewriteFilter, net_instaweb::CssCombineFilter, net_instaweb::CssInlineImportToLinkFilter, net_instaweb::AddInstrumentationFilter, net_instaweb::CriticalImagesBeaconFilter, net_instaweb::JsInlineFilter, net_instaweb::DebugFilter, net_instaweb::RewrittenContentScanningFilter, net_instaweb::InsertDnsPrefetchFilter, and net_instaweb::AddHeadFilter.
|
virtual |
Notifies the Filter that a flush is occurring. A filter that's generating streamed output should flush at this time. A filter that's mutating elements can mutate any element seen since the most recent flush; once an element is flushed it is already on the wire to its destination and it's too late to mutate. Flush is initiated by an application calling HttpParse::Flush().
Flush() is called after all other handlers during a HttpParse::Flush(), except RenderDone(), which (if in use) happens after Flush().
Implements net_instaweb::HtmlFilter.
Reimplemented in net_instaweb::CombiningFilter, net_instaweb::GoogleAnalyticsFilter, net_instaweb::JsCombineFilter, net_instaweb::CssInlineImportToLinkFilter, net_instaweb::CssCombineFilter, net_instaweb::MetaTagFilter, net_instaweb::ScanFilter, net_instaweb::CssOutlineFilter, net_instaweb::JsOutlineFilter, net_instaweb::DebugFilter, net_instaweb::FlushHtmlFilter, and net_instaweb::AddHeadFilter.
|
inlineoverridevirtual |
Invoked by the rewrite driver to query whether this filter may inject scripts.
Implements net_instaweb::HtmlFilter.
|
virtual |
Called for an IE directive; typically used for CSS styling. See http://msdn.microsoft.com/en-us/library/ms537512(VS.85).aspx
Implements net_instaweb::HtmlFilter.
Reimplemented in net_instaweb::GoogleAnalyticsFilter, net_instaweb::JsCombineFilter, net_instaweb::LoggingFilter, net_instaweb::JavascriptFilter, net_instaweb::CssCombineFilter, and net_instaweb::ScanFilter.
|
virtual |
Starts a new document. Filters should clear their state in this function, as the same Filter instance may be used for multiple HTML documents.
Implements net_instaweb::HtmlFilter.
Reimplemented in net_instaweb::GoogleAnalyticsFilter, net_instaweb::MockFilter, net_instaweb::CommonFilter, net_instaweb::LoggingFilter, net_instaweb::AmpDocumentFilter, net_instaweb::CssInlineImportToLinkFilter, net_instaweb::AddIdsFilter, net_instaweb::CollapseWhitespaceFilter, net_instaweb::ScanFilter, net_instaweb::FixReflowFilter, net_instaweb::BaseTagFilter, net_instaweb::HandleNoscriptRedirectFilter, net_instaweb::RewrittenContentScanningFilter, net_instaweb::CanonicalAttributes, net_instaweb::AddHeadFilter, and net_instaweb::StripSubresourceHintsFilter.
|
virtual |
When an HTML element is encountered during parsing, each filter's StartElement method is called. The HtmlElement lives for the entire duration of the document.
Implements net_instaweb::HtmlFilter.
Reimplemented in net_instaweb::GoogleAnalyticsFilter, net_instaweb::MockFilter, net_instaweb::CommonFilter, net_instaweb::LoggingFilter, net_instaweb::AmpDocumentFilter, net_instaweb::CssInlineImportToLinkFilter, net_instaweb::AddIdsFilter, net_instaweb::CollapseWhitespaceFilter, net_instaweb::HtmlAttributeQuoteRemoval, net_instaweb::ScanFilter, net_instaweb::BaseTagFilter, net_instaweb::FixReflowFilter, net_instaweb::HandleNoscriptRedirectFilter, net_instaweb::RewrittenContentScanningFilter, net_instaweb::SupportNoscriptFilter, net_instaweb::ElideAttributesFilter, net_instaweb::CanonicalAttributes, net_instaweb::AddHeadFilter, net_instaweb::PedanticFilter, net_instaweb::StripSubresourceHintsFilter, and net_instaweb::DecodeRewrittenUrlsFilter.