Package com.openhtmltopdf.css.newmatch
Class Matcher
java.lang.Object
com.openhtmltopdf.css.newmatch.Matcher
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class(package private) classMapper represents a local CSS for a Node that is used to match the Node's children. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AttributeResolverprivate final List<FontFaceRule> private final Map<Object, Matcher.Mapper> private final StylesheetFactoryprivate final TreeResolverprivate final Matcher.Mapper -
Constructor Summary
ConstructorsConstructorDescriptionMatcher(TreeResolver tr, AttributeResolver ar, StylesheetFactory factory, List<Stylesheet> stylesheets, String medium) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddAllStylesheets(List<Stylesheet> stylesheets, TreeMap<String, Selector> sorter, String medium) (package private) Matcher.MappercreateDocumentMapper(List<Stylesheet> stylesheets, String medium) getCascadedStyle(Object e, boolean restyle) Returns CSS rulesets for descendants of e.private Rulesetprivate Matcher.Mapperprivate RulesetgetPageCascadedStyle(String pageName, String pseudoPage) getPECascadedStyle(Object e, String pseudoElement) May return null.booleanbooleanbooleanprivate static booleanisNullOrEmpty(String str) booleanprivate voidlink(Object e, Matcher.Mapper m) protected Matcher.Mapper
-
Field Details
-
docMapper
-
_attRes
-
_treeRes
-
_styleFactory
-
_map
-
_hoverElements
-
_activeElements
-
_focusElements
-
_visitElements
-
_pageRules
-
_fontFaceRules
-
-
Constructor Details
-
Matcher
public Matcher(TreeResolver tr, AttributeResolver ar, StylesheetFactory factory, List<Stylesheet> stylesheets, String medium)
-
-
Method Details
-
getCascadedStyle
-
getCSSForAllDescendants
Returns CSS rulesets for descendants of e. For example, if e is an svg element and we have the ruleset 'svg rect { .. }' then the string returned will be 'rect { .. }'. FIXME: Does not correctly handle sibling selectors. -
getPECascadedStyle
May return null. We assume that restyle has already been done by a getCascadedStyle if necessary. -
getPageCascadedStyle
-
getFontFaceRules
-
isVisitedStyled
-
isHoverStyled
-
isActiveStyled
-
isFocusStyled
-
matchElement
-
createDocumentMapper
-
addAllStylesheets
-
link
-
getMapper
-
isNullOrEmpty
-
getElementStyle
-
getNonCssStyle
-