khtml Library API Documentation

khtml::CSSStyleSelector Class Reference

the StyleSelector implementation for CSS. More...

#include <cssstyleselector.h>

Inheritance diagram for khtml::CSSStyleSelector:

khtml::StyleSelector List of all members.

Public Types

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)
void addSheet (DOM::CSSStyleSheetImpl *sheet)
RenderStyle * styleForElement (DOM::ElementImpl *e)
QValueList< int > fontSizes () const
QValueList< int > fixedFontSizes () const
void computeFontSizes (QPaintDeviceMetrics *paintDeviceMetrics, int zoomFactor)
void computeFontSizesFor (QPaintDeviceMetrics *paintDeviceMetrics, int zoomFactor, QValueList< int > &fontSizes, bool isFixed)

Static Public Member Functions

void clear ()
void reparseConfiguration ()
void loadDefaultStyle (const KHTMLSettings *s=0)

Public Attributes

bool strictParsing
khtml::CSSStyleSelector::Encodedurl encodedurl

Protected Member Functions

void checkSelector (int selector, DOM::ElementImpl *e)
bool checkOneSelector (DOM::CSSSelector *selector, DOM::ElementImpl *e)
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

CSSStyleSelectorList * defaultStyle
CSSStyleSelectorList * defaultQuirksStyle
CSSStyleSelectorList * defaultPrintStyle
CSSStyleSelectorList * authorStyle
CSSStyleSelectorList * userStyle
DOM::CSSStyleSheetImpl * userSheet
unsigned int selectors_size
DOM::CSSSelector ** selectors
SelectorCache * selectorCache
unsigned int properties_size
CSSOrderedProperty ** properties
QMemArray< CSSOrderedProperty > inlineProps
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
QValueList< int > m_fontSizes
QValueList< int > m_fixedFontSizes
bool fontDirty

Static Protected Attributes

DOM::CSSStyleSheetImpl * s_defaultSheet
DOM::CSSStyleSheetImpl * s_quirksSheet
CSSStyleSelectorList * s_defaultStyle
CSSStyleSelectorList * s_defaultQuirksStyle
CSSStyleSelectorList * s_defaultPrintStyle
RenderStyle * styleNotYetAvailable

Detailed Description

the StyleSelector implementation for CSS.

Definition at line 104 of file cssstyleselector.h.


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)

Definition at line 119 of file cssstyleselector.cpp.

References QPtrListIterator::current(), QString::isEmpty(), KHTMLView::mediaType(), KHTMLView::part(), KURL::setPath(), KURL::setQuery(), KURL::setRef(), KHTMLPart::settings(), KURL::url(), and KHTMLPart::zoomFactor().

khtml::CSSStyleSelector::CSSStyleSelector DOM::CSSStyleSheetImpl *  sheet  ) 
 

same as above but for a single stylesheet.

Definition at line 180 of file cssstyleselector.cpp.

References KHTMLView::mediaType().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for khtml Library Version 3.2.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Mar 4 22:45:49 2004 by doxygen 1.3.6-20040222 written by Dimitri van Heesch, © 1997-2003