Page Speed Optimization Libraries  1.4.26.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Attributes | Protected Member Functions
net_instaweb::CriticalSelectorFilter Class Reference
Inheritance diagram for net_instaweb::CriticalSelectorFilter:
net_instaweb::CssSummarizerBase net_instaweb::RewriteFilter net_instaweb::CommonFilter net_instaweb::EmptyHtmlFilter net_instaweb::HtmlFilter

List of all members.

Public Member Functions

 CriticalSelectorFilter (RewriteDriver *rewrite_driver)
virtual const char * Name () const
 The name of this filter -- used for logging and debugging.
virtual const char * id () const

Static Public Attributes

static const char kAddStylesScript []
static const char kSummarizedCssProperty []

Protected Member Functions

virtual void Summarize (Css::Stylesheet *stylesheet, GoogleString *out) const
virtual void SummariesDone ()
virtual GoogleString CacheKeySuffix () const
virtual void NotifyInlineCss (HtmlElement *style_element, HtmlCharactersNode *content)
virtual void NotifyExternalCss (HtmlElement *link)
virtual void StartDocumentImpl ()
 Parser callbacks.
virtual void EndDocument ()
 Note: EndDocument will be called imediately before the last Flush call.
virtual void EndElementImpl (HtmlElement *element)

Member Function Documentation

Since our computation depends on the selectors that are relevant to the webpage, we incorporate them into the cache key as well.

Reimplemented from net_instaweb::CssSummarizerBase.

virtual void net_instaweb::CriticalSelectorFilter::NotifyInlineCss ( HtmlElement style_element,
HtmlCharactersNode content 
) [protected, virtual]

Overrides of CssSummarizerBase CSS notification API. These hand us the entirety of CSS, so we can handle it with lower priority.

Reimplemented from net_instaweb::CssSummarizerBase.

virtual void net_instaweb::CriticalSelectorFilter::SummariesDone ( ) [protected, virtual]

This is called at the end of the document when all outstanding summary computations have completed, regardless of whether successful or not. It will not be called at all if they are still ongoing, however.

It's called from a context which allows HTML parser state access. You can insert things at end of document by constructing an HtmlNode* using the factories in HtmlParse and calling InjectSummaryData(element).

Implements net_instaweb::CssSummarizerBase.

virtual void net_instaweb::CriticalSelectorFilter::Summarize ( Css::Stylesheet *  stylesheet,
GoogleString out 
) const [protected, virtual]

Overrides of CssSummarizerBase summary API. These help us compute the critical portions of the various fragments in the page, and to write them out to the property cache.

Implements net_instaweb::CssSummarizerBase.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines