OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #include "core/css/cssom/ComputedStylePropertyMap.h" | |
6 | |
7 #include "core/css/CSSComputedStyleDeclaration.h" | |
8 #include "core/css/cssom/StyleValueFactory.h" | |
9 | |
10 namespace blink { | |
11 | |
12 StylePropertyMap::StyleValueVector ComputedStylePropertyMap::getAll(CSSPropertyI D propertyID) | |
13 { | |
14 CSSValue* cssValue = m_computedStyleDeclaration->getPropertyCSSValueInternal (propertyID); | |
15 return cssValueToStyleValueVector(propertyID, *cssValue); | |
16 } | |
17 | |
18 bool ComputedStylePropertyMap::has(CSSPropertyID propertyID) | |
19 { | |
20 CSSValue* cssValue = m_computedStyleDeclaration->getPropertyCSSValueInternal (propertyID); | |
21 if (!cssValue) | |
22 return false; | |
23 | |
24 return (!cssValue->isValueList() || toCSSValueList(cssValue)->length() > 0); | |
Timothy Loh
2016/05/13 02:08:23
Commenting on this again - let's just change it to
meade_UTC10
2016/05/13 05:05:31
I changed this to use the base class version inste
| |
25 } | |
26 | |
27 Vector<String> ComputedStylePropertyMap::getProperties() | |
28 { | |
29 Vector<String> result; | |
30 for (unsigned i = 0; i < m_computedStyleDeclaration->length(); i++) { | |
31 result.append(m_computedStyleDeclaration->item(i)); | |
32 } | |
33 return result; | |
34 } | |
35 | |
36 } // namespace blink | |
OLD | NEW |