| OLD | NEW |
| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 {% endfor %} | 43 {% endfor %} |
| 44 | 44 |
| 45 // Lookup table mapping CSSPropertyID to index in the cssPropertyDescriptors | 45 // Lookup table mapping CSSPropertyID to index in the cssPropertyDescriptors |
| 46 // table | 46 // table |
| 47 static size_t CSSDescriptorIndices[] = { | 47 static size_t CSSDescriptorIndices[] = { |
| 48 {% for id in descriptor_indices %} | 48 {% for id in descriptor_indices %} |
| 49 {{id}}, | 49 {{id}}, |
| 50 {% endfor %} | 50 {% endfor %} |
| 51 }; | 51 }; |
| 52 | 52 |
| 53 const CSSPropertyDescriptor& CSSPropertyDescriptor::get(CSSPropertyID id) { | 53 const CSSPropertyDescriptor& CSSPropertyDescriptor::Get(CSSPropertyID id) { |
| 54 return cssPropertyDescriptors[CSSDescriptorIndices[id]]; | 54 return cssPropertyDescriptors[CSSDescriptorIndices[id]]; |
| 55 } | 55 } |
| 56 | 56 |
| 57 } // namespace blink | 57 } // namespace blink |
| OLD | NEW |