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

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

Issue 1225553002: CSSValue Immediates: Make CSSPrimitiveValue a container (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@cssvalue_patch_1
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 f484eb7e92e6ce2e77e11a3f2c0262d5762b4a85..0fcf5c942c3d39f4e98f95e30070cbf389c30ddc 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