Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(147)

Side by Side Diff: xfa/fde/css/fde_css.h

Issue 1821043003: Remove FX_WORD in favor of uint16_t. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Use stdint.h directly, bitfield minefield. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « xfa/fde/css/#fde_cssstyleselector.h# ('k') | xfa/fde/css/fde_cssdatatable.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef XFA_FDE_CSS_FDE_CSS_H_ 7 #ifndef XFA_FDE_CSS_FDE_CSS_H_
8 #define XFA_FDE_CSS_FDE_CSS_H_ 8 #define XFA_FDE_CSS_FDE_CSS_H_
9 9
10 #include "core/include/fxge/fx_dib.h" 10 #include "core/include/fxge/fx_dib.h"
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 public: 436 public:
437 virtual FDE_CSSRULETYPE GetType() const { return FDE_CSSRULETYPE_FontFace; } 437 virtual FDE_CSSRULETYPE GetType() const { return FDE_CSSRULETYPE_FontFace; }
438 virtual IFDE_CSSDeclaration* GetDeclaration() const = 0; 438 virtual IFDE_CSSDeclaration* GetDeclaration() const = 0;
439 }; 439 };
440 class IFDE_CSSStyleSheet : public IFX_Unknown { 440 class IFDE_CSSStyleSheet : public IFX_Unknown {
441 public: 441 public:
442 static IFDE_CSSStyleSheet* LoadHTMLStandardStyleSheet(); 442 static IFDE_CSSStyleSheet* LoadHTMLStandardStyleSheet();
443 static IFDE_CSSStyleSheet* LoadFromStream( 443 static IFDE_CSSStyleSheet* LoadFromStream(
444 const CFX_WideString& szUrl, 444 const CFX_WideString& szUrl,
445 IFX_Stream* pStream, 445 IFX_Stream* pStream,
446 FX_WORD wCodePage, 446 uint16_t wCodePage,
447 FX_DWORD dwMediaList = FDE_CSSMEDIATYPE_ALL); 447 FX_DWORD dwMediaList = FDE_CSSMEDIATYPE_ALL);
448 static IFDE_CSSStyleSheet* LoadFromBuffer( 448 static IFDE_CSSStyleSheet* LoadFromBuffer(
449 const CFX_WideString& szUrl, 449 const CFX_WideString& szUrl,
450 const FX_WCHAR* pBuffer, 450 const FX_WCHAR* pBuffer,
451 int32_t iBufSize, 451 int32_t iBufSize,
452 FX_WORD wCodePage, 452 uint16_t wCodePage,
453 FX_DWORD dwMediaList = FDE_CSSMEDIATYPE_ALL); 453 FX_DWORD dwMediaList = FDE_CSSMEDIATYPE_ALL);
454 virtual FX_BOOL GetUrl(CFX_WideString& szUrl) = 0; 454 virtual FX_BOOL GetUrl(CFX_WideString& szUrl) = 0;
455 virtual FX_DWORD GetMediaList() const = 0; 455 virtual FX_DWORD GetMediaList() const = 0;
456 virtual FX_WORD GetCodePage() const = 0; 456 virtual uint16_t GetCodePage() const = 0;
457 457
458 virtual int32_t CountRules() const = 0; 458 virtual int32_t CountRules() const = 0;
459 virtual IFDE_CSSRule* GetRule(int32_t index) = 0; 459 virtual IFDE_CSSRule* GetRule(int32_t index) = 0;
460 }; 460 };
461 typedef CFX_ArrayTemplate<IFDE_CSSStyleSheet*> CFDE_CSSStyleSheetArray; 461 typedef CFX_ArrayTemplate<IFDE_CSSStyleSheet*> CFDE_CSSStyleSheetArray;
462 #define FDE_CSSUSERSTYLESHEET (FX_BSTRC("#USERSHEET")) 462 #define FDE_CSSUSERSTYLESHEET (FX_BSTRC("#USERSHEET"))
463 #define FDE_CSSUAGENTSTYLESHEET (FX_BSTRC("#AGENTSHEET")) 463 #define FDE_CSSUAGENTSTYLESHEET (FX_BSTRC("#AGENTSHEET"))
464 class IFDE_CSSStyleSheetCache { 464 class IFDE_CSSStyleSheetCache {
465 public: 465 public:
466 static IFDE_CSSStyleSheetCache* Create(); 466 static IFDE_CSSStyleSheetCache* Create();
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 virtual FX_BOOL GetCounterIncrement(int32_t index, int32_t& iValue) = 0; 859 virtual FX_BOOL GetCounterIncrement(int32_t index, int32_t& iValue) = 0;
860 virtual IFDE_CSSValueList* GetContent() const = 0; 860 virtual IFDE_CSSValueList* GetContent() const = 0;
861 virtual int32_t CountQuotes() const = 0; 861 virtual int32_t CountQuotes() const = 0;
862 virtual const FX_WCHAR* GetQuotes(int32_t index) const = 0; 862 virtual const FX_WCHAR* GetQuotes(int32_t index) const = 0;
863 }; 863 };
864 class IFDE_CSSFontStyle { 864 class IFDE_CSSFontStyle {
865 public: 865 public:
866 virtual ~IFDE_CSSFontStyle() {} 866 virtual ~IFDE_CSSFontStyle() {}
867 virtual int32_t CountFontFamilies() const = 0; 867 virtual int32_t CountFontFamilies() const = 0;
868 virtual const FX_WCHAR* GetFontFamily(int32_t index) const = 0; 868 virtual const FX_WCHAR* GetFontFamily(int32_t index) const = 0;
869 virtual FX_WORD GetFontWeight() const = 0; 869 virtual uint16_t GetFontWeight() const = 0;
870 virtual FDE_CSSFONTVARIANT GetFontVariant() const = 0; 870 virtual FDE_CSSFONTVARIANT GetFontVariant() const = 0;
871 virtual FDE_CSSFONTSTYLE GetFontStyle() const = 0; 871 virtual FDE_CSSFONTSTYLE GetFontStyle() const = 0;
872 virtual FX_FLOAT GetFontSize() const = 0; 872 virtual FX_FLOAT GetFontSize() const = 0;
873 virtual FX_ARGB GetColor() const = 0; 873 virtual FX_ARGB GetColor() const = 0;
874 virtual void SetFontWeight(FX_WORD wFontWeight) = 0; 874 virtual void SetFontWeight(uint16_t wFontWeight) = 0;
875 virtual void SetFontVariant(FDE_CSSFONTVARIANT eFontVariant) = 0; 875 virtual void SetFontVariant(FDE_CSSFONTVARIANT eFontVariant) = 0;
876 virtual void SetFontStyle(FDE_CSSFONTSTYLE eFontStyle) = 0; 876 virtual void SetFontStyle(FDE_CSSFONTSTYLE eFontStyle) = 0;
877 virtual void SetFontSize(FX_FLOAT fFontSize) = 0; 877 virtual void SetFontSize(FX_FLOAT fFontSize) = 0;
878 virtual void SetColor(FX_ARGB dwFontColor) = 0; 878 virtual void SetColor(FX_ARGB dwFontColor) = 0;
879 }; 879 };
880 class IFDE_CSSBoundaryStyle { 880 class IFDE_CSSBoundaryStyle {
881 public: 881 public:
882 virtual ~IFDE_CSSBoundaryStyle() {} 882 virtual ~IFDE_CSSBoundaryStyle() {}
883 virtual FX_ARGB GetBorderLeftColor() const = 0; 883 virtual FX_ARGB GetBorderLeftColor() const = 0;
884 virtual FX_ARGB GetBorderTopColor() const = 0; 884 virtual FX_ARGB GetBorderTopColor() const = 0;
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
1073 IFDE_CSSTagProvider* pTag, 1073 IFDE_CSSTagProvider* pTag,
1074 CFDE_CSSDeclarationArray& matchedDecls, 1074 CFDE_CSSDeclarationArray& matchedDecls,
1075 FDE_CSSPERSUDO ePersudoType = FDE_CSSPERSUDO_NONE) = 0; 1075 FDE_CSSPERSUDO ePersudoType = FDE_CSSPERSUDO_NONE) = 0;
1076 virtual void ComputeStyle(IFDE_CSSTagProvider* pTag, 1076 virtual void ComputeStyle(IFDE_CSSTagProvider* pTag,
1077 const IFDE_CSSDeclaration** ppDeclArray, 1077 const IFDE_CSSDeclaration** ppDeclArray,
1078 int32_t iDeclCount, 1078 int32_t iDeclCount,
1079 IFDE_CSSComputedStyle* pDestStyle) = 0; 1079 IFDE_CSSComputedStyle* pDestStyle) = 0;
1080 }; 1080 };
1081 1081
1082 #endif // XFA_FDE_CSS_FDE_CSS_H_ 1082 #endif // XFA_FDE_CSS_FDE_CSS_H_
OLDNEW
« no previous file with comments | « xfa/fde/css/#fde_cssstyleselector.h# ('k') | xfa/fde/css/fde_cssdatatable.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698