net_instaweb::ResourceTagScanner Class Reference

List of all members.

Public Member Functions

 ResourceTagScanner (HtmlParse *html_parse)
HtmlElement::AttributeScanElement (HtmlElement *element, bool *is_hyperlink) const
void set_find_a_tags (bool val)
void set_find_form_tags (bool val)

Member Function Documentation

HtmlElement::Attribute* net_instaweb::ResourceTagScanner::ScanElement ( HtmlElement element,
bool *  is_hyperlink 
) const

Examines an HTML element to determine if it's a link to any sort of resource, extracting out the HREF or SRC. In this scanner, we don't care about the type of resource; we are just looking for anything that matches the pattern "<script src=...>", "<img src=...>", or "<link rel="stylesheet" href=...>", without worrying about what the other attributes are.

Sets *is_hyperlink to true for , <form>, and <area> tags, false otherwise. These are of interest because we generally want to apply domain-sharding for resources, but not hyperlinks.

void net_instaweb::ResourceTagScanner::set_find_a_tags ( bool  val  )  [inline]

Note: set_find_a_tags also finds "area" tags, as those are a different visualization for an anchor. If we need to split this functionality in the future we add a new bool.

Todo:
TODO(jmarantz): merge these two flags (note url_left_trim_filter.cc only sets one currently) and rename to set_find_hyperlinks.

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Tue May 29 16:34:04 2012 for Page Speed Optimization Libraries by  doxygen 1.6.3