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

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

Issue 2367663002: [WIP] Attempt to move everything cssom into a cssom namespace (Closed)
Patch Set: Created 4 years, 3 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/CSSCalcLength.h" 5 #include "core/css/cssom/CSSCalcLength.h"
6 6
7 #include "core/css/CSSCalculationValue.h" 7 #include "core/css/CSSCalculationValue.h"
8 #include "core/css/CSSPrimitiveValue.h" 8 #include "core/css/CSSPrimitiveValue.h"
9 #include "core/css/cssom/CSSCalcDictionary.h" 9 #include "core/css/cssom/CSSCalcDictionary.h"
10 #include "core/css/cssom/CSSSimpleLength.h" 10 #include "core/css/cssom/CSSSimpleLength.h"
11 #include "wtf/Vector.h" 11 #include "wtf/Vector.h"
12 12
13 namespace blink { 13 namespace blink {
14 namespace cssom {
14 15
15 CSSCalcLength::CSSCalcLength() : m_values(CSSLengthValue::kNumSupportedUnits), m _hasValues(CSSLengthValue::kNumSupportedUnits) {} 16 CSSCalcLength::CSSCalcLength() : m_values(CSSLengthValue::kNumSupportedUnits), m _hasValues(CSSLengthValue::kNumSupportedUnits) {}
16 17
17 CSSCalcLength::CSSCalcLength(const CSSCalcLength& other) : 18 CSSCalcLength::CSSCalcLength(const CSSCalcLength& other) :
18 m_values(other.m_values), 19 m_values(other.m_values),
19 m_hasValues(other.m_hasValues) 20 m_hasValues(other.m_hasValues)
20 {} 21 {}
21 22
22 CSSCalcLength::CSSCalcLength(const CSSSimpleLength& other) : 23 CSSCalcLength::CSSCalcLength(const CSSSimpleLength& other) :
23 m_values(CSSLengthValue::kNumSupportedUnits), m_hasValues(CSSLengthValue::kN umSupportedUnits) 24 m_values(CSSLengthValue::kNumSupportedUnits), m_hasValues(CSSLengthValue::kN umSupportedUnits)
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 } 142 }
142 } 143 }
143 return CSSPrimitiveValue::create(CSSCalcValue::create(node)); 144 return CSSPrimitiveValue::create(CSSCalcValue::create(node));
144 } 145 }
145 146
146 int CSSCalcLength::indexForUnit(CSSPrimitiveValue::UnitType unit) 147 int CSSCalcLength::indexForUnit(CSSPrimitiveValue::UnitType unit)
147 { 148 {
148 return (static_cast<int>(unit) - static_cast<int>(CSSPrimitiveValue::UnitTyp e::Percentage)); 149 return (static_cast<int>(unit) - static_cast<int>(CSSPrimitiveValue::UnitTyp e::Percentage));
149 } 150 }
150 151
152 } // namespace cssom
151 } // namespace blink 153 } // namespace blink
154
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/cssom/CSSCalcLength.h ('k') | third_party/WebKit/Source/core/css/cssom/CSSKeywordValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698