Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 the chromium authors. All rights reserved. | |
|
Timothy Loh
2016/04/15 04:16:07
some capitalization got lost here
meade_UTC10
2016/04/27 05:53:56
Done.
| |
| 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 ASSERT(propertyID != CSSPropertyInvalid); | |
|
Timothy Loh
2016/04/15 04:16:07
let's remove these as discussed onthe other patch
meade_UTC10
2016/04/27 05:53:56
Done.
| |
| 15 | |
| 16 CSSValue* cssValue = m_computedStyleDeclaration->getPropertyCSSValueInternal (propertyID); | |
| 17 return cssValueToStyleValueVector(propertyID, *cssValue); | |
| 18 } | |
| 19 | |
| 20 bool ComputedStylePropertyMap::has(CSSPropertyID propertyID) | |
| 21 { | |
| 22 ASSERT(propertyID != CSSPropertyInvalid); | |
| 23 | |
| 24 CSSValue* cssValue = m_computedStyleDeclaration->getPropertyCSSValueInternal (propertyID); | |
| 25 if (!cssValue) | |
| 26 return false; | |
| 27 | |
| 28 return (!cssValue->isValueList() || toCSSValueList(cssValue)->length() > 0); | |
| 29 } | |
| 30 | |
| 31 Vector<String> ComputedStylePropertyMap::getProperties() | |
| 32 { | |
| 33 Vector<String> result; | |
| 34 for (unsigned i = 0; i < m_computedStyleDeclaration->length(); i++) { | |
| 35 result.append(m_computedStyleDeclaration->item(i)); | |
| 36 } | |
| 37 return result; | |
| 38 } | |
| 39 | |
| 40 } // namespace blink | |
| OLD | NEW |