diff options
author | weili <weili@chromium.org> | 2016-06-18 06:25:37 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-06-18 06:25:37 -0700 |
commit | eec3a366adbfada36b98f1de651546ee09df8fc0 (patch) | |
tree | 794aa8c69392b60d8737a8a5b424732b98bdd4b4 /xfa/fde/css/fde_css.h | |
parent | 4ce94e118d66064715de5baebeb4b2b580dcac66 (diff) | |
download | pdfium-eec3a366adbfada36b98f1de651546ee09df8fc0.tar.xz |
Make code compile with clang_use_chrome_plugin (final)
This change mainly contains files in xfa/ and fxjse/ directories
which were not covered by previous changes.
This is part of the efforts to make PDFium code compilable
by Clang chromium style plugins. After this change, PDFium can be
compiled with "clang_use_chrome_plugin=true" for GN build. Since
clang_use_chrome_plugin is true by default, we no longer need to
set this parameter explicitly.
The changes are mainly the following:
-- move inline constructor/destructor of complex class/struct out-of-line;
-- add constructor/destructor of complex class/struct if not
explicitly defined;
-- add explicit out-of-line copy constructor when needed;
-- move inline virtual functions out-of-line;
-- Properly mark virtual functions with 'override';
-- some minor cleanups;
BUG=pdfium:469
Review-Url: https://codereview.chromium.org/2072803002
Diffstat (limited to 'xfa/fde/css/fde_css.h')
-rw-r--r-- | xfa/fde/css/fde_css.h | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/xfa/fde/css/fde_css.h b/xfa/fde/css/fde_css.h index 551f8f8962..a0ede3d9f7 100644 --- a/xfa/fde/css/fde_css.h +++ b/xfa/fde/css/fde_css.h @@ -690,9 +690,9 @@ class IFDE_CSSValue { class IFDE_CSSPrimitiveValue : public IFDE_CSSValue { public: - virtual FDE_CSSVALUETYPE GetType() const { - return FDE_CSSVALUETYPE_Primitive; - } + // IFDE_CSSValue + FDE_CSSVALUETYPE GetType() const override; + virtual FDE_CSSPRIMITIVETYPE GetPrimitiveType() const = 0; virtual FX_ARGB GetRGBColor() const = 0; virtual FX_FLOAT GetFloat() const = 0; @@ -705,7 +705,9 @@ class IFDE_CSSPrimitiveValue : public IFDE_CSSValue { class IFDE_CSSValueList : public IFDE_CSSValue { public: - virtual FDE_CSSVALUETYPE GetType() const { return FDE_CSSVALUETYPE_List; } + // IFDE_CSSValue + FDE_CSSVALUETYPE GetType() const override; + virtual int32_t CountValues() const = 0; virtual IFDE_CSSValue* GetValue(int32_t index) const = 0; }; @@ -715,11 +717,14 @@ class IFDE_CSSRule { virtual ~IFDE_CSSRule() {} virtual FDE_CSSRULETYPE GetType() const = 0; }; + typedef CFX_MassArrayTemplate<IFDE_CSSRule*> CFDE_CSSRuleArray; class IFDE_CSSStyleRule : public IFDE_CSSRule { public: - virtual FDE_CSSRULETYPE GetType() const { return FDE_CSSRULETYPE_Style; } + // IFDE_CSSValue + FDE_CSSRULETYPE GetType() const override; + virtual int32_t CountSelectorLists() const = 0; virtual CFDE_CSSSelector* GetSelectorList(int32_t index) const = 0; virtual CFDE_CSSDeclaration* GetDeclaration() = 0; @@ -727,7 +732,9 @@ class IFDE_CSSStyleRule : public IFDE_CSSRule { class IFDE_CSSMediaRule : public IFDE_CSSRule { public: - virtual FDE_CSSRULETYPE GetType() const { return FDE_CSSRULETYPE_Media; } + // IFDE_CSSValue + FDE_CSSRULETYPE GetType() const override; + virtual uint32_t GetMediaList() const = 0; virtual int32_t CountRules() const = 0; virtual IFDE_CSSRule* GetRule(int32_t index) = 0; @@ -735,7 +742,9 @@ class IFDE_CSSMediaRule : public IFDE_CSSRule { class IFDE_CSSFontFaceRule : public IFDE_CSSRule { public: - virtual FDE_CSSRULETYPE GetType() const { return FDE_CSSRULETYPE_FontFace; } + // IFDE_CSSValue + FDE_CSSRULETYPE GetType() const override; + virtual CFDE_CSSDeclaration* GetDeclaration() = 0; }; @@ -760,6 +769,7 @@ class IFDE_CSSStyleSheet : public IFX_Retainable { virtual int32_t CountRules() const = 0; virtual IFDE_CSSRule* GetRule(int32_t index) = 0; }; + typedef CFX_ArrayTemplate<IFDE_CSSStyleSheet*> CFDE_CSSStyleSheetArray; struct FDE_CSSLENGTH { |