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

Unified Diff: third_party/WebKit/Source/core/css/cssom/LengthValue.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/LengthValue.h
diff --git a/third_party/WebKit/Source/core/css/cssom/LengthValue.h b/third_party/WebKit/Source/core/css/cssom/LengthValue.h
deleted file mode 100644
index 9232d6ac1d7e5445f955df5a4d829391b35fbe0d..0000000000000000000000000000000000000000
--- a/third_party/WebKit/Source/core/css/cssom/LengthValue.h
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef LengthValue_h
-#define LengthValue_h
-
-#include "core/css/cssom/StyleValue.h"
-
-namespace blink {
-
-class CalcDictionary;
-class ExceptionState;
-
-class CORE_EXPORT LengthValue : public StyleValue {
- WTF_MAKE_NONCOPYABLE(LengthValue);
- DEFINE_WRAPPERTYPEINFO();
-public:
- static CSSPrimitiveValue::UnitType unitFromName(const String& name);
-
- LengthValue* add(const LengthValue* other, ExceptionState&);
- LengthValue* subtract(const LengthValue* other, ExceptionState&);
- LengthValue* multiply(double, ExceptionState&);
- LengthValue* divide(double, ExceptionState&);
-
- virtual bool containsPercent() const = 0;
-
- static LengthValue* parse(const String& cssString, ExceptionState&);
- static LengthValue* fromValue(double value, const String& typeStr, ExceptionState&);
- static LengthValue* fromDictionary(const CalcDictionary&, ExceptionState&);
-
-protected:
- LengthValue() {}
-
- virtual LengthValue* addInternal(const LengthValue* other, ExceptionState&);
- virtual LengthValue* subtractInternal(const LengthValue* other, ExceptionState&);
- virtual LengthValue* multiplyInternal(double, ExceptionState&);
- virtual LengthValue* divideInternal(double, ExceptionState&);
-
- static bool isSupportedLengthUnit(CSSPrimitiveValue::UnitType unit)
- {
- return (CSSPrimitiveValue::isLength(unit) || unit == CSSPrimitiveValue::UnitType::Percentage)
- && unit != CSSPrimitiveValue::UnitType::QuirkyEms
- && unit != CSSPrimitiveValue::UnitType::UserUnits;
- }
-
- static const int kNumSupportedUnits = 15;
-};
-
-DEFINE_TYPE_CASTS(LengthValue, StyleValue, value,
- (value->type() == StyleValue::SimpleLengthType
- || value->type() == StyleValue::CalcLengthType),
- (value.type() == StyleValue::SimpleLengthType
- || value.type() == StyleValue::CalcLengthType));
-
-} // namespace blink
-
-#endif

Powered by Google App Engine
This is Rietveld 408576698