Public Member Functions | |
virtual void | StartDocument ()=0 |
virtual void | EndDocument ()=0 |
Note: EndDocument will be called imediately before the last Flush call. | |
virtual void | StartElement (HtmlElement *element)=0 |
virtual void | EndElement (HtmlElement *element)=0 |
virtual void | Cdata (HtmlCdataNode *cdata)=0 |
Called for CDATA blocks (e.g. <![CDATA[foobar]]>). | |
virtual void | Comment (HtmlCommentNode *comment)=0 |
Called for HTML comments that aren't IE directives (e.g. ). | |
virtual void | IEDirective (HtmlIEDirectiveNode *directive)=0 |
virtual void | Characters (HtmlCharactersNode *characters)=0 |
Called for raw characters between tags. | |
virtual void | Directive (HtmlDirectiveNode *directive)=0 |
Called for HTML directives (e.g. <!doctype foobar>). | |
virtual void | Flush ()=0 |
virtual const char * | Name () const =0 |
The name of this filter -- used for logging and debugging. |
virtual void net_instaweb::HtmlFilter::Flush | ( | ) | [pure 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().
Implemented in net_instaweb::EmptyHtmlFilter, net_instaweb::HtmlWriterFilter, net_instaweb::AddHeadFilter, net_instaweb::CssCombineFilter, net_instaweb::CssInlineImportToLinkFilter, net_instaweb::CssOutlineFilter, net_instaweb::FlushHtmlFilter, net_instaweb::GoogleAnalyticsFilter, net_instaweb::JavascriptFilter, net_instaweb::JsCombineFilter, net_instaweb::JsOutlineFilter, net_instaweb::MetaTagFilter, and net_instaweb::ScanFilter.
virtual void net_instaweb::HtmlFilter::IEDirective | ( | HtmlIEDirectiveNode * | directive | ) | [pure virtual] |
Called for an IE directive; typically used for CSS styling. See http://msdn.microsoft.com/en-us/library/ms537512(VS.85).aspx
Implemented in net_instaweb::EmptyHtmlFilter, net_instaweb::HtmlWriterFilter, net_instaweb::LoggingFilter, net_instaweb::CssCombineFilter, net_instaweb::CssOutlineFilter, net_instaweb::GoogleAnalyticsFilter, net_instaweb::JavascriptFilter, net_instaweb::JsCombineFilter, net_instaweb::JsOutlineFilter, and net_instaweb::ScanFilter.
virtual void net_instaweb::HtmlFilter::StartDocument | ( | ) | [pure 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.
Implemented in net_instaweb::CanonicalAttributes, net_instaweb::EmptyHtmlFilter, net_instaweb::HtmlWriterFilter, net_instaweb::LoggingFilter, net_instaweb::AddHeadFilter, net_instaweb::AddInstrumentationFilter, net_instaweb::BaseTagFilter, net_instaweb::CollapseWhitespaceFilter, net_instaweb::CommonFilter, net_instaweb::CssInlineImportToLinkFilter, net_instaweb::DelayImagesFilter, net_instaweb::DetectReflowJsDeferFilter, net_instaweb::DeterministicJsFilter, net_instaweb::DivStructureFilter, net_instaweb::GoogleAnalyticsFilter, net_instaweb::JsDeferDisabledFilter, net_instaweb::JsDisableFilter, net_instaweb::LazyloadImagesFilter, net_instaweb::ScanFilter, and net_instaweb::StripNonCacheableFilter.
virtual void net_instaweb::HtmlFilter::StartElement | ( | HtmlElement * | element | ) | [pure 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.
Implemented in net_instaweb::CanonicalAttributes, net_instaweb::EmptyHtmlFilter, net_instaweb::HtmlWriterFilter, net_instaweb::LoggingFilter, net_instaweb::AddHeadFilter, net_instaweb::AddInstrumentationFilter, net_instaweb::BaseTagFilter, net_instaweb::CollapseWhitespaceFilter, net_instaweb::CommonFilter, net_instaweb::CssInlineImportToLinkFilter, net_instaweb::DetectReflowJsDeferFilter, net_instaweb::DeterministicJsFilter, net_instaweb::DivStructureFilter, net_instaweb::ElideAttributesFilter, net_instaweb::GoogleAnalyticsFilter, net_instaweb::HtmlAttributeQuoteRemoval, net_instaweb::JsDeferDisabledFilter, net_instaweb::JsDisableFilter, net_instaweb::LazyloadImagesFilter, net_instaweb::ScanFilter, and net_instaweb::StripNonCacheableFilter.