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) class
Mapper represents a local CSS for a Node that is used to match the Node's children. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AttributeResolver
private final List
<FontFaceRule> private final Map
<Object, Matcher.Mapper> private final StylesheetFactory
private final TreeResolver
private final Matcher.Mapper
-
Constructor Summary
ConstructorsConstructorDescriptionMatcher
(TreeResolver tr, AttributeResolver ar, StylesheetFactory factory, List<Stylesheet> stylesheets, String medium) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
addAllStylesheets
(List<Stylesheet> stylesheets, TreeMap<String, Selector> sorter, String medium) (package private) Matcher.Mapper
createDocumentMapper
(List<Stylesheet> stylesheets, String medium) getCascadedStyle
(Object e, boolean restyle) Returns CSS rulesets for descendants of e.private Ruleset
private Matcher.Mapper
private Ruleset
getPageCascadedStyle
(String pageName, String pseudoPage) getPECascadedStyle
(Object e, String pseudoElement) May return null.boolean
boolean
boolean
private static boolean
isNullOrEmpty
(String str) boolean
private void
link
(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
-