Page Speed Optimization Libraries  1.3.25.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Classes | Public Types | Public Member Functions | Static Public Member Functions | Friends
net_instaweb::HtmlName Class Reference

#include "html_name.h"

List of all members.

Classes

class  Iterator

Public Types

enum  Keyword {
  kXml, kA, kAbbr, kAction,
  kAddress, kAlt, kArea, kArticle,
  kAside, kAsync, kAudio, kAutocomplete,
  kAutofocus, kAutoplay, kB, kBackground,
  kBase, kBdi, kBdo, kBlockquote,
  kBody, kBr, kButton, kCharset,
  kChecked, kCite, kClass, kCode,
  kCol, kColgroup, kColspan, kCommand,
  kContent, kControls, kData, kDataPagespeedHref,
  kDataPagespeedPrioritize, kDataSrc, kDd, kDeclare,
  kDefaultchecked, kDefaultselected, kDefer, kDel,
  kDetails, kDfn, kDir, kDisabled,
  kDisplay, kDiv, kDl, kDt,
  kEm, kEmbed, kEnctype, kEvent,
  kFieldset, kFont, kFooter, kFor,
  kForm, kFormaction, kFormnovalidate, kFrame,
  kFrameborder, kH1, kH2, kH3,
  kH4, kH5, kH6, kHead,
  kHeader, kHeight, kHgroup, kHr,
  kHref, kHtml, kHttpEquiv, kI,
  kIcon, kId, kIframe, kImg,
  kIndeterminate, kIns, kInput, kIsmap,
  kKbd, kKeygen, kKeytype, kLang,
  kLanguage, kLi, kLink, kLoop,
  kManifest, kMark, kMarquee, kMedia,
  kMenu, kMeta, kMethod, kMultiple,
  kMuted, kName, kNav, kNoembed,
  kNohref, kNoresize, kNoscript, kNovalidate,
  kObject, kOl, kOnclick, kOnload,
  kOpen, kOptgroup, kOption, kOther,
  kP, kPagespeedBlankSrc, kPagespeedHighResSrc, kPagespeedIframe,
  kPagespeedInlineSrc, kPagespeedLazySrc, kPagespeedLowResSrc, kPagespeedLscExpiry,
  kPagespeedLscHash, kPagespeedLscUrl, kPagespeedNoDefer, kPagespeedNoTransform,
  kPagespeedOrigSrc, kPagespeedOrigType, kPagespeedSize, kPagespeedUrlHash,
  kParam, kPre, kProfile, kQ,
  kReadonly, kRel, kRequired, kReversed,
  kRowspan, kRp, kRt, kRuby,
  kS, kSamp, kScoped, kScript,
  kScrolling, kSeamless, kSection, kSelect,
  kSelected, kShape, kSmall, kSource,
  kSpan, kSrc, kStrong, kStyle,
  kSub, kTable, kTag, kTbody,
  kTd, kTest, kTextarea, kTfoot,
  kTh, kThead, kTime, kTitle,
  kTr, kTrack, kType, kU,
  kUl, kValuetype, kVar, kVideo,
  kWbr, kWidth, kWrap, kXmp,
  kNotAKeyword
}

Public Member Functions

 HtmlName (Keyword keyword, const char *str)
Keyword keyword () const
const char * c_str () const
 Return the atom string, which may not be case folded.

Static Public Member Functions

static int num_keywords ()
static Keyword Lookup (const StringPiece &name)

Friends

class HtmlNameTest

Detailed Description

HTML names are case insensitive. However, in the parser, we keep the original parsed case of the name, in addition to the html keyword enumeration, if any. Thus for both tags and attribute names, we have an enum representation which is used in filters for scanning, plus we have the original string representation.


Member Enumeration Documentation

We keep both attribute names and tag names in the same space for convenience. This list must be kept in alpha-order and in sync with the static array in html_name.cc.

Note that this list does not need to cover all HTML keywords -- only the ones that we are interested in for rewriting.

Enumerator:
kXml 

?Xml


Constructor & Destructor Documentation

net_instaweb::HtmlName::HtmlName ( Keyword  keyword,
const char *  str 
) [inline]

Constructs an HTML name given a keyword, which can be HtmlName::kNotAKeyword, and 'const char* str'. 'str' is used to retain the case-sensitive spelling of the keyword. The storage for 'str' must be managed, and must be guaranteed valid throughout the life of the HtmlName.


Member Function Documentation

Returns the keyword enumeration for this HTML Name. Note that keyword lookup is case-insensitive.


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