OLD | NEW |
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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 "config.h" | 5 #include "config.h" |
6 #include "core/css/CSSStyleDeclaration.h" | 6 #include "core/css/CSSStyleDeclaration.h" |
7 | 7 |
8 #include "bindings/core/v8/V8Binding.h" | 8 #include "bindings/core/v8/V8Binding.h" |
9 #include "core/css/CSSPropertyMetadata.h" | 9 #include "core/css/CSSPropertyMetadata.h" |
10 #include "core/css/parser/CSSParser.h" | 10 #include "core/css/parser/CSSParser.h" |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 std::sort(propertyNames.begin(), propertyNames.end(), codePointCompareLe
ssThan); | 139 std::sort(propertyNames.begin(), propertyNames.end(), codePointCompareLe
ssThan); |
140 propertyNamesLength = propertyNames.size(); | 140 propertyNamesLength = propertyNames.size(); |
141 } | 141 } |
142 for (unsigned i = 0; i < propertyNamesLength; ++i) { | 142 for (unsigned i = 0; i < propertyNamesLength; ++i) { |
143 String key = propertyNames.at(i); | 143 String key = propertyNames.at(i); |
144 ASSERT(!key.isNull()); | 144 ASSERT(!key.isNull()); |
145 names.append(key); | 145 names.append(key); |
146 } | 146 } |
147 } | 147 } |
148 | 148 |
149 bool CSSStyleDeclaration::namedPropertyQuery(ScriptState* scriptState, const Ato
micString& name, ExceptionState&) | |
150 { | |
151 // NOTE: cssPropertyInfo lookups incur several mallocs. | |
152 // Successful lookups have the same cost the first time, but are cached. | |
153 if (cssPropertyInfo(name, scriptState->isolate())) | |
154 return true; | |
155 return false; | |
156 } | 149 } |
157 | |
158 } | |
OLD | NEW |