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 | 4 |
5 #include "core/css/cssom/CSSOMKeywords.h" | 5 #include "core/css/cssom/CSSOMKeywords.h" |
6 | 6 |
7 #include "core/css/CSSPropertyIDTemplates.h" | 7 #include "core/css/CSSPropertyIDTemplates.h" |
8 #include "core/css/cssom/CSSKeywordValue.h" | 8 #include "core/css/cssom/CSSKeywordValue.h" |
9 #include "wtf/HashMap.h" | 9 #include "wtf/HashMap.h" |
10 | 10 |
11 namespace blink { | 11 namespace blink { |
| 12 namespace cssom { |
12 | 13 |
13 namespace { | 14 namespace { |
14 | 15 |
15 using KeywordTable = HashMap<CSSPropertyID, Vector<CSSValueID>>; | 16 using KeywordTable = HashMap<CSSPropertyID, Vector<CSSValueID>>; |
16 | 17 |
17 KeywordTable createKeywordTable() | 18 KeywordTable createKeywordTable() |
18 { | 19 { |
19 KeywordTable table; | 20 KeywordTable table; |
20 | 21 |
21 {% for property_id, property in properties.items() if property.keywordIDs %} | 22 {% for property_id, property in properties.items() if property.keywordIDs %} |
(...skipping 29 matching lines...) Expand all Loading... |
51 } | 52 } |
52 | 53 |
53 const KeywordTable::iterator tableIterator = keywordTable().find(id); | 54 const KeywordTable::iterator tableIterator = keywordTable().find(id); |
54 if (tableIterator == keywordTable().end()) { | 55 if (tableIterator == keywordTable().end()) { |
55 return false; | 56 return false; |
56 } | 57 } |
57 | 58 |
58 return tableIterator->value.contains(valueID); | 59 return tableIterator->value.contains(valueID); |
59 } | 60 } |
60 | 61 |
| 62 } // namespace cssom |
61 } // namespace blink | 63 } // namespace blink |
OLD | NEW |