diff options
Diffstat (limited to 'xfa/fde/css/cfde_cssstyleselector.h')
-rw-r--r-- | xfa/fde/css/cfde_cssstyleselector.h | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/xfa/fde/css/cfde_cssstyleselector.h b/xfa/fde/css/cfde_cssstyleselector.h index 15bce93334..b4eaa685ae 100644 --- a/xfa/fde/css/cfde_cssstyleselector.h +++ b/xfa/fde/css/cfde_cssstyleselector.h @@ -15,45 +15,44 @@ #include "xfa/fde/css/cfde_cssrulecollection.h" #include "xfa/fde/css/fde_css.h" -class CFDE_CSSAccelerator; class CFDE_CSSComputedStyle; class CFDE_CSSCustomProperty; class CFDE_CSSDeclaration; class CFDE_CSSPropertyHolder; class CFDE_CSSSelector; class CFDE_CSSStyleSheet; -class CFDE_CSSTagCache; class CFDE_CSSValue; class CFDE_CSSValueList; class CFGAS_FontMgr; -class CXFA_CSSTagProvider; class CFDE_CSSStyleSelector { public: explicit CFDE_CSSStyleSelector(CFGAS_FontMgr* pFontMgr); ~CFDE_CSSStyleSelector(); - CFDE_CSSAccelerator* InitAccelerator(); - void SetDefFontSize(FX_FLOAT fFontSize); void SetUAStyleSheet(std::unique_ptr<CFDE_CSSStyleSheet> pSheet); void UpdateStyleIndex(); CFX_RetainPtr<CFDE_CSSComputedStyle> CreateComputedStyle( CFDE_CSSComputedStyle* pParentStyle); - void ComputeStyle(CXFA_CSSTagProvider* pTag, - const std::vector<const CFDE_CSSDeclaration*>& declArray, + + // Note, the dest style has to be an out param because the CXFA_TextParser + // adds non-inherited data from the parent style. Attempting to copy + // internally will fail as you'll lose the non-inherited data. + void ComputeStyle(const std::vector<const CFDE_CSSDeclaration*>& declArray, + const CFX_WideString& styleString, + const CFX_WideString& alignString, CFDE_CSSComputedStyle* pDestStyle); std::vector<const CFDE_CSSDeclaration*> MatchDeclarations( - CXFA_CSSTagProvider* pTag); + const CFX_WideString& tagname); private: - bool MatchSelector(CFDE_CSSTagCache* pCache, CFDE_CSSSelector* pSel); + bool MatchSelector(const CFX_WideString& tagname, CFDE_CSSSelector* pSel); void AppendInlineStyle(CFDE_CSSDeclaration* pDecl, - const FX_WCHAR* psz, - int32_t iLen); + const CFX_WideString& style); void ApplyDeclarations( const std::vector<const CFDE_CSSDeclaration*>& declArray, const CFDE_CSSDeclaration* extraDecl, @@ -83,7 +82,6 @@ class CFDE_CSSStyleSelector { FX_FLOAT m_fDefFontSize; std::unique_ptr<CFDE_CSSStyleSheet> m_UAStyles; CFDE_CSSRuleCollection m_UARules; - std::unique_ptr<CFDE_CSSAccelerator> m_pAccelerator; }; #endif // XFA_FDE_CSS_CFDE_CSSSTYLESELECTOR_H_ |