khtml::CSSStyleSelector

#include <cssstyleselector.h>

Inheritance diagram for khtml::CSSStyleSelector:

Public Types

enum  SelectorMedia {
  MediaAural = 1, MediaBraille, MediaEmboss, MediaHandheld,
  MediaPrint, MediaProjection, MediaScreen, MediaTTY,
  MediaTV
}
 
enum  SelectorState { Unknown = 0, Applies, AppliesPseudo, Invalid }
 
- Public Types inherited from khtml::StyleSelector
enum  State { None = 0x00, Hover = 0x01, Focus = 0x02, Active = 0x04 }
 

Public Member Functions

 CSSStyleSelector (DOM::DocumentImpl *doc, QString userStyleSheet, DOM::StyleSheetListImpl *styleSheets, const QUrl &url, bool _strictParsing)
 
 CSSStyleSelector (DOM::CSSStyleSheetImpl *sheet)
 
void addSheet (DOM::CSSStyleSheetImpl *sheet)
 
void addViewportDependentMediaQueryResult (const MediaQueryExp *, bool result)
 
bool affectedByViewportChange () const
 
void computeFontSizes (int logicalDpiY, int zoomFactor)
 
void computeFontSizesFor (int logicalDpiY, int zoomFactor, QVector< int > &fontSizes, bool isFixed)
 
QVector< int > fixedFontSizes () const
 
DOM::CSSFontSelector * fontSelector () const
 
QVector< int > fontSizes () const
 
bool isMatchedByAnySelector (DOM::ElementImpl *e, const QList< DOM::CSSSelector * > &sels)
 
RenderStyle * styleForElement (DOM::ElementImpl *e, RenderStyle *fallbackParentStyle=nullptr)
 

Static Public Member Functions

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

Public Attributes

struct khtml::CSSStyleSelector::Encodedurl encodedurl
 
bool strictParsing
 

Protected Types

enum  SelectorMatch { SelectorMatches = 0, SelectorFailsLocal, SelectorFails }
 

Protected Member Functions

void addDependency (int dependencyType, DOM::ElementImpl *dependency)
 
void addInlineDeclarations (DOM::ElementImpl *e)
 
void adjustRenderStyle (RenderStyle *style, DOM::ElementImpl *e)
 
void applyRule (int id, DOM::CSSValueImpl *value)
 
void applySVGRule (int id, DOM::CSSValueImpl *value)
 
void buildLists ()
 
void checkSelector (int selector, DOM::ElementImpl *e)
 
SelectorMatch checkSelector (DOM::CSSSelector *sel, DOM::ElementImpl *e, bool isAncestor, bool isSubSelector=false)
 
bool checkSimpleSelector (DOM::CSSSelector *selector, DOM::ElementImpl *e, bool isAncestor, bool isSubSelector=false)
 
void clearLists ()
 
RenderStyle * locateSimilarStyle ()
 
void prepareToMatchElement (DOM::ElementImpl *e, bool withDeps)
 
void setupDefaultRootStyle (DOM::DocumentImpl *d=nullptr)
 

Protected Attributes

CSSStyleSelectorList * authorStyle
 
WTF::HashSet< quintptr > classCache
 
WTF::HashMap< quintptr, int > classSelector
 
CSSStyleSelectorList * defaultNonCSSHintsStyle
 
CSSStyleSelectorList * defaultPrintStyle
 
CSSStyleSelectorList * defaultQuirksStyle
 
CSSStyleSelectorList * defaultStyle
 
RenderStyle::PseudoId dynamicPseudo
 
DOM::ElementImpl * element
 
bool fontDirty
 
WTF::HashSet< quintptr > idCache
 
WTF::HashMap< quintptr, int > idSelector
 
CSSStyleSelectorList * implicitStyle
 
QVarLengthArray< CSSOrderedProperty > inlineProps
 
int logicalDpiY
 
QVector< int > m_fixedFontSizes
 
DOM::CSSFontSelector * m_fontSelector
 
QVector< int > m_fontSizes
 
MediaQueryEvaluatorm_medium
 
int m_minFontSize
 
RenderStyle * m_rootDefaultStyle
 
RenderStyle * m_rootStyle
 
QList< MediaQueryResult * > m_viewportDependentMediaQueryResults
 
unsigned * nextPropertyIndexes
 
unsigned * nextSimilarSelector
 
int otherSelector
 
DOM::NodeImpl * parentNode
 
RenderStyle * parentStyle
 
KHTMLPartpart
 
unsigned int properties_size
 
CSSOrderedProperty * propertiesBuffer
 
WTF::Vector< CSSOrderedProperty * > propsToApply
 
WTF::Vector< CSSOrderedProperty * > pseudoProps
 
bool rememberDependencies
 
SelectorCache * selectorCache
 
DOM::CSSSelector ** selectors
 
unsigned int selectors_size
 
const KHTMLSettingssettings
 
RenderStyle * style
 
WTF::HashSet< unsigned > tagCache
 
WTF::HashMap< unsigned, int > tagSelector
 
DOM::CSSStyleSheetImpl * userSheet
 
CSSStyleSelectorList * userStyle
 
KHTMLViewview
 

Static Protected Attributes

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

Detailed Description

the StyleSelector implementation for CSS.

Definition at line 167 of file cssstyleselector.h.

Constructor & Destructor Documentation

khtml::CSSStyleSelector::CSSStyleSelector ( DOM::DocumentImpl doc,
QString  userStyleSheet,
DOM::StyleSheetListImpl *  styleSheets,
const QUrl 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 228 of file cssstyleselector.cpp.

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

same as above but for a single stylesheet.

Definition at line 312 of file cssstyleselector.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Fri Sep 18 2020 22:45:50 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.