summaryrefslogtreecommitdiff
path: root/xfa/fde/css/fde_cssstylesheet.h
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-01-16 16:03:44 -0500
committerChromium commit bot <commit-bot@chromium.org>2017-01-16 21:14:58 +0000
commitcfb856c4744a9e0ff0f0db5602d0a13c835570ce (patch)
tree8880b3041fd6d780a630ba49813a17a608b83d35 /xfa/fde/css/fde_cssstylesheet.h
parent135609831bcad2da79d720cfdd3b55929b48b0ea (diff)
downloadpdfium-cfb856c4744a9e0ff0f0db5602d0a13c835570ce.tar.xz
Remove IFDE_CSS interfaces which are only implemented once.
This CL cleans up some interface classes from FDE CSS. Change-Id: I975e5d63f8ae6a0bc7bb849b6f11f0ae43092e4d Reviewed-on: https://pdfium-review.googlesource.com/2177 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fde/css/fde_cssstylesheet.h')
-rw-r--r--xfa/fde/css/fde_cssstylesheet.h55
1 files changed, 27 insertions, 28 deletions
diff --git a/xfa/fde/css/fde_cssstylesheet.h b/xfa/fde/css/fde_cssstylesheet.h
index 0d038c9eb5..2fc195c9dd 100644
--- a/xfa/fde/css/fde_cssstylesheet.h
+++ b/xfa/fde/css/fde_cssstylesheet.h
@@ -38,33 +38,36 @@ class CFDE_CSSSelector {
CFDE_CSSSelector* m_pNext;
};
-class CFDE_CSSStyleRule : public IFDE_CSSStyleRule {
+class CFDE_CSSStyleRule : public IFDE_CSSRule {
public:
CFDE_CSSStyleRule();
- // IFDE_CSSStyleRule
- int32_t CountSelectorLists() const override;
- CFDE_CSSSelector* GetSelectorList(int32_t index) const override;
- CFDE_CSSDeclaration* GetDeclaration() override;
+ // IFDE_CSSRule
+ FDE_CSSRuleType GetType() const override;
+ int32_t CountSelectorLists() const;
+ CFDE_CSSSelector* GetSelectorList(int32_t index) const;
+ CFDE_CSSDeclaration* GetDeclaration();
CFDE_CSSDeclaration& GetDeclImp() { return m_Declaration; }
void SetSelector(const CFX_ArrayTemplate<CFDE_CSSSelector*>& list);
- protected:
+ private:
CFDE_CSSDeclaration m_Declaration;
CFDE_CSSSelector** m_ppSelector;
int32_t m_iSelectors;
};
-class CFDE_CSSMediaRule : public IFDE_CSSMediaRule {
+class CFDE_CSSMediaRule : public IFDE_CSSRule {
public:
explicit CFDE_CSSMediaRule(uint32_t dwMediaList);
~CFDE_CSSMediaRule() override;
- // IFDE_CSSMediaRule
- uint32_t GetMediaList() const override;
- int32_t CountRules() const override;
- IFDE_CSSRule* GetRule(int32_t index) override;
+ // IFDE_CSSValue
+ FDE_CSSRuleType GetType() const override;
+
+ uint32_t GetMediaList() const;
+ int32_t CountRules() const;
+ IFDE_CSSRule* GetRule(int32_t index);
CFX_MassArrayTemplate<IFDE_CSSRule*>& GetArray() { return m_RuleArray; }
@@ -73,39 +76,35 @@ class CFDE_CSSMediaRule : public IFDE_CSSMediaRule {
CFX_MassArrayTemplate<IFDE_CSSRule*> m_RuleArray;
};
-class CFDE_CSSFontFaceRule : public IFDE_CSSFontFaceRule {
+class CFDE_CSSFontFaceRule : public IFDE_CSSRule {
public:
- // IFDE_CSSFontFaceRule
- CFDE_CSSDeclaration* GetDeclaration() override;
+ // IFDE_CSSRule.
+ FDE_CSSRuleType GetType() const override;
CFDE_CSSDeclaration& GetDeclImp() { return m_Declaration; }
- protected:
+ private:
CFDE_CSSDeclaration m_Declaration;
};
-class CFDE_CSSStyleSheet : public IFDE_CSSStyleSheet {
+class CFDE_CSSStyleSheet : public IFX_Retainable {
public:
- explicit CFDE_CSSStyleSheet(uint32_t dwMediaList);
+ CFDE_CSSStyleSheet();
~CFDE_CSSStyleSheet() override;
// IFX_Retainable:
uint32_t Retain() override;
uint32_t Release() override;
- // IFDE_CSSStyleSheet:
- bool GetUrl(CFX_WideString& szUrl) override;
- uint32_t GetMediaList() const override;
- uint16_t GetCodePage() const override;
- int32_t CountRules() const override;
- IFDE_CSSRule* GetRule(int32_t index) override;
+ bool LoadFromBuffer(const FX_WCHAR* pBuffer, int32_t iBufSize);
- bool LoadFromBuffer(const CFX_WideString& szUrl,
- const FX_WCHAR* pBuffer,
- int32_t iBufSize,
- uint16_t wCodePage);
+ bool GetUrl(CFX_WideString& szUrl);
+ uint32_t GetMediaList() const;
+ uint16_t GetCodePage() const;
+ int32_t CountRules() const;
+ IFDE_CSSRule* GetRule(int32_t index);
- protected:
+ private:
void Reset();
bool LoadFromSyntax(CFDE_CSSSyntaxParser* pSyntax);
FDE_CSSSyntaxStatus LoadStyleRule(