| Index: Source/WebCore/platform/Length.h
|
| ===================================================================
|
| --- Source/WebCore/platform/Length.h (revision 118280)
|
| +++ Source/WebCore/platform/Length.h (working copy)
|
| @@ -49,21 +49,25 @@
|
| Length(LengthType t)
|
| : m_intValue(0), m_quirk(false), m_type(t), m_isFloat(false)
|
| {
|
| + ASSERT(t != Calculated);
|
| }
|
|
|
| Length(int v, LengthType t, bool q = false)
|
| : m_intValue(v), m_quirk(q), m_type(t), m_isFloat(false)
|
| {
|
| + ASSERT(t != Calculated);
|
| }
|
|
|
| Length(FractionalLayoutUnit v, LengthType t, bool q = false)
|
| : m_floatValue(v.toFloat()), m_quirk(q), m_type(t), m_isFloat(true)
|
| {
|
| + ASSERT(t != Calculated);
|
| }
|
|
|
| Length(float v, LengthType t, bool q = false)
|
| - : m_floatValue(v), m_quirk(q), m_type(t), m_isFloat(true)
|
| + : m_floatValue(v), m_quirk(q), m_type(t), m_isFloat(true)
|
| {
|
| + ASSERT(t != Calculated);
|
| }
|
|
|
| Length(double v, LengthType t, bool q = false)
|
| @@ -91,7 +95,7 @@
|
| decrementCalculatedRef();
|
| }
|
|
|
| - bool operator==(const Length& o) const { return (m_type == o.m_type) && (m_quirk == o.m_quirk) && (isUndefined() || (getFloatValue() == o.getFloatValue())); }
|
| + bool operator==(const Length& o) const { return (m_type == o.m_type) && (m_quirk == o.m_quirk) && (isUndefined() || (getFloatValue() == o.getFloatValue()) || isCalculatedEqual(o)); }
|
| bool operator!=(const Length& o) const { return !(*this == o); }
|
|
|
| const Length& operator*=(float v)
|
| @@ -212,6 +216,7 @@
|
| bool isIntrinsicOrAuto() const { return type() == Auto || type() == MinIntrinsic || type() == Intrinsic; }
|
| bool isSpecified() const { return type() == Fixed || type() == Percent || type() == Calculated || isViewportPercentage(); }
|
| bool isCalculated() const { return type() == Calculated; }
|
| + bool isCalculatedEqual(const Length&) const;
|
|
|
| Length blend(const Length& from, double progress) const
|
| {
|
| @@ -221,6 +226,10 @@
|
|
|
| if (from.isZero() && isZero())
|
| return *this;
|
| +
|
| + // FIXME http://webkit.org/b/86160 - Blending doesn't work with calculated expressions
|
| + if (type() == Calculated)
|
| + return *this;
|
|
|
| LengthType resultType = type();
|
| if (isZero())
|
|
|