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

Side by Side Diff: third_party/WebKit/Source/core/css/cssom/StyleValueFactory.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 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/StyleValueFactory.h" 5 #include "core/css/cssom/StyleValueFactory.h"
6 6
7 #include "core/css/CSSImageValue.h" 7 #include "core/css/CSSImageValue.h"
8 #include "core/css/CSSValue.h" 8 #include "core/css/CSSValue.h"
9 #include "core/css/cssom/CSSNumberValue.h" 9 #include "core/css/cssom/CSSNumberValue.h"
10 #include "core/css/cssom/CSSSimpleLength.h" 10 #include "core/css/cssom/CSSSimpleLength.h"
11 #include "core/css/cssom/CSSStyleValue.h" 11 #include "core/css/cssom/CSSStyleValue.h"
12 #include "core/css/cssom/CSSStyleVariableReferenceValue.h" 12 #include "core/css/cssom/CSSStyleVariableReferenceValue.h"
13 #include "core/css/cssom/CSSTransformValue.h" 13 #include "core/css/cssom/CSSTransformValue.h"
14 #include "core/css/cssom/CSSURLImageValue.h" 14 #include "core/css/cssom/CSSURLImageValue.h"
15 #include "core/css/cssom/CSSUnparsedValue.h" 15 #include "core/css/cssom/CSSUnparsedValue.h"
16 #include "core/css/cssom/CSSUnsupportedStyleValue.h" 16 #include "core/css/cssom/CSSUnsupportedStyleValue.h"
17 17
18 namespace blink { 18 namespace blink {
19 namespace cssom {
19 20
20 namespace { 21 namespace {
21 22
22 CSSStyleValue* styleValueForProperty(CSSPropertyID propertyID, const CSSValue& v alue) 23 CSSStyleValue* styleValueForProperty(CSSPropertyID propertyID, const CSSValue& v alue)
23 { 24 {
24 switch (propertyID) { 25 switch (propertyID) {
25 case CSSPropertyTransform: 26 case CSSPropertyTransform:
26 return CSSTransformValue::fromCSSValue(value); 27 return CSSTransformValue::fromCSSValue(value);
27 default: 28 default:
28 // TODO(meade): Implement other complex properties. 29 // TODO(meade): Implement other complex properties.
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 for (const CSSValue* innerValue : cssValueList) { 77 for (const CSSValue* innerValue : cssValueList) {
77 styleValue = styleValueForProperty(propertyID, *innerValue); 78 styleValue = styleValueForProperty(propertyID, *innerValue);
78 if (!styleValue) { 79 if (!styleValue) {
79 return unsupportedCSSValue(value); 80 return unsupportedCSSValue(value);
80 } 81 }
81 styleValueVector.append(styleValue); 82 styleValueVector.append(styleValue);
82 } 83 }
83 return styleValueVector; 84 return styleValueVector;
84 } 85 }
85 86
87 } // namespace cssom
86 } // namespace blink 88 } // namespace blink
89
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698