khtml::CSSStyleSelector Class Reference

#include <cssstyleselector.h>

Inheritance diagram for khtml::CSSStyleSelector:

khtml::StyleSelector List of all members.

Detailed Description

the StyleSelector implementation for CSS.

Definition at line 105 of file cssstyleselector.h.


Public Types

 Unknown = 0
 Applies
 AppliesPseudo
 Invalid
 MediaAural = 1
 MediaBraille
 MediaEmboss
 MediaHandheld
 MediaPrint
 MediaProjection
 MediaScreen
 MediaTTY
 MediaTV
enum  SelectorState { Unknown = 0, Applies, AppliesPseudo, Invalid }
enum  SelectorMedia {
  MediaAural = 1, MediaBraille, MediaEmboss, MediaHandheld,
  MediaPrint, MediaProjection, MediaScreen, MediaTTY,
  MediaTV
}

Public Member Functions

 CSSStyleSelector (DOM::DocumentImpl *doc, QString userStyleSheet, DOM::StyleSheetListImpl *styleSheets, const KURL &url, bool _strictParsing)
 CSSStyleSelector (DOM::CSSStyleSheetImpl *sheet)
 ~CSSStyleSelector ()
void addSheet (DOM::CSSStyleSheetImpl *sheet)
RenderStyle * styleForElement (DOM::ElementImpl *e)
QValueVector< int > fontSizes () const
QValueVector< int > fixedFontSizes () const
void computeFontSizes (QPaintDeviceMetrics *paintDeviceMetrics, int zoomFactor)
void computeFontSizesFor (QPaintDeviceMetrics *paintDeviceMetrics, int zoomFactor, QValueVector< int > &fontSizes, bool isFixed)

Static Public Member Functions

static KDE_EXPORT void clear ()
static void reparseConfiguration ()
static void loadDefaultStyle (const KHTMLSettings *s, DOM::DocumentImpl *doc)
static void precomputeAttributeDependencies (DOM::DocumentImpl *doc, DOM::CSSSelector *sel)

Public Attributes

bool strictParsing
khtml::CSSStyleSelector::Encodedurl encodedurl

Protected Member Functions

DOM::NodeImpl * checkSubSelectors (DOM::CSSSelector *sel, DOM::NodeImpl *n, bool isAncestor)
void checkSelector (int selector, DOM::ElementImpl *e)
bool checkOneSelector (DOM::CSSSelector *selector, DOM::ElementImpl *e, bool isAncestor, bool isSubSelector=false)
void buildLists ()
void clearLists ()
void adjustRenderStyle (RenderStyle *style, DOM::ElementImpl *e)
unsigned int addInlineDeclarations (DOM::ElementImpl *e, DOM::CSSStyleDeclarationImpl *decl, unsigned int numProps)
void applyRule (int id, DOM::CSSValueImpl *value)

Protected Attributes

CSSStyleSelectorListdefaultStyle
CSSStyleSelectorListdefaultQuirksStyle
CSSStyleSelectorListdefaultPrintStyle
CSSStyleSelectorListauthorStyle
CSSStyleSelectorListuserStyle
DOM::CSSStyleSheetImpluserSheet
unsigned int selectors_size
DOM::CSSSelector ** selectors
SelectorCacheselectorCache
unsigned int properties_size
CSSOrderedProperty ** properties
QMemArray< CSSOrderedPropertyinlineProps
QString m_medium
CSSOrderedProperty ** propsToApply
CSSOrderedProperty ** pseudoProps
unsigned int propsToApplySize
unsigned int pseudoPropsSize
RenderStyle::PseudoId dynamicPseudo
RenderStyle * style
RenderStyle * parentStyle
DOM::ElementImpl * element
DOM::NodeImpl * parentNode
KHTMLViewview
KHTMLPartpart
const KHTMLSettingssettings
QPaintDeviceMetricspaintDeviceMetrics
QValueVector< int > m_fontSizes
QValueVector< int > m_fixedFontSizes
bool fontDirty

Static Protected Attributes

static DOM::CSSStyleSheetImpls_defaultSheet
static DOM::CSSStyleSheetImpls_quirksSheet
static CSSStyleSelectorLists_defaultStyle
static CSSStyleSelectorLists_defaultQuirksStyle
static CSSStyleSelectorLists_defaultPrintStyle
static RenderStyle * styleNotYetAvailable

Classes

struct  Encodedurl
struct  SelectorCache

Constructor & Destructor Documentation

khtml::CSSStyleSelector::CSSStyleSelector ( DOM::DocumentImpl *  doc,
QString  userStyleSheet,
DOM::StyleSheetListImpl styleSheets,
const KURL url,
bool  _strictParsing 
)

creates a new StyleSelector for a Document.

goes through all StyleSheets defined in the document and creates a list of rules it needs to apply to objects

Also takes into account special cases for HTML documents, including the defaultStyle (which is html only)

khtml::CSSStyleSelector::CSSStyleSelector ( DOM::CSSStyleSheetImpl sheet  ) 

same as above but for a single stylesheet.

Definition at line 252 of file cssstyleselector.cpp.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys