summaryrefslogtreecommitdiff
path: root/core/fxcrt/css/cfx_cssstyleselector.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-09-21 15:49:49 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-09-21 20:17:31 +0000
commit0b95042db2e6dab5876abd12ce485fff0a8e08fe (patch)
tree02132ed53945fde30bfbf230ff4e9b5308dd7732 /core/fxcrt/css/cfx_cssstyleselector.cpp
parenta5eb9f05b7c3f82630784e043ccf75c4e019b18f (diff)
downloadpdfium-0b95042db2e6dab5876abd12ce485fff0a8e08fe.tar.xz
Rename CFX_RetainPtr to RetainPtr
This CL renames CFX_RetainPtr to RetainPtr and places in the fxcrt namespace. Bug: pdfium:898 Change-Id: I8798a9f79cb0840d3f037e8d04937cedd742914e Reviewed-on: https://pdfium-review.googlesource.com/14616 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
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;