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

Unified Diff: third_party/WebKit/Source/core/css/cssom/CSSStyleCalcLength.h

Issue 1949343002: [Obsolete] Typed CSSOM: Prefix LengthValue, CalcLength and SimpleLength with "CSS" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rename layout test files Created 4 years, 7 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
Index: third_party/WebKit/Source/core/css/cssom/CSSStyleCalcLength.h
diff --git a/third_party/WebKit/Source/core/css/cssom/StyleCalcLength.h b/third_party/WebKit/Source/core/css/cssom/CSSStyleCalcLength.h
similarity index 65%
rename from third_party/WebKit/Source/core/css/cssom/StyleCalcLength.h
rename to third_party/WebKit/Source/core/css/cssom/CSSStyleCalcLength.h
index 3ef6670302394d0123f11c730d03e0ca9af6b0e9..0ee7250f7e6aacdc02dc6d122a4ed7eb9e0b0b85 100644
--- a/third_party/WebKit/Source/core/css/cssom/StyleCalcLength.h
+++ b/third_party/WebKit/Source/core/css/cssom/CSSStyleCalcLength.h
@@ -2,23 +2,23 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef StyleCalcLength_h
-#define StyleCalcLength_h
+#ifndef CSSStyleCalcLength_h
+#define CSSStyleCalcLength_h
-#include "core/css/cssom/LengthValue.h"
+#include "core/css/cssom/CSSLengthValue.h"
#include "wtf/BitVector.h"
namespace blink {
class CalcDictionary;
-class SimpleLength;
+class CSSSimpleLength;
-class CORE_EXPORT StyleCalcLength final : public LengthValue {
+class CORE_EXPORT CSSStyleCalcLength final : public CSSLengthValue {
DEFINE_WRAPPERTYPEINFO();
public:
- static StyleCalcLength* create(const LengthValue*);
- static StyleCalcLength* create(const CalcDictionary&, ExceptionState&);
- static StyleCalcLength* create(const LengthValue* length, ExceptionState&)
+ static CSSStyleCalcLength* create(const CSSLengthValue*);
+ static CSSStyleCalcLength* create(const CalcDictionary&, ExceptionState&);
+ static CSSStyleCalcLength* create(const CSSLengthValue* length, ExceptionState&)
{
return create(length);
}
@@ -54,52 +54,52 @@ public:
StyleValueType type() const override { return CalcLengthType; }
protected:
- LengthValue* addInternal(const LengthValue* other, ExceptionState&) override;
- LengthValue* subtractInternal(const LengthValue* other, ExceptionState&) override;
- LengthValue* multiplyInternal(double, ExceptionState&) override;
- LengthValue* divideInternal(double, ExceptionState&) override;
+ CSSLengthValue* addInternal(const CSSLengthValue* other, ExceptionState&) override;
+ CSSLengthValue* subtractInternal(const CSSLengthValue* other, ExceptionState&) override;
+ CSSLengthValue* multiplyInternal(double, ExceptionState&) override;
+ CSSLengthValue* divideInternal(double, ExceptionState&) override;
private:
- StyleCalcLength();
- StyleCalcLength(const StyleCalcLength& other);
- StyleCalcLength(const SimpleLength& other);
+ CSSStyleCalcLength();
+ CSSStyleCalcLength(const CSSStyleCalcLength& other);
+ CSSStyleCalcLength(const CSSSimpleLength& other);
static int indexForUnit(CSSPrimitiveValue::UnitType);
static CSSPrimitiveValue::UnitType unitFromIndex(int index)
{
- ASSERT(index < LengthValue::kNumSupportedUnits);
+ ASSERT(index < CSSLengthValue::kNumSupportedUnits);
int lowestValue = static_cast<int>(CSSPrimitiveValue::UnitType::Percentage);
return static_cast<CSSPrimitiveValue::UnitType>(index + lowestValue);
}
bool hasAtIndex(int index) const
{
- ASSERT(index < LengthValue::kNumSupportedUnits);
+ ASSERT(index < CSSLengthValue::kNumSupportedUnits);
return m_hasValues.quickGet(index);
}
bool has(CSSPrimitiveValue::UnitType unit) const { return hasAtIndex(indexForUnit(unit)); }
void setAtIndex(double value, int index)
{
- ASSERT(index < LengthValue::kNumSupportedUnits);
+ ASSERT(index < CSSLengthValue::kNumSupportedUnits);
m_hasValues.quickSet(index);
m_values[index] = value;
}
void set(double value, CSSPrimitiveValue::UnitType unit) { setAtIndex(value, indexForUnit(unit)); }
double getAtIndex(int index) const
{
- ASSERT(index < LengthValue::kNumSupportedUnits);
+ ASSERT(index < CSSLengthValue::kNumSupportedUnits);
return m_values[index];
}
double get(CSSPrimitiveValue::UnitType unit) const { return getAtIndex(indexForUnit(unit)); }
- Vector<double, LengthValue::kNumSupportedUnits> m_values;
+ Vector<double, CSSLengthValue::kNumSupportedUnits> m_values;
BitVector m_hasValues;
};
#define DEFINE_CALC_LENGTH_TYPE_CASTS(argumentType) \
- DEFINE_TYPE_CASTS(StyleCalcLength, argumentType, value, \
- value->type() == LengthValue::StyleValueType::CalcLengthType, \
- value.type() == LengthValue::StyleValueType::CalcLengthType)
+ DEFINE_TYPE_CASTS(CSSStyleCalcLength, argumentType, value, \
+ value->type() == CSSLengthValue::StyleValueType::CalcLengthType, \
+ value.type() == CSSLengthValue::StyleValueType::CalcLengthType)
DEFINE_CALC_LENGTH_TYPE_CASTS(StyleValue);

Powered by Google App Engine
This is Rietveld 408576698