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 3042 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3053 ASSERT(RuntimeEnabledFeatures::cssVariablesEnabled()); | 3053 ASSERT(RuntimeEnabledFeatures::cssVariablesEnabled()); |
3054 return false; | 3054 return false; |
3055 } | 3055 } |
3056 | 3056 |
3057 void CSSComputedStyleDeclaration::clearVariables(ExceptionCode& ec) | 3057 void CSSComputedStyleDeclaration::clearVariables(ExceptionCode& ec) |
3058 { | 3058 { |
3059 ASSERT(RuntimeEnabledFeatures::cssVariablesEnabled()); | 3059 ASSERT(RuntimeEnabledFeatures::cssVariablesEnabled()); |
3060 ec = NoModificationAllowedError; | 3060 ec = NoModificationAllowedError; |
3061 } | 3061 } |
3062 | 3062 |
| 3063 CSSComputedStyleDeclaration::ComputedCSSVariablesIterator::ComputedCSSVariablesI
terator(const HashMap<AtomicString, String>* variables) |
| 3064 : m_active(variables) |
| 3065 { |
| 3066 ASSERT(RuntimeEnabledFeatures::cssVariablesEnabled()); |
| 3067 if (m_active) { |
| 3068 m_it = variables->begin(); |
| 3069 m_end = variables->end(); |
| 3070 } |
| 3071 } |
| 3072 |
| 3073 void CSSComputedStyleDeclaration::ComputedCSSVariablesIterator::advance() |
| 3074 { |
| 3075 ASSERT(m_active); |
| 3076 ++m_it; |
| 3077 m_active = !atEnd(); |
| 3078 } |
| 3079 |
| 3080 AtomicString CSSComputedStyleDeclaration::ComputedCSSVariablesIterator::name() c
onst |
| 3081 { |
| 3082 ASSERT(m_active); |
| 3083 return m_it->key; |
| 3084 } |
| 3085 |
| 3086 String CSSComputedStyleDeclaration::ComputedCSSVariablesIterator::value() const |
| 3087 { |
| 3088 ASSERT(m_active); |
| 3089 return m_it->value; |
| 3090 } |
| 3091 |
| 3092 |
3063 PassRefPtr<CSSValueList> CSSComputedStyleDeclaration::getBackgroundShorthandValu
e() const | 3093 PassRefPtr<CSSValueList> CSSComputedStyleDeclaration::getBackgroundShorthandValu
e() const |
3064 { | 3094 { |
3065 static const CSSPropertyID propertiesBeforeSlashSeperator[5] = { CSSProperty
BackgroundColor, CSSPropertyBackgroundImage, | 3095 static const CSSPropertyID propertiesBeforeSlashSeperator[5] = { CSSProperty
BackgroundColor, CSSPropertyBackgroundImage, |
3066 CSSProperty
BackgroundRepeat, CSSPropertyBackgroundAttachment, | 3096 CSSProperty
BackgroundRepeat, CSSPropertyBackgroundAttachment, |
3067 CSSProperty
BackgroundPosition }; | 3097 CSSProperty
BackgroundPosition }; |
3068 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB
ackgroundSize, CSSPropertyBackgroundOrigin, | 3098 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB
ackgroundSize, CSSPropertyBackgroundOrigin, |
3069 CSSPropertyB
ackgroundClip }; | 3099 CSSPropertyB
ackgroundClip }; |
3070 | 3100 |
3071 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated(); | 3101 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated(); |
3072 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha
nd(CSSPropertyBackground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(prope
rtiesBeforeSlashSeperator)))); | 3102 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha
nd(CSSPropertyBackground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(prope
rtiesBeforeSlashSeperator)))); |
3073 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha
nd(CSSPropertyBackground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(proper
tiesAfterSlashSeperator)))); | 3103 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha
nd(CSSPropertyBackground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(proper
tiesAfterSlashSeperator)))); |
3074 return list.release(); | 3104 return list.release(); |
3075 } | 3105 } |
3076 | 3106 |
3077 } // namespace WebCore | 3107 } // namespace WebCore |
OLD | NEW |