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

Unified Diff: third_party/WebKit/Source/core/css/cssom/LengthValue.cpp

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.cpp
diff --git a/third_party/WebKit/Source/core/css/cssom/LengthValue.cpp b/third_party/WebKit/Source/core/css/cssom/LengthValue.cpp
deleted file mode 100644
index 637f5076a9d7baa48b920d3c8836f105a2ee2146..0000000000000000000000000000000000000000
--- a/third_party/WebKit/Source/core/css/cssom/LengthValue.cpp
+++ /dev/null
@@ -1,91 +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.
-
-#include "core/css/cssom/LengthValue.h"
-
-#include "bindings/core/v8/ExceptionState.h"
-#include "core/css/cssom/CalcDictionary.h"
-#include "core/css/cssom/SimpleLength.h"
-#include "core/css/cssom/StyleCalcLength.h"
-#include "wtf/HashMap.h"
-
-namespace blink {
-
-CSSPrimitiveValue::UnitType LengthValue::unitFromName(const String& name)
-{
- if (equalIgnoringASCIICase(name, "percent") || name == "%") {
- return CSSPrimitiveValue::UnitType::Percentage;
- }
- return CSSPrimitiveValue::fromName(name);
-}
-
-LengthValue* LengthValue::parse(const String& cssString, ExceptionState& exceptionState)
-{
- // TODO: Implement
- return nullptr;
-}
-
-LengthValue* LengthValue::fromValue(double value, const String& type, ExceptionState&)
-{
- return SimpleLength::create(value, unitFromName(type));
-}
-
-LengthValue* LengthValue::fromDictionary(const CalcDictionary& dictionary, ExceptionState& exceptionState)
-{
- return StyleCalcLength::create(dictionary, exceptionState);
-}
-
-LengthValue* LengthValue::add(const LengthValue* other, ExceptionState& exceptionState)
-{
- if (type() == other->type() || type() == CalcLengthType)
- return addInternal(other, exceptionState);
-
- StyleCalcLength* result = StyleCalcLength::create(this, exceptionState);
- return result->add(other, exceptionState);
-}
-
-LengthValue* LengthValue::subtract(const LengthValue* other, ExceptionState& exceptionState)
-{
- if (type() == other->type() || type() == CalcLengthType)
- return subtractInternal(other, exceptionState);
-
- StyleCalcLength* result = StyleCalcLength::create(this, exceptionState);
- return result->subtract(other, exceptionState);
-}
-
-LengthValue* LengthValue::multiply(double x, ExceptionState& exceptionState)
-{
- return multiplyInternal(x, exceptionState);
-}
-
-LengthValue* LengthValue::divide(double x, ExceptionState& exceptionState)
-{
- return divideInternal(x, exceptionState);
-}
-
-LengthValue* LengthValue::addInternal(const LengthValue*, ExceptionState&)
-{
- ASSERT_NOT_REACHED();
- return nullptr;
-}
-
-LengthValue* LengthValue::subtractInternal(const LengthValue*, ExceptionState&)
-{
- ASSERT_NOT_REACHED();
- return nullptr;
-}
-
-LengthValue* LengthValue::multiplyInternal(double, ExceptionState&)
-{
- ASSERT_NOT_REACHED();
- return nullptr;
-}
-
-LengthValue* LengthValue::divideInternal(double, ExceptionState&)
-{
- ASSERT_NOT_REACHED();
- return nullptr;
-}
-
-} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/css/cssom/LengthValue.h ('k') | third_party/WebKit/Source/core/css/cssom/LengthValue.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698