summaryrefslogtreecommitdiff
path: root/xfa/fde/css
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fde/css')
-rw-r--r--xfa/fde/css/cfde_csscomputedstyle.cpp12
-rw-r--r--xfa/fde/css/cfde_csscomputedstyle.h18
-rw-r--r--xfa/fde/css/cfde_cssdeclaration.cpp12
-rw-r--r--xfa/fde/css/cfde_cssnumbervalue.cpp4
-rw-r--r--xfa/fde/css/cfde_cssnumbervalue.h8
-rw-r--r--xfa/fde/css/cfde_cssstyleselector.cpp12
-rw-r--r--xfa/fde/css/cfde_cssstyleselector.h8
-rw-r--r--xfa/fde/css/fde_css.h12
8 files changed, 43 insertions, 43 deletions
diff --git a/xfa/fde/css/cfde_csscomputedstyle.cpp b/xfa/fde/css/cfde_csscomputedstyle.cpp
index 01872d18fc..92184d4259 100644
--- a/xfa/fde/css/cfde_csscomputedstyle.cpp
+++ b/xfa/fde/css/cfde_csscomputedstyle.cpp
@@ -50,7 +50,7 @@ FDE_CSSFontStyle CFDE_CSSComputedStyle::GetFontStyle() const {
return m_InheritedData.m_eFontStyle;
}
-FX_FLOAT CFDE_CSSComputedStyle::GetFontSize() const {
+float CFDE_CSSComputedStyle::GetFontSize() const {
return m_InheritedData.m_fFontSize;
}
@@ -70,7 +70,7 @@ void CFDE_CSSComputedStyle::SetFontStyle(FDE_CSSFontStyle eFontStyle) {
m_InheritedData.m_eFontStyle = eFontStyle;
}
-void CFDE_CSSComputedStyle::SetFontSize(FX_FLOAT fFontSize) {
+void CFDE_CSSComputedStyle::SetFontSize(float fFontSize) {
m_InheritedData.m_fFontSize = fFontSize;
}
@@ -107,7 +107,7 @@ FDE_CSSDisplay CFDE_CSSComputedStyle::GetDisplay() const {
return m_NonInheritedData.m_eDisplay;
}
-FX_FLOAT CFDE_CSSComputedStyle::GetLineHeight() const {
+float CFDE_CSSComputedStyle::GetLineHeight() const {
return m_InheritedData.m_fLineHeight;
}
@@ -123,7 +123,7 @@ FDE_CSSVerticalAlign CFDE_CSSComputedStyle::GetVerticalAlign() const {
return m_NonInheritedData.m_eVerticalAlign;
}
-FX_FLOAT CFDE_CSSComputedStyle::GetNumberVerticalAlign() const {
+float CFDE_CSSComputedStyle::GetNumberVerticalAlign() const {
return m_NonInheritedData.m_fVerticalAlign;
}
@@ -135,7 +135,7 @@ const FDE_CSSLength& CFDE_CSSComputedStyle::GetLetterSpacing() const {
return m_InheritedData.m_LetterSpacing;
}
-void CFDE_CSSComputedStyle::SetLineHeight(FX_FLOAT fLineHeight) {
+void CFDE_CSSComputedStyle::SetLineHeight(float fLineHeight) {
m_InheritedData.m_fLineHeight = fLineHeight;
}
@@ -147,7 +147,7 @@ void CFDE_CSSComputedStyle::SetTextAlign(FDE_CSSTextAlign eTextAlign) {
m_InheritedData.m_eTextAlign = eTextAlign;
}
-void CFDE_CSSComputedStyle::SetNumberVerticalAlign(FX_FLOAT fAlign) {
+void CFDE_CSSComputedStyle::SetNumberVerticalAlign(float fAlign) {
m_NonInheritedData.m_eVerticalAlign = FDE_CSSVerticalAlign::Number,
m_NonInheritedData.m_fVerticalAlign = fAlign;
}
diff --git a/xfa/fde/css/cfde_csscomputedstyle.h b/xfa/fde/css/cfde_csscomputedstyle.h
index bba4ccbcd4..448d2467ab 100644
--- a/xfa/fde/css/cfde_csscomputedstyle.h
+++ b/xfa/fde/css/cfde_csscomputedstyle.h
@@ -27,8 +27,8 @@ class CFDE_CSSComputedStyle : public CFX_Retainable {
FDE_CSSLength m_WordSpacing;
FDE_CSSLength m_TextIndent;
CFX_RetainPtr<CFDE_CSSValueList> m_pFontFamily;
- FX_FLOAT m_fFontSize;
- FX_FLOAT m_fLineHeight;
+ float m_fFontSize;
+ float m_fLineHeight;
FX_ARGB m_dwFontColor;
uint16_t m_wFontWeight;
FDE_CSSFontVariant m_eFontVariant;
@@ -47,7 +47,7 @@ class CFDE_CSSComputedStyle : public CFX_Retainable {
FDE_CSSLength m_Bottom;
FDE_CSSLength m_Left;
FDE_CSSLength m_Right;
- FX_FLOAT m_fVerticalAlign;
+ float m_fVerticalAlign;
FDE_CSSDisplay m_eDisplay;
FDE_CSSVerticalAlign m_eVerticalAlign;
uint8_t m_dwTextDecoration;
@@ -61,12 +61,12 @@ class CFDE_CSSComputedStyle : public CFX_Retainable {
uint16_t GetFontWeight() const;
FDE_CSSFontVariant GetFontVariant() const;
FDE_CSSFontStyle GetFontStyle() const;
- FX_FLOAT GetFontSize() const;
+ float GetFontSize() const;
FX_ARGB GetColor() const;
void SetFontWeight(uint16_t wFontWeight);
void SetFontVariant(FDE_CSSFontVariant eFontVariant);
void SetFontStyle(FDE_CSSFontStyle eFontStyle);
- void SetFontSize(FX_FLOAT fFontSize);
+ void SetFontSize(float fFontSize);
void SetColor(FX_ARGB dwFontColor);
const FDE_CSSRect* GetBorderWidth() const;
@@ -77,17 +77,17 @@ class CFDE_CSSComputedStyle : public CFX_Retainable {
FDE_CSSDisplay GetDisplay() const;
- FX_FLOAT GetLineHeight() const;
+ float GetLineHeight() const;
const FDE_CSSLength& GetTextIndent() const;
FDE_CSSTextAlign GetTextAlign() const;
FDE_CSSVerticalAlign GetVerticalAlign() const;
- FX_FLOAT GetNumberVerticalAlign() const;
+ float GetNumberVerticalAlign() const;
uint32_t GetTextDecoration() const;
const FDE_CSSLength& GetLetterSpacing() const;
- void SetLineHeight(FX_FLOAT fLineHeight);
+ void SetLineHeight(float fLineHeight);
void SetTextIndent(const FDE_CSSLength& textIndent);
void SetTextAlign(FDE_CSSTextAlign eTextAlign);
- void SetNumberVerticalAlign(FX_FLOAT fAlign);
+ void SetNumberVerticalAlign(float fAlign);
void SetTextDecoration(uint32_t dwTextDecoration);
void SetLetterSpacing(const FDE_CSSLength& letterSpacing);
void AddCustomStyle(const CFDE_CSSCustomProperty& prop);
diff --git a/xfa/fde/css/cfde_cssdeclaration.cpp b/xfa/fde/css/cfde_cssdeclaration.cpp
index 2d1e707caa..8983059220 100644
--- a/xfa/fde/css/cfde_cssdeclaration.cpp
+++ b/xfa/fde/css/cfde_cssdeclaration.cpp
@@ -25,7 +25,7 @@ uint8_t Hex2Dec(uint8_t hexHigh, uint8_t hexLow) {
bool ParseCSSNumber(const wchar_t* pszValue,
int32_t iValueLen,
- FX_FLOAT& fValue,
+ float& fValue,
FDE_CSSNumberType& eUnit) {
ASSERT(pszValue && iValueLen > 0);
int32_t iUsedLen = 0;
@@ -100,7 +100,7 @@ bool CFDE_CSSDeclaration::ParseCSSColor(const wchar_t* pszValue,
return false;
uint8_t rgb[3] = {0};
- FX_FLOAT fValue;
+ float fValue;
FDE_CSSPrimitiveType eType;
CFDE_CSSValueListParser list(pszValue + 4, iValueLen - 5, ',');
for (int32_t i = 0; i < 3; ++i) {
@@ -279,7 +279,7 @@ void CFDE_CSSDeclaration::AddProperty(const CFX_WideString& prop,
CFX_RetainPtr<CFDE_CSSValue> CFDE_CSSDeclaration::ParseNumber(
const wchar_t* pszValue,
int32_t iValueLen) {
- FX_FLOAT fValue;
+ float fValue;
FDE_CSSNumberType eUnit;
if (!ParseCSSNumber(pszValue, iValueLen, fValue, eUnit))
return nullptr;
@@ -334,7 +334,7 @@ void CFDE_CSSDeclaration::ParseValueListProperty(
switch (eType) {
case FDE_CSSPrimitiveType::Number:
if (dwType & FDE_CSSVALUETYPE_MaybeNumber) {
- FX_FLOAT fValue;
+ float fValue;
FDE_CSSNumberType eNumType;
if (ParseCSSNumber(pszValue, iValueLen, fValue, eNumType))
list.push_back(
@@ -457,7 +457,7 @@ bool CFDE_CSSDeclaration::ParseBorderProperty(
if (pWidth)
continue;
- FX_FLOAT fValue;
+ float fValue;
FDE_CSSNumberType eNumType;
if (ParseCSSNumber(pszValue, iValueLen, fValue, eNumType))
pWidth = pdfium::MakeRetain<CFDE_CSSNumberValue>(eNumType, fValue);
@@ -569,7 +569,7 @@ void CFDE_CSSDeclaration::ParseFontProperty(const wchar_t* pszValue,
break;
}
case FDE_CSSPrimitiveType::Number: {
- FX_FLOAT fValue;
+ float fValue;
FDE_CSSNumberType eNumType;
if (!ParseCSSNumber(pszValue, iValueLen, fValue, eNumType))
break;
diff --git a/xfa/fde/css/cfde_cssnumbervalue.cpp b/xfa/fde/css/cfde_cssnumbervalue.cpp
index 71566ca5a3..e74ca5b859 100644
--- a/xfa/fde/css/cfde_cssnumbervalue.cpp
+++ b/xfa/fde/css/cfde_cssnumbervalue.cpp
@@ -6,7 +6,7 @@
#include "xfa/fde/css/cfde_cssnumbervalue.h"
-CFDE_CSSNumberValue::CFDE_CSSNumberValue(FDE_CSSNumberType type, FX_FLOAT value)
+CFDE_CSSNumberValue::CFDE_CSSNumberValue(FDE_CSSNumberType type, float value)
: CFDE_CSSValue(FDE_CSSPrimitiveType::Number), type_(type), value_(value) {
if (type_ == FDE_CSSNumberType::Number && FXSYS_fabs(value_) < 0.001f)
value_ = 0.0f;
@@ -14,7 +14,7 @@ CFDE_CSSNumberValue::CFDE_CSSNumberValue(FDE_CSSNumberType type, FX_FLOAT value)
CFDE_CSSNumberValue::~CFDE_CSSNumberValue() {}
-FX_FLOAT CFDE_CSSNumberValue::Apply(FX_FLOAT percentBase) const {
+float CFDE_CSSNumberValue::Apply(float percentBase) const {
switch (type_) {
case FDE_CSSNumberType::Pixels:
case FDE_CSSNumberType::Number:
diff --git a/xfa/fde/css/cfde_cssnumbervalue.h b/xfa/fde/css/cfde_cssnumbervalue.h
index 29e562e1e3..c4d0bd25f0 100644
--- a/xfa/fde/css/cfde_cssnumbervalue.h
+++ b/xfa/fde/css/cfde_cssnumbervalue.h
@@ -25,17 +25,17 @@ enum class FDE_CSSNumberType {
class CFDE_CSSNumberValue : public CFDE_CSSValue {
public:
- CFDE_CSSNumberValue(FDE_CSSNumberType type, FX_FLOAT value);
+ CFDE_CSSNumberValue(FDE_CSSNumberType type, float value);
~CFDE_CSSNumberValue() override;
- FX_FLOAT Value() const { return value_; }
+ float Value() const { return value_; }
FDE_CSSNumberType Kind() const { return type_; }
- FX_FLOAT Apply(FX_FLOAT percentBase) const;
+ float Apply(float percentBase) const;
private:
FDE_CSSNumberType type_;
- FX_FLOAT value_;
+ float value_;
};
#endif // XFA_FDE_CSS_CFDE_CSSNUMBERVALUE_H_
diff --git a/xfa/fde/css/cfde_cssstyleselector.cpp b/xfa/fde/css/cfde_cssstyleselector.cpp
index 08cd0e9251..42cc7afc23 100644
--- a/xfa/fde/css/cfde_cssstyleselector.cpp
+++ b/xfa/fde/css/cfde_cssstyleselector.cpp
@@ -27,7 +27,7 @@ CFDE_CSSStyleSelector::CFDE_CSSStyleSelector(CFGAS_FontMgr* pFontMgr)
CFDE_CSSStyleSelector::~CFDE_CSSStyleSelector() {}
-void CFDE_CSSStyleSelector::SetDefFontSize(FX_FLOAT fFontSize) {
+void CFDE_CSSStyleSelector::SetDefFontSize(float fFontSize) {
ASSERT(fFontSize > 0);
m_fDefFontSize = fFontSize;
}
@@ -185,7 +185,7 @@ void CFDE_CSSStyleSelector::ApplyProperty(
}
break;
case FDE_CSSProperty::FontSize: {
- FX_FLOAT& fFontSize = pComputedStyle->m_InheritedData.m_fFontSize;
+ float& fFontSize = pComputedStyle->m_InheritedData.m_fFontSize;
if (eType == FDE_CSSPrimitiveType::Number) {
fFontSize = pValue.As<CFDE_CSSNumberValue>()->Apply(fFontSize);
} else if (eType == FDE_CSSPrimitiveType::Enum) {
@@ -478,7 +478,7 @@ bool CFDE_CSSStyleSelector::SetLengthWithPercent(
FDE_CSSLength& width,
FDE_CSSPrimitiveType eType,
const CFX_RetainPtr<CFDE_CSSValue>& pValue,
- FX_FLOAT fFontSize) {
+ float fFontSize) {
if (eType == FDE_CSSPrimitiveType::Number) {
CFX_RetainPtr<CFDE_CSSNumberValue> v = pValue.As<CFDE_CSSNumberValue>();
if (v->Kind() == FDE_CSSNumberType::Percent) {
@@ -487,7 +487,7 @@ bool CFDE_CSSStyleSelector::SetLengthWithPercent(
return width.NonZero();
}
- FX_FLOAT fValue = v->Apply(fFontSize);
+ float fValue = v->Apply(fFontSize);
width.Set(FDE_CSSLengthUnit::Point, fValue);
return width.NonZero();
} else if (eType == FDE_CSSPrimitiveType::Enum) {
@@ -514,8 +514,8 @@ bool CFDE_CSSStyleSelector::SetLengthWithPercent(
return false;
}
-FX_FLOAT CFDE_CSSStyleSelector::ToFontSize(FDE_CSSPropertyValue eValue,
- FX_FLOAT fCurFontSize) {
+float CFDE_CSSStyleSelector::ToFontSize(FDE_CSSPropertyValue eValue,
+ float fCurFontSize) {
switch (eValue) {
case FDE_CSSPropertyValue::XxSmall:
return m_fDefFontSize / 1.2f / 1.2f / 1.2f;
diff --git a/xfa/fde/css/cfde_cssstyleselector.h b/xfa/fde/css/cfde_cssstyleselector.h
index c7b6b4164a..0783e72541 100644
--- a/xfa/fde/css/cfde_cssstyleselector.h
+++ b/xfa/fde/css/cfde_cssstyleselector.h
@@ -30,7 +30,7 @@ class CFDE_CSSStyleSelector {
explicit CFDE_CSSStyleSelector(CFGAS_FontMgr* pFontMgr);
~CFDE_CSSStyleSelector();
- void SetDefFontSize(FX_FLOAT fFontSize);
+ void SetDefFontSize(float fFontSize);
void SetUAStyleSheet(std::unique_ptr<CFDE_CSSStyleSheet> pSheet);
void UpdateStyleIndex();
@@ -68,8 +68,8 @@ class CFDE_CSSStyleSelector {
bool SetLengthWithPercent(FDE_CSSLength& width,
FDE_CSSPrimitiveType eType,
const CFX_RetainPtr<CFDE_CSSValue>& pValue,
- FX_FLOAT fFontSize);
- FX_FLOAT ToFontSize(FDE_CSSPropertyValue eValue, FX_FLOAT fCurFontSize);
+ float fFontSize);
+ float ToFontSize(FDE_CSSPropertyValue eValue, float fCurFontSize);
FDE_CSSDisplay ToDisplay(FDE_CSSPropertyValue eValue);
FDE_CSSTextAlign ToTextAlign(FDE_CSSPropertyValue eValue);
uint16_t ToFontWeight(FDE_CSSPropertyValue eValue);
@@ -79,7 +79,7 @@ class CFDE_CSSStyleSelector {
FDE_CSSFontVariant ToFontVariant(FDE_CSSPropertyValue eValue);
CFGAS_FontMgr* const m_pFontMgr;
- FX_FLOAT m_fDefFontSize;
+ float m_fDefFontSize;
std::unique_ptr<CFDE_CSSStyleSheet> m_UAStyles;
CFDE_CSSRuleCollection m_UARules;
};
diff --git a/xfa/fde/css/fde_css.h b/xfa/fde/css/fde_css.h
index 344b709487..58a6778732 100644
--- a/xfa/fde/css/fde_css.h
+++ b/xfa/fde/css/fde_css.h
@@ -188,7 +188,7 @@ class FDE_CSSLength {
explicit FDE_CSSLength(FDE_CSSLengthUnit eUnit) : m_unit(eUnit) {}
- FDE_CSSLength(FDE_CSSLengthUnit eUnit, FX_FLOAT fValue)
+ FDE_CSSLength(FDE_CSSLengthUnit eUnit, float fValue)
: m_unit(eUnit), m_fValue(fValue) {}
FDE_CSSLength& Set(FDE_CSSLengthUnit eUnit) {
@@ -196,7 +196,7 @@ class FDE_CSSLength {
return *this;
}
- FDE_CSSLength& Set(FDE_CSSLengthUnit eUnit, FX_FLOAT fValue) {
+ FDE_CSSLength& Set(FDE_CSSLengthUnit eUnit, float fValue) {
m_unit = eUnit;
m_fValue = fValue;
return *this;
@@ -204,19 +204,19 @@ class FDE_CSSLength {
FDE_CSSLengthUnit GetUnit() const { return m_unit; }
- FX_FLOAT GetValue() const { return m_fValue; }
+ float GetValue() const { return m_fValue; }
bool NonZero() const { return static_cast<int>(m_fValue) != 0; }
private:
FDE_CSSLengthUnit m_unit;
- FX_FLOAT m_fValue;
+ float m_fValue;
};
class FDE_CSSRect {
public:
FDE_CSSRect() {}
- FDE_CSSRect(FDE_CSSLengthUnit eUnit, FX_FLOAT val)
+ FDE_CSSRect(FDE_CSSLengthUnit eUnit, float val)
: left(eUnit, val),
top(eUnit, val),
right(eUnit, val),
@@ -229,7 +229,7 @@ class FDE_CSSRect {
bottom.Set(eUnit);
return *this;
}
- FDE_CSSRect& Set(FDE_CSSLengthUnit eUnit, FX_FLOAT fValue) {
+ FDE_CSSRect& Set(FDE_CSSLengthUnit eUnit, float fValue) {
left.Set(eUnit, fValue);
top.Set(eUnit, fValue);
right.Set(eUnit, fValue);