OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004 Zack Rusin <zack@kde.org> | 2 * Copyright (C) 2004 Zack Rusin <zack@kde.org> |
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
All rights reserved. |
4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> | 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> |
6 * Copyright (C) 2011 Sencha, Inc. All rights reserved. | 6 * Copyright (C) 2011 Sencha, Inc. All rights reserved. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Lesser General Public | 9 * modify it under the terms of the GNU Lesser General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 3045 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3056 ASSERT(RuntimeEnabledFeatures::cssVariablesEnabled()); | 3056 ASSERT(RuntimeEnabledFeatures::cssVariablesEnabled()); |
3057 return false; | 3057 return false; |
3058 } | 3058 } |
3059 | 3059 |
3060 void CSSComputedStyleDeclaration::clearVariables(ExceptionState& es) | 3060 void CSSComputedStyleDeclaration::clearVariables(ExceptionState& es) |
3061 { | 3061 { |
3062 ASSERT(RuntimeEnabledFeatures::cssVariablesEnabled()); | 3062 ASSERT(RuntimeEnabledFeatures::cssVariablesEnabled()); |
3063 es.throwDOMException(NoModificationAllowedError); | 3063 es.throwDOMException(NoModificationAllowedError); |
3064 } | 3064 } |
3065 | 3065 |
| 3066 CSSComputedStyleDeclaration::ComputedCSSVariablesIterator::ComputedCSSVariablesI
terator(const HashMap<AtomicString, String>* variables) |
| 3067 : m_active(variables) |
| 3068 { |
| 3069 ASSERT(RuntimeEnabledFeatures::cssVariablesEnabled()); |
| 3070 if (m_active) { |
| 3071 m_it = variables->begin(); |
| 3072 m_end = variables->end(); |
| 3073 } |
| 3074 } |
| 3075 |
| 3076 void CSSComputedStyleDeclaration::ComputedCSSVariablesIterator::advance() |
| 3077 { |
| 3078 ASSERT(m_active); |
| 3079 ++m_it; |
| 3080 m_active = !atEnd(); |
| 3081 } |
| 3082 |
| 3083 AtomicString CSSComputedStyleDeclaration::ComputedCSSVariablesIterator::name() c
onst |
| 3084 { |
| 3085 ASSERT(m_active); |
| 3086 return m_it->key; |
| 3087 } |
| 3088 |
| 3089 String CSSComputedStyleDeclaration::ComputedCSSVariablesIterator::value() const |
| 3090 { |
| 3091 ASSERT(m_active); |
| 3092 return m_it->value; |
| 3093 } |
| 3094 |
| 3095 |
3066 PassRefPtr<CSSValueList> CSSComputedStyleDeclaration::getBackgroundShorthandValu
e() const | 3096 PassRefPtr<CSSValueList> CSSComputedStyleDeclaration::getBackgroundShorthandValu
e() const |
3067 { | 3097 { |
3068 static const CSSPropertyID propertiesBeforeSlashSeperator[5] = { CSSProperty
BackgroundColor, CSSPropertyBackgroundImage, | 3098 static const CSSPropertyID propertiesBeforeSlashSeperator[5] = { CSSProperty
BackgroundColor, CSSPropertyBackgroundImage, |
3069 CSSProperty
BackgroundRepeat, CSSPropertyBackgroundAttachment, | 3099 CSSProperty
BackgroundRepeat, CSSPropertyBackgroundAttachment, |
3070 CSSProperty
BackgroundPosition }; | 3100 CSSProperty
BackgroundPosition }; |
3071 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB
ackgroundSize, CSSPropertyBackgroundOrigin, | 3101 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB
ackgroundSize, CSSPropertyBackgroundOrigin, |
3072 CSSPropertyB
ackgroundClip }; | 3102 CSSPropertyB
ackgroundClip }; |
3073 | 3103 |
3074 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated(); | 3104 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated(); |
3075 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha
nd(CSSPropertyBackground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(prope
rtiesBeforeSlashSeperator)))); | 3105 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha
nd(CSSPropertyBackground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(prope
rtiesBeforeSlashSeperator)))); |
3076 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha
nd(CSSPropertyBackground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(proper
tiesAfterSlashSeperator)))); | 3106 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha
nd(CSSPropertyBackground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(proper
tiesAfterSlashSeperator)))); |
3077 return list.release(); | 3107 return list.release(); |
3078 } | 3108 } |
3079 | 3109 |
3080 } // namespace WebCore | 3110 } // namespace WebCore |
OLD | NEW |