From 0b95042db2e6dab5876abd12ce485fff0a8e08fe Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Thu, 21 Sep 2017 15:49:49 -0400 Subject: 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 Commit-Queue: dsinclair --- core/fxcrt/css/cfx_cssstyleselector.cpp | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'core/fxcrt/css/cfx_cssstyleselector.cpp') 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_CSSStyleSelector::CreateComputedStyle( +RetainPtr CFX_CSSStyleSelector::CreateComputedStyle( CFX_CSSComputedStyle* pParentStyle) { auto pStyle = pdfium::MakeRetain(); if (pParentStyle) @@ -168,10 +168,9 @@ void CFX_CSSStyleSelector::AppendInlineStyle(CFX_CSSDeclaration* pDecl, } } -void CFX_CSSStyleSelector::ApplyProperty( - CFX_CSSProperty eProperty, - const CFX_RetainPtr& pValue, - CFX_CSSComputedStyle* pComputedStyle) { +void CFX_CSSStyleSelector::ApplyProperty(CFX_CSSProperty eProperty, + const RetainPtr& 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 v = pValue.As(); + RetainPtr v = pValue.As(); 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 pList = pValue.As(); + RetainPtr pList = pValue.As(); 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& pValue, + const RetainPtr& pValue, float fFontSize) { if (eType == CFX_CSSPrimitiveType::Number) { - CFX_RetainPtr v = pValue.As(); + RetainPtr v = pValue.As(); if (v->Kind() == CFX_CSSNumberType::Percent) { width.Set(CFX_CSSLengthUnit::Percent, pValue.As()->Value() / 100.0f); @@ -560,10 +559,10 @@ CFX_CSSVerticalAlign CFX_CSSStyleSelector::ToVerticalAlign( } uint32_t CFX_CSSStyleSelector::ToTextDecoration( - const CFX_RetainPtr& pValue) { + const RetainPtr& pValue) { uint32_t dwDecoration = 0; for (int32_t i = pValue->CountValues() - 1; i >= 0; --i) { - const CFX_RetainPtr pVal = pValue->GetValue(i); + const RetainPtr pVal = pValue->GetValue(i); if (pVal->GetType() != CFX_CSSPrimitiveType::Enum) continue; -- cgit v1.2.3