summaryrefslogtreecommitdiff
path: root/xfa/fde/css/cfde_cssstyleselector.h
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-01-23 13:55:39 -0500
committerChromium commit bot <commit-bot@chromium.org>2017-01-23 20:24:23 +0000
commitb76f49b36baffea2b2ecb90d67c7b6bb734e7bb9 (patch)
tree3331545c1296500ddf164267f4bb715c16e38bb3 /xfa/fde/css/cfde_cssstyleselector.h
parent6414b273506f97012f82c8a32c020b483d5df31a (diff)
downloadpdfium-b76f49b36baffea2b2ecb90d67c7b6bb734e7bb9.tar.xz
Remove unused author and and user stylesheets
We only load atyles from the CXFA_TextParser which loads a static UserAgent stylesheet. This CL removes the User and Author styles from the system and simplifies the storage of the stylesheets. Change-Id: I7abcf39333655f8dd6bc2cfe685c8cf73b779c7d Reviewed-on: https://pdfium-review.googlesource.com/2293 Reviewed-by: Nicolás Peña <npm@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fde/css/cfde_cssstyleselector.h')
-rw-r--r--xfa/fde/css/cfde_cssstyleselector.h15
1 files changed, 5 insertions, 10 deletions
diff --git a/xfa/fde/css/cfde_cssstyleselector.h b/xfa/fde/css/cfde_cssstyleselector.h
index 1ddb67243c..4d6a7c8ed2 100644
--- a/xfa/fde/css/cfde_cssstyleselector.h
+++ b/xfa/fde/css/cfde_cssstyleselector.h
@@ -33,11 +33,8 @@ class CFDE_CSSStyleSelector {
void SetDefFontSize(FX_FLOAT fFontSize);
- bool SetStyleSheet(FDE_CSSStyleSheetGroup eType, CFDE_CSSStyleSheet* pSheet);
- bool SetStyleSheets(FDE_CSSStyleSheetGroup eType,
- const CFX_ArrayTemplate<CFDE_CSSStyleSheet*>* pArray);
- void SetStylePriority(FDE_CSSStyleSheetGroup eType,
- FDE_CSSStyleSheetPriority ePriority);
+ void SetUAStyleSheet(std::unique_ptr<CFDE_CSSStyleSheet> pSheet);
+
void UpdateStyleIndex();
CFDE_CSSAccelerator* InitAccelerator();
CFDE_CSSComputedStyle* CreateComputedStyle(
@@ -51,8 +48,7 @@ class CFDE_CSSStyleSelector {
int32_t iDeclCount,
CFDE_CSSComputedStyle* pDestStyle);
- protected:
- void Reset();
+ private:
void MatchRules(CFDE_CSSTagCache* pCache,
CFDE_CSSRuleCollection::Data* pList,
FDE_CSSPseudo ePseudoType);
@@ -85,9 +81,8 @@ class CFDE_CSSStyleSelector {
CFGAS_FontMgr* const m_pFontMgr;
FX_FLOAT m_fDefFontSize;
- CFX_ArrayTemplate<CFDE_CSSStyleSheet*> m_SheetGroups[3];
- CFDE_CSSRuleCollection m_RuleCollection[3];
- FDE_CSSStyleSheetGroup m_ePriorities[3];
+ std::unique_ptr<CFDE_CSSStyleSheet> m_UAStyles;
+ CFDE_CSSRuleCollection m_UARules;
std::unique_ptr<CFDE_CSSAccelerator> m_pAccelerator;
std::vector<CFDE_CSSRuleCollection::Data*> m_MatchedRules;
};