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

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

Issue 2813863003: Rewrite references to "wtf/" to "platform/wtf/" in core/css and core/style. (Closed)
Patch Set: Rebase. Created 3 years, 8 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 "bindings/core/v8/ExceptionState.h" 7 #include "bindings/core/v8/ExceptionState.h"
8 #include "core/css/CSSCalculationValue.h" 8 #include "core/css/CSSCalculationValue.h"
9 #include "core/css/CSSPrimitiveValue.h" 9 #include "core/css/CSSPrimitiveValue.h"
10 #include "core/css/cssom/CSSCalcDictionary.h" 10 #include "core/css/cssom/CSSCalcDictionary.h"
11 #include "core/css/cssom/CSSSimpleLength.h" 11 #include "core/css/cssom/CSSSimpleLength.h"
12 #include "wtf/Vector.h" 12 #include "platform/wtf/Vector.h"
13 13
14 namespace blink { 14 namespace blink {
15 15
16 namespace { 16 namespace {
17 17
18 static CSSPrimitiveValue::UnitType UnitFromIndex(int index) { 18 static CSSPrimitiveValue::UnitType UnitFromIndex(int index) {
19 DCHECK(index < CSSLengthValue::kNumSupportedUnits); 19 DCHECK(index < CSSLengthValue::kNumSupportedUnits);
20 int lowest_value = static_cast<int>(CSSPrimitiveValue::UnitType::kPercentage); 20 int lowest_value = static_cast<int>(CSSPrimitiveValue::UnitType::kPercentage);
21 return static_cast<CSSPrimitiveValue::UnitType>(index + lowest_value); 21 return static_cast<CSSPrimitiveValue::UnitType>(index + lowest_value);
22 } 22 }
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 void CSSCalcLength::UnitData::Divide(double x) { 295 void CSSCalcLength::UnitData::Divide(double x) {
296 DCHECK_NE(x, 0); 296 DCHECK_NE(x, 0);
297 for (int i = 0; i < CSSLengthValue::kNumSupportedUnits; ++i) { 297 for (int i = 0; i < CSSLengthValue::kNumSupportedUnits; ++i) {
298 if (HasAtIndex(i)) { 298 if (HasAtIndex(i)) {
299 SetAtIndex(i, GetAtIndex(i) / x); 299 SetAtIndex(i, GetAtIndex(i) / x);
300 } 300 }
301 } 301 }
302 } 302 }
303 303
304 } // namespace blink 304 } // namespace blink
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