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

Unified Diff: third_party/WebKit/Source/core/css/cssom/SimpleLength.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/SimpleLength.cpp
diff --git a/third_party/WebKit/Source/core/css/cssom/SimpleLength.cpp b/third_party/WebKit/Source/core/css/cssom/SimpleLength.cpp
deleted file mode 100644
index ccb71cb395c33fa2de8e5a8a1d6f58fb21b05f89..0000000000000000000000000000000000000000
--- a/third_party/WebKit/Source/core/css/cssom/SimpleLength.cpp
+++ /dev/null
@@ -1,55 +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/SimpleLength.h"
-
-#include "core/css/CSSPrimitiveValue.h"
-#include "core/css/cssom/StyleCalcLength.h"
-#include "wtf/text/StringBuilder.h"
-
-namespace blink {
-
-CSSValue* SimpleLength::toCSSValue() const
-{
- return cssValuePool().createValue(m_value, m_unit);
-}
-
-bool SimpleLength::containsPercent() const
-{
- return lengthUnit() == CSSPrimitiveValue::UnitType::Percentage;
-}
-
-LengthValue* SimpleLength::addInternal(const LengthValue* other, ExceptionState& exceptionState)
-{
- const SimpleLength* o = toSimpleLength(other);
- if (m_unit == o->m_unit)
- return create(m_value + o->value(), m_unit);
-
- // Different units resolve to a calc.
- StyleCalcLength* result = StyleCalcLength::create(this, exceptionState);
- return result->add(other, exceptionState);
-}
-
-LengthValue* SimpleLength::subtractInternal(const LengthValue* other, ExceptionState& exceptionState)
-{
- const SimpleLength* o = toSimpleLength(other);
- if (m_unit == o->m_unit)
- return create(m_value - o->value(), m_unit);
-
- // Different units resolve to a calc.
- StyleCalcLength* result = StyleCalcLength::create(this, exceptionState);
- return result->subtract(other, exceptionState);
-}
-
-LengthValue* SimpleLength::multiplyInternal(double x, ExceptionState& exceptionState)
-{
- return create(m_value * x, m_unit);
-}
-
-LengthValue* SimpleLength::divideInternal(double x, ExceptionState& exceptionState)
-{
- return create(m_value / x, m_unit);
-}
-
-} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/css/cssom/SimpleLength.h ('k') | third_party/WebKit/Source/core/css/cssom/SimpleLength.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698