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

Unified Diff: Source/core/platform/CalculationValue.h

Issue 20294002: Fix trailing whitespace in .cpp, .h, and .idl files (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 7 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/platform/Arena.cpp ('k') | Source/core/platform/CalculationValue.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/platform/CalculationValue.h
diff --git a/Source/core/platform/CalculationValue.h b/Source/core/platform/CalculationValue.h
index 55d5f9e8f21c9e15ba04326fb4a80ec505f690e0..03348bcf8ff1e6c8e5c4a9a119dfce1f203201c0 100644
--- a/Source/core/platform/CalculationValue.h
+++ b/Source/core/platform/CalculationValue.h
@@ -59,7 +59,7 @@ enum CalcExpressionNodeType {
CalcExpressionNodeBinaryOperation,
CalcExpressionNodeBlendLength,
};
-
+
class CalcExpressionNode {
WTF_MAKE_FAST_ALLOCATED;
public:
@@ -67,37 +67,37 @@ public:
: m_type(CalcExpressionNodeUndefined)
{
}
-
+
virtual ~CalcExpressionNode()
{
}
-
+
virtual float evaluate(float maxValue) const = 0;
virtual bool operator==(const CalcExpressionNode&) const = 0;
CalcExpressionNodeType type() const { return m_type; }
-
+
protected:
CalcExpressionNodeType m_type;
};
-
+
class CalculationValue : public RefCounted<CalculationValue> {
public:
static PassRefPtr<CalculationValue> create(PassOwnPtr<CalcExpressionNode> value, CalculationPermittedValueRange);
float evaluate(float maxValue) const;
- bool operator==(const CalculationValue& o) const
- {
+ bool operator==(const CalculationValue& o) const
+ {
return *(m_value.get()) == *(o.m_value.get());
}
-
+
private:
CalculationValue(PassOwnPtr<CalcExpressionNode> value, CalculationPermittedValueRange range)
: m_value(value)
, m_isNonNegative(range == CalculationRangeNonNegative)
{
}
-
+
OwnPtr<CalcExpressionNode> m_value;
bool m_isNonNegative;
};
@@ -119,12 +119,12 @@ public:
{
return type() == o.type() && *this == static_cast<const CalcExpressionNumber&>(o);
}
-
- virtual float evaluate(float) const
+
+ virtual float evaluate(float) const
{
return m_value;
}
-
+
private:
float m_value;
};
@@ -141,17 +141,17 @@ public:
{
return m_length == o.m_length;
}
-
+
virtual bool operator==(const CalcExpressionNode& o) const
{
return type() == o.type() && *this == static_cast<const CalcExpressionLength&>(o);
}
-
+
virtual float evaluate(float maxValue) const
{
return floatValueForLength(m_length, maxValue);
}
-
+
private:
Length m_length;
};
@@ -175,8 +175,8 @@ public:
{
return type() == o.type() && *this == static_cast<const CalcExpressionBinaryOperation&>(o);
}
-
-
+
+
virtual float evaluate(float) const;
private:
@@ -194,28 +194,28 @@ public:
{
m_type = CalcExpressionNodeBlendLength;
}
-
+
bool operator==(const CalcExpressionBlendLength& o) const
{
return m_progress == o.m_progress && m_from == o.m_from && m_to == o.m_to;
}
-
+
virtual bool operator==(const CalcExpressionNode& o) const
{
return type() == o.type() && *this == static_cast<const CalcExpressionBlendLength&>(o);
}
-
+
virtual float evaluate(float maxValue) const
{
return (1.0f - m_progress) * floatValueForLength(m_from, maxValue) + m_progress * floatValueForLength(m_to, maxValue);
}
-
-private:
+
+private:
Length m_from;
Length m_to;
float m_progress;
};
-
+
} // namespace WebCore
#endif // CalculationValue_h
« no previous file with comments | « Source/core/platform/Arena.cpp ('k') | Source/core/platform/CalculationValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698