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

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

Issue 2849133002: Added property id comments to CSSDescriptorIndices entries. (Closed)
Patch Set: replaced unrelated whitespace Created 3 years, 7 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
« no previous file with comments | « third_party/WebKit/Source/build/scripts/make_css_property_apis.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 {% from 'macros.tmpl' import license, print_if %}
1 // Copyright 2016 The Chromium Authors. All rights reserved. 2 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 3 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 4 // found in the LICENSE file.
4 #include "core/css/properties/CSSPropertyDescriptor.h" 5 #include "core/css/properties/CSSPropertyDescriptor.h"
5 6
6 {% for api_class in api_classes %} 7 {% for api_class in api_classes %}
7 #include "core/css/properties/{{api_class.classname}}.h" 8 #include "core/css/properties/{{api_class.classname}}.h"
8 {% endfor %} 9 {% endfor %}
9 10
10 namespace blink { 11 namespace blink {
(...skipping 27 matching lines...) Expand all
38 }; 39 };
39 40
40 {% for api_method_name in ordered_api_method_names %} 41 {% for api_method_name in ordered_api_method_names %}
41 static_assert(cssPropertyDescriptors[INVALID_DESCRIPTOR_INDEX].{{api_method_name }} == nullptr, 42 static_assert(cssPropertyDescriptors[INVALID_DESCRIPTOR_INDEX].{{api_method_name }} == nullptr,
42 "Invalid CSSPropertyDescriptor contains non-nullptr member"); 43 "Invalid CSSPropertyDescriptor contains non-nullptr member");
43 {% endfor %} 44 {% endfor %}
44 45
45 // Lookup table mapping CSSPropertyID to index in the cssPropertyDescriptors 46 // Lookup table mapping CSSPropertyID to index in the cssPropertyDescriptors
46 // table 47 // table
47 static size_t CSSDescriptorIndices[] = { 48 static size_t CSSDescriptorIndices[] = {
48 {% for id in descriptor_indices %} 49 {% for item in descriptor_indices %}
49 {{id}}, 50 {{descriptor_indices[item].id}},{{print_if(descriptor_indices[item].api != No ne, ' // ' ~ descriptor_indices[item].api)}}
50 {% endfor %} 51 {% endfor %}
51 }; 52 };
52 53
53 const CSSPropertyDescriptor& CSSPropertyDescriptor::Get(CSSPropertyID id) { 54 const CSSPropertyDescriptor& CSSPropertyDescriptor::Get(CSSPropertyID id) {
54 return cssPropertyDescriptors[CSSDescriptorIndices[id]]; 55 return cssPropertyDescriptors[CSSDescriptorIndices[id]];
55 } 56 }
56 57
57 } // namespace blink 58 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/build/scripts/make_css_property_apis.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698