summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_textparser.h
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-08-08 13:23:24 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-08-08 17:37:54 +0000
commit9f0e85ac36826e39a242f8039c2b2c333ee99f4f (patch)
treec93f2a9322968f7723a4b3da5ea5e4cb7b79b075 /xfa/fxfa/cxfa_textparser.h
parent78fc9aa402409f3fcd8dc1f458e67798cb3b483e (diff)
downloadpdfium-9f0e85ac36826e39a242f8039c2b2c333ee99f4f.tar.xz
Move CSS code to core
The xfa/fde/css code has no other links into xfa/. This CL moves the css code to core/fxcrt/css and sets to only build when pdf_enable_xfa is enabled. Change-Id: Iefd208e1f83a28b80b567c574e841e87bce310be Reviewed-on: https://pdfium-review.googlesource.com/9251 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_textparser.h')
-rw-r--r--xfa/fxfa/cxfa_textparser.h49
1 files changed, 24 insertions, 25 deletions
diff --git a/xfa/fxfa/cxfa_textparser.h b/xfa/fxfa/cxfa_textparser.h
index 303b10ce07..567aff0189 100644
--- a/xfa/fxfa/cxfa_textparser.h
+++ b/xfa/fxfa/cxfa_textparser.h
@@ -16,9 +16,9 @@
#include "core/fxge/fx_dib.h"
#include "xfa/fgas/font/cfgas_gefont.h"
-class CFDE_CSSComputedStyle;
-class CFDE_CSSStyleSelector;
-class CFDE_CSSStyleSheet;
+class CFX_CSSComputedStyle;
+class CFX_CSSStyleSelector;
+class CFX_CSSStyleSheet;
class CFX_XMLNode;
class CXFA_TextParseContext;
class CXFA_TextProvider;
@@ -32,47 +32,47 @@ class CXFA_TextParser {
void Reset();
void DoParse(CFX_XMLNode* pXMLContainer, CXFA_TextProvider* pTextProvider);
- CFX_RetainPtr<CFDE_CSSComputedStyle> CreateRootStyle(
+ CFX_RetainPtr<CFX_CSSComputedStyle> CreateRootStyle(
CXFA_TextProvider* pTextProvider);
- CFX_RetainPtr<CFDE_CSSComputedStyle> ComputeStyle(
+ CFX_RetainPtr<CFX_CSSComputedStyle> ComputeStyle(
CFX_XMLNode* pXMLNode,
- CFDE_CSSComputedStyle* pParentStyle);
+ CFX_CSSComputedStyle* pParentStyle);
bool IsParsed() const { return m_bParsed; }
int32_t GetVAlign(CXFA_TextProvider* pTextProvider) const;
- float GetTabInterval(CFDE_CSSComputedStyle* pStyle) const;
- int32_t CountTabs(CFDE_CSSComputedStyle* pStyle) const;
+ float GetTabInterval(CFX_CSSComputedStyle* pStyle) const;
+ int32_t CountTabs(CFX_CSSComputedStyle* pStyle) const;
- bool IsSpaceRun(CFDE_CSSComputedStyle* pStyle) const;
- bool GetTabstops(CFDE_CSSComputedStyle* pStyle,
+ bool IsSpaceRun(CFX_CSSComputedStyle* pStyle) const;
+ bool GetTabstops(CFX_CSSComputedStyle* pStyle,
CXFA_TextTabstopsContext* pTabstopContext);
CFX_RetainPtr<CFGAS_GEFont> GetFont(CXFA_TextProvider* pTextProvider,
- CFDE_CSSComputedStyle* pStyle) const;
+ CFX_CSSComputedStyle* pStyle) const;
float GetFontSize(CXFA_TextProvider* pTextProvider,
- CFDE_CSSComputedStyle* pStyle) const;
+ CFX_CSSComputedStyle* pStyle) const;
int32_t GetHorScale(CXFA_TextProvider* pTextProvider,
- CFDE_CSSComputedStyle* pStyle,
+ CFX_CSSComputedStyle* pStyle,
CFX_XMLNode* pXMLNode) const;
int32_t GetVerScale(CXFA_TextProvider* pTextProvider,
- CFDE_CSSComputedStyle* pStyle) const;
+ CFX_CSSComputedStyle* pStyle) const;
void GetUnderline(CXFA_TextProvider* pTextProvider,
- CFDE_CSSComputedStyle* pStyle,
+ CFX_CSSComputedStyle* pStyle,
int32_t& iUnderline,
int32_t& iPeriod) const;
void GetLinethrough(CXFA_TextProvider* pTextProvider,
- CFDE_CSSComputedStyle* pStyle,
+ CFX_CSSComputedStyle* pStyle,
int32_t& iLinethrough) const;
FX_ARGB GetColor(CXFA_TextProvider* pTextProvider,
- CFDE_CSSComputedStyle* pStyle) const;
+ CFX_CSSComputedStyle* pStyle) const;
float GetBaseline(CXFA_TextProvider* pTextProvider,
- CFDE_CSSComputedStyle* pStyle) const;
+ CFX_CSSComputedStyle* pStyle) const;
float GetLineHeight(CXFA_TextProvider* pTextProvider,
- CFDE_CSSComputedStyle* pStyle,
+ CFX_CSSComputedStyle* pStyle,
bool bFirst,
float fVerScale) const;
@@ -111,16 +111,15 @@ class CXFA_TextParser {
};
void InitCSSData(CXFA_TextProvider* pTextProvider);
- void ParseRichText(CFX_XMLNode* pXMLNode,
- CFDE_CSSComputedStyle* pParentStyle);
+ void ParseRichText(CFX_XMLNode* pXMLNode, CFX_CSSComputedStyle* pParentStyle);
std::unique_ptr<TagProvider> ParseTagInfo(CFX_XMLNode* pXMLNode);
- std::unique_ptr<CFDE_CSSStyleSheet> LoadDefaultSheetStyle();
- CFX_RetainPtr<CFDE_CSSComputedStyle> CreateStyle(
- CFDE_CSSComputedStyle* pParentStyle);
+ std::unique_ptr<CFX_CSSStyleSheet> LoadDefaultSheetStyle();
+ CFX_RetainPtr<CFX_CSSComputedStyle> CreateStyle(
+ CFX_CSSComputedStyle* pParentStyle);
bool m_bParsed;
bool m_cssInitialized;
- std::unique_ptr<CFDE_CSSStyleSelector> m_pSelector;
+ std::unique_ptr<CFX_CSSStyleSelector> m_pSelector;
std::map<CFX_XMLNode*, std::unique_ptr<CXFA_TextParseContext>>
m_mapXMLNodeToParseContext;
};