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

Side by Side Diff: third_party/WebKit/Source/build/scripts/templates/CSSPropertyDescriptor.cpp.tmpl

Issue 2329463004: ABANDONED CL: Changes needed to make things compile after running rewrite_to_chrome_style tool. (Closed)
Patch Set: Rebasing the fixes... Created 3 years, 10 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 #include "core/css/properties/CSSPropertyDescriptor.h" 4 #include "core/css/properties/CSSPropertyDescriptor.h"
5 5
6 {% for api_class in api_classes %} 6 {% for api_class in api_classes %}
7 #include "core/css/properties/{{api_class.classname}}.h" 7 #include "core/css/properties/{{api_class.classname}}.h"
8 {% endfor %} 8 {% endfor %}
9 9
10 namespace blink { 10 namespace blink {
(...skipping 14 matching lines...) Expand all
25 { 25 {
26 {% for api_method in api_methods if api_method in api_class.api_methods %} 26 {% for api_method in api_methods if api_method in api_class.api_methods %}
27 {{api_class.classname}}::{{api_method}}, 27 {{api_class.classname}}::{{api_method}},
28 {% else %} 28 {% else %}
29 nullptr, 29 nullptr,
30 {% endfor %} 30 {% endfor %}
31 }, 31 },
32 {% endfor %} 32 {% endfor %}
33 }; 33 };
34 34
35 const CSSPropertyDescriptor& CSSPropertyDescriptor::get(CSSPropertyID id) { 35 const CSSPropertyDescriptor& CSSPropertyDescriptor::Get(CSSPropertyID id) {
36 // TODO(aazzam): We are currently using hard-coded indexes for 36 // TODO(aazzam): We are currently using hard-coded indexes for
37 // cssPropertyDescriptor since we have only implemented a few properties. 37 // cssPropertyDescriptor since we have only implemented a few properties.
38 // Later, generate this switch statement, or alternatively return 38 // Later, generate this switch statement, or alternatively return
39 // cssPropertyDescriptors[id], and generate the cssPropertyDescriptors array 39 // cssPropertyDescriptors[id], and generate the cssPropertyDescriptors array
40 // to hold invalid descriptors for methods which haven't been implemented yet. 40 // to hold invalid descriptors for methods which haven't been implemented yet.
41 switch (id) { 41 switch (id) {
42 {% for api_class in api_classes %} 42 {% for api_class in api_classes %}
43 {% for property_id in api_class.property_ids %} 43 {% for property_id in api_class.property_ids %}
44 case {{property_id}}: 44 case {{property_id}}:
45 {% endfor %} 45 {% endfor %}
46 return cssPropertyDescriptors[{{api_class.index}}]; 46 return cssPropertyDescriptors[{{api_class.index}}];
47 {% endfor %} 47 {% endfor %}
48 default: 48 default:
49 return cssPropertyDescriptors[0]; 49 return cssPropertyDescriptors[0];
50 } 50 }
51 } 51 }
52 52
53 } // namespace blink 53 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698