summaryrefslogtreecommitdiff
path: root/core/fxcrt/css/cfx_cssstyleselector.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcrt/css/cfx_cssstyleselector.cpp')
-rw-r--r--core/fxcrt/css/cfx_cssstyleselector.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/core/fxcrt/css/cfx_cssstyleselector.cpp b/core/fxcrt/css/cfx_cssstyleselector.cpp
index 9ae2b876f7..cb9ab2f499 100644
--- a/core/fxcrt/css/cfx_cssstyleselector.cpp
+++ b/core/fxcrt/css/cfx_cssstyleselector.cpp
@@ -31,7 +31,7 @@ void CFX_CSSStyleSelector::SetDefFontSize(float fFontSize) {
m_fDefFontSize = fFontSize;
}
-CFX_RetainPtr<CFX_CSSComputedStyle> CFX_CSSStyleSelector::CreateComputedStyle(
+RetainPtr<CFX_CSSComputedStyle> CFX_CSSStyleSelector::CreateComputedStyle(
CFX_CSSComputedStyle* pParentStyle) {
auto pStyle = pdfium::MakeRetain<CFX_CSSComputedStyle>();
if (pParentStyle)
@@ -168,10 +168,9 @@ void CFX_CSSStyleSelector::AppendInlineStyle(CFX_CSSDeclaration* pDecl,
}
}
-void CFX_CSSStyleSelector::ApplyProperty(
- CFX_CSSProperty eProperty,
- const CFX_RetainPtr<CFX_CSSValue>& pValue,
- CFX_CSSComputedStyle* pComputedStyle) {
+void CFX_CSSStyleSelector::ApplyProperty(CFX_CSSProperty eProperty,
+ const RetainPtr<CFX_CSSValue>& pValue,
+ CFX_CSSComputedStyle* pComputedStyle) {
if (pValue->GetType() != CFX_CSSPrimitiveType::List) {
CFX_CSSPrimitiveType eType = pValue->GetType();
switch (eProperty) {
@@ -192,7 +191,7 @@ void CFX_CSSStyleSelector::ApplyProperty(
} break;
case CFX_CSSProperty::LineHeight:
if (eType == CFX_CSSPrimitiveType::Number) {
- CFX_RetainPtr<CFX_CSSNumberValue> v = pValue.As<CFX_CSSNumberValue>();
+ RetainPtr<CFX_CSSNumberValue> v = pValue.As<CFX_CSSNumberValue>();
if (v->Kind() == CFX_CSSNumberType::Number) {
pComputedStyle->m_InheritedData.m_fLineHeight =
v->Value() * pComputedStyle->m_InheritedData.m_fFontSize;
@@ -392,7 +391,7 @@ void CFX_CSSStyleSelector::ApplyProperty(
break;
}
} else if (pValue->GetType() == CFX_CSSPrimitiveType::List) {
- CFX_RetainPtr<CFX_CSSValueList> pList = pValue.As<CFX_CSSValueList>();
+ RetainPtr<CFX_CSSValueList> pList = pValue.As<CFX_CSSValueList>();
int32_t iCount = pList->CountValues();
if (iCount > 0) {
switch (eProperty) {
@@ -473,10 +472,10 @@ CFX_CSSFontStyle CFX_CSSStyleSelector::ToFontStyle(
bool CFX_CSSStyleSelector::SetLengthWithPercent(
CFX_CSSLength& width,
CFX_CSSPrimitiveType eType,
- const CFX_RetainPtr<CFX_CSSValue>& pValue,
+ const RetainPtr<CFX_CSSValue>& pValue,
float fFontSize) {
if (eType == CFX_CSSPrimitiveType::Number) {
- CFX_RetainPtr<CFX_CSSNumberValue> v = pValue.As<CFX_CSSNumberValue>();
+ RetainPtr<CFX_CSSNumberValue> v = pValue.As<CFX_CSSNumberValue>();
if (v->Kind() == CFX_CSSNumberType::Percent) {
width.Set(CFX_CSSLengthUnit::Percent,
pValue.As<CFX_CSSNumberValue>()->Value() / 100.0f);
@@ -560,10 +559,10 @@ CFX_CSSVerticalAlign CFX_CSSStyleSelector::ToVerticalAlign(
}
uint32_t CFX_CSSStyleSelector::ToTextDecoration(
- const CFX_RetainPtr<CFX_CSSValueList>& pValue) {
+ const RetainPtr<CFX_CSSValueList>& pValue) {
uint32_t dwDecoration = 0;
for (int32_t i = pValue->CountValues() - 1; i >= 0; --i) {
- const CFX_RetainPtr<CFX_CSSValue> pVal = pValue->GetValue(i);
+ const RetainPtr<CFX_CSSValue> pVal = pValue->GetValue(i);
if (pVal->GetType() != CFX_CSSPrimitiveType::Enum)
continue;