Detailed Description

Used in a stylesheet to direct selection requests. A selector describes e.g. the parent node etc.

Public Member Functions

bool Equals (Selector selector)
 Do these selector entities match? More...
 
void GetSpecifity (int sheetPriority)
 Gets the specifity of this selector. More...
 
MatchingSelector BakeToTarget (ComputedStyle cs, CssEvent e)
 Applies a structurally matched selector to the DOM. Occurs shortly after StructureMatch. More...
 
bool StructureMatch (ComputedStyle cs, CssEvent e)
 True if this selector matches the structure of the DOM where the given CS is. More...
 
Node Test (ComputedStyle style, CssEvent e)
 call this to try to match this selector. If it matches, it will return the element which style should be applied to. More...
 
void RemoveFromDocument (StyleRule rule, ReflowDocument document, Css.StyleSheet sheet)
 Removes this selector from its parent documents caches. More...
 
void AddToDocument (StyleRule rule, ReflowDocument document, Css.StyleSheet sheet)
 Adds this selector to its parent documents caches. This is used by the default style sheet when the document gets cleared. More...
 
override string ToString ()
 Gets the selector name. More...
 

Public Attributes

int Specifity
 The computed specifity for this selector. More...
 
int RootCount
 Same as Roots.Length. There's always at least one. More...
 
StyleRule Rule
 The rule this selector belongs to. More...
 
Css.Value Value
 The complete original CSS value. More...
 
RootMatcher Target
 The root that is considered the target of this selector. Its IsTarget flag is true. More...
 
RootMatcher[] Roots
 All the roots of this selector. There's always at least one. More...
 
RootMatcher LastRoot
 Quick reference to roots[RootCount-1]. More...
 
RootMatcher FirstRoot
 Quick reference to roots[0]. More...
 
CssNamespace Namespace
 The namespace, if any, of this selector. More...
 
PseudoSelectorMatch PseudoElement
 A final call which maps the selector into a pseudo element. More...
 

Properties

bool IsUserAgent [get]
 True if this selector originated from the UA. More...
 
StyleSheet Sheet [get]
 The stylesheet this selector belongs to. More...
 
string selectorText [get]
 The selector part of the rule. More...
 

Member Function Documentation

void Css.Selector.AddToDocument ( StyleRule  rule,
ReflowDocument  document,
Css.StyleSheet  sheet 
)
inline

Adds this selector to its parent documents caches. This is used by the default style sheet when the document gets cleared.

MatchingSelector Css.Selector.BakeToTarget ( ComputedStyle  cs,
CssEvent  e 
)
inline

Applies a structurally matched selector to the DOM. Occurs shortly after StructureMatch.

bool Css.Selector.Equals ( Selector  selector)
inline

Do these selector entities match?

void Css.Selector.GetSpecifity ( int  sheetPriority)
inline

Gets the specifity of this selector.

void Css.Selector.RemoveFromDocument ( StyleRule  rule,
ReflowDocument  document,
Css.StyleSheet  sheet 
)
inline

Removes this selector from its parent documents caches.

bool Css.Selector.StructureMatch ( ComputedStyle  cs,
CssEvent  e 
)
inline

True if this selector matches the structure of the DOM where the given CS is.

Node Css.Selector.Test ( ComputedStyle  style,
CssEvent  e 
)
inline

call this to try to match this selector. If it matches, it will return the element which style should be applied to.

override string Css.Selector.ToString ( )
inline

Gets the selector name.

Member Data Documentation

RootMatcher Css.Selector.FirstRoot

Quick reference to roots[0].

RootMatcher Css.Selector.LastRoot

Quick reference to roots[RootCount-1].

CssNamespace Css.Selector.Namespace

The namespace, if any, of this selector.

PseudoSelectorMatch Css.Selector.PseudoElement

A final call which maps the selector into a pseudo element.

int Css.Selector.RootCount

Same as Roots.Length. There's always at least one.

RootMatcher [] Css.Selector.Roots

All the roots of this selector. There's always at least one.

StyleRule Css.Selector.Rule

The rule this selector belongs to.

int Css.Selector.Specifity

The computed specifity for this selector.

RootMatcher Css.Selector.Target

The root that is considered the target of this selector. Its IsTarget flag is true.

Css.Value Css.Selector.Value

The complete original CSS value.

Property Documentation

bool Css.Selector.IsUserAgent
get

True if this selector originated from the UA.

string Css.Selector.selectorText
get

The selector part of the rule.

StyleSheet Css.Selector.Sheet
get

The stylesheet this selector belongs to.