Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(567)

Unified Diff: Source/core/css/CSSCrossfadeValue.cpp

Issue 1249553002: CSSValue Immediates: Add move operators to CSSPrimitiveValue (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@cssvalue_patch_3_tagged_ptrs_with_copy_ops_mv_operators_ref_primvalue
Patch Set: Rebase Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/css/CSSCrossfadeValue.h ('k') | Source/core/css/CSSGradientValue.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSCrossfadeValue.cpp
diff --git a/Source/core/css/CSSCrossfadeValue.cpp b/Source/core/css/CSSCrossfadeValue.cpp
index 57d0a8d0b0383721f077bd507925c453f726a057..f27803a48fab7c86bad1af2073c1175da0072e07 100644
--- a/Source/core/css/CSSCrossfadeValue.cpp
+++ b/Source/core/css/CSSCrossfadeValue.cpp
@@ -104,7 +104,7 @@ String CSSCrossfadeValue::customCSSText() const
IntSize CSSCrossfadeValue::fixedSize(const LayoutObject* layoutObject)
{
- float percentage = m_percentageValue->getFloatValue();
+ float percentage = toCSSPrimitiveValue(m_percentageValue).getFloatValue();
float inversePercentage = 1 - percentage;
Document* document = &layoutObject->document();
@@ -179,7 +179,7 @@ PassRefPtr<Image> CSSCrossfadeValue::image(LayoutObject* layoutObject, const Int
if (!fromImage || !toImage)
return Image::nullImage();
- m_generatedImage = CrossfadeGeneratedImage::create(fromImage, toImage, m_percentageValue->getFloatValue(), fixedSize(layoutObject), size);
+ m_generatedImage = CrossfadeGeneratedImage::create(fromImage, toImage, toCSSPrimitiveValue(m_percentageValue).getFloatValue(), fixedSize(layoutObject), size);
return m_generatedImage.release();
}
@@ -211,7 +211,7 @@ bool CSSCrossfadeValue::equals(const CSSCrossfadeValue& other) const
{
return m_fromValue.equals(other.m_fromValue)
&& m_toValue.equals(other.m_toValue)
- && compareCSSValuePtr(m_percentageValue, other.m_percentageValue);
+ && m_percentageValue == other.m_percentageValue;
}
DEFINE_TRACE_AFTER_DISPATCH(CSSCrossfadeValue)
« no previous file with comments | « Source/core/css/CSSCrossfadeValue.h ('k') | Source/core/css/CSSGradientValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698