Search for usage in LXR

#include <cssstyleselector.h>

Inheritance diagram for khtml::CSSStyleSelector:

Public Types

enum  SelectorMedia {
  MediaAural = 1, MediaBraille, MediaEmboss, MediaHandheld,
  MediaPrint, MediaProjection, MediaScreen, MediaTTY,
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::CSSStyleSheetImpl *sheet)
 CSSStyleSelector (DOM::DocumentImpl *doc, QString userStyleSheet, DOM::StyleSheetListImpl *styleSheets, const QUrl &url, bool _strictParsing)
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 ()
SelectorMatch checkSelector (DOM::CSSSelector *sel, DOM::ElementImpl *e, bool isAncestor, bool isSubSelector=false)
void checkSelector (int selector, DOM::ElementImpl *e)
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
int m_minFontSize
RenderStyle * m_rootDefaultStyle
RenderStyle * m_rootStyle
QList< MediaQueryResult * > m_viewportDependentMediaQueryResults
unsigned * nextPropertyIndexes
unsigned * nextSimilarSelector
int otherSelector
DOM::NodeImpl * parentNode
RenderStyle * parentStyle
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

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

◆ CSSStyleSelector() [1/2]

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 226 of file cssstyleselector.cpp.

◆ CSSStyleSelector() [2/2]

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

same as above but for a single stylesheet.

Definition at line 310 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-2023 The KDE developers.
Generated on Mon Dec 11 2023 04:06:53 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.