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

Side by Side Diff: third_party/WebKit/Source/core/css/cssom/CSSSimpleLength.cpp

Issue 2367663002: [WIP] Attempt to move everything cssom into a cssom namespace (Closed)
Patch Set: Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/css/cssom/CSSSimpleLength.h" 5 #include "core/css/cssom/CSSSimpleLength.h"
6 6
7 #include "core/css/CSSPrimitiveValue.h" 7 #include "core/css/CSSPrimitiveValue.h"
8 #include "core/css/cssom/CSSCalcLength.h" 8 #include "core/css/cssom/CSSCalcLength.h"
9 #include "wtf/text/StringBuilder.h" 9 #include "wtf/text/StringBuilder.h"
10 10
11 namespace blink { 11 namespace blink {
12 namespace cssom {
12 13
13 CSSValue* CSSSimpleLength::toCSSValue() const 14 CSSValue* CSSSimpleLength::toCSSValue() const
14 { 15 {
15 return CSSPrimitiveValue::create(m_value, m_unit); 16 return CSSPrimitiveValue::create(m_value, m_unit);
16 } 17 }
17 18
18 bool CSSSimpleLength::containsPercent() const 19 bool CSSSimpleLength::containsPercent() const
19 { 20 {
20 return lengthUnit() == CSSPrimitiveValue::UnitType::Percentage; 21 return lengthUnit() == CSSPrimitiveValue::UnitType::Percentage;
21 } 22 }
(...skipping 23 matching lines...) Expand all
45 CSSLengthValue* CSSSimpleLength::multiplyInternal(double x, ExceptionState& exce ptionState) 46 CSSLengthValue* CSSSimpleLength::multiplyInternal(double x, ExceptionState& exce ptionState)
46 { 47 {
47 return create(m_value * x, m_unit); 48 return create(m_value * x, m_unit);
48 } 49 }
49 50
50 CSSLengthValue* CSSSimpleLength::divideInternal(double x, ExceptionState& except ionState) 51 CSSLengthValue* CSSSimpleLength::divideInternal(double x, ExceptionState& except ionState)
51 { 52 {
52 return create(m_value / x, m_unit); 53 return create(m_value / x, m_unit);
53 } 54 }
54 55
56 } // namespace cssom
55 } // namespace blink 57 } // namespace blink
58
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/cssom/CSSSimpleLength.h ('k') | third_party/WebKit/Source/core/css/cssom/CSSSkew.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698