| Index: Source/core/css/CSSPrimitiveValue.h
|
| diff --git a/Source/core/css/CSSPrimitiveValue.h b/Source/core/css/CSSPrimitiveValue.h
|
| index 1820b226d24c511e3c90c80db830cb3cfecda590..24752549d51358151dd802f0415d3825b4af6b52 100644
|
| --- a/Source/core/css/CSSPrimitiveValue.h
|
| +++ b/Source/core/css/CSSPrimitiveValue.h
|
| @@ -445,17 +445,14 @@ private:
|
| return reinterpret_cast<CSSPrimitiveValue*&>(taggedPtr);
|
| }
|
|
|
| - inline CSSTaggedPtrValue toTaggedPtr() const
|
| - {
|
| - CSSPrimitiveValue* nonConstThis = const_cast<CSSPrimitiveValue*>(this);
|
| - return reinterpret_cast<CSSTaggedPtrValue&&>(nonConstThis);
|
| - }
|
| -
|
| inline UnitType type() const
|
| {
|
| if (!isTaggedPtr())
|
| return static_cast<UnitType>(m_primitiveUnitType);
|
| - return static_cast<UnitType>(toTaggedPtr().type);
|
| +
|
| + const CSSPrimitiveValue* const& lValue = this;
|
| + const CSSTaggedPtrValue& taggedPtr = reinterpret_cast<const CSSTaggedPtrValue&>(lValue);
|
| + return static_cast<UnitType>(taggedPtr.type);
|
| }
|
|
|
| inline CSSPrimitiveValueData value() const
|
| @@ -464,16 +461,18 @@ private:
|
| return m_value;
|
|
|
| CSSPrimitiveValueData data;
|
| + const CSSPrimitiveValue* const& lValue = this;
|
| + const CSSTaggedPtrValue& taggedPtr = reinterpret_cast<const CSSTaggedPtrValue&>(lValue);
|
| switch (type()) {
|
| case CSSPrimitiveValue::CSS_PROPERTY_ID:
|
| - data.propertyID = static_cast<CSSPropertyID>(toTaggedPtr().value);
|
| + data.propertyID = static_cast<CSSPropertyID>(taggedPtr.value);
|
| break;
|
| case CSSPrimitiveValue::CSS_VALUE_ID:
|
| - data.valueID = static_cast<CSSValueID>(toTaggedPtr().value);
|
| + data.valueID = static_cast<CSSValueID>(taggedPtr.value);
|
| break;
|
| case CSSPrimitiveValue::CSS_RGBCOLOR: {
|
| - uintptr_t valueRawVar = toTaggedPtr().value;
|
| - packedColor color = *reinterpret_cast<packedColor*>(&valueRawVar);
|
| + uintptr_t colorRaw = taggedPtr.value;
|
| + packedColor color = reinterpret_cast<packedColor&>(colorRaw);
|
| unsigned alpha;
|
| #if CPU(32BIT)
|
| alpha = color.alpha == 1 ? 255 : 0;
|
| @@ -484,9 +483,9 @@ private:
|
| break;
|
| }
|
| default:
|
| - uint64_t shiftedValue = toTaggedPtr().value;
|
| + uint64_t shiftedValue = taggedPtr.value;
|
| shiftedValue = shiftedValue << doubleShiftAmount;
|
| - data.num = *reinterpret_cast<double*>(&shiftedValue);
|
| + data.num = reinterpret_cast<double&>(shiftedValue);
|
| break;
|
| }
|
| return data;
|
|
|