| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 { | 45 { |
| 46 return adoptRef(new CSSVariablesMap(styleDeclaration)); | 46 return adoptRef(new CSSVariablesMap(styleDeclaration)); |
| 47 } | 47 } |
| 48 | 48 |
| 49 unsigned size() const; | 49 unsigned size() const; |
| 50 String get(const AtomicString& name) const; | 50 String get(const AtomicString& name) const; |
| 51 bool has(const AtomicString& name) const; | 51 bool has(const AtomicString& name) const; |
| 52 void set(const AtomicString& name, const String& value, ExceptionState&); | 52 void set(const AtomicString& name, const String& value, ExceptionState&); |
| 53 bool remove(const AtomicString& name); | 53 bool remove(const AtomicString& name); |
| 54 void clear(ExceptionState&); | 54 void clear(ExceptionState&); |
| 55 void forEach(PassRefPtr<CSSVariablesMapForEachCallback>, ScriptValue& thisAr
g) const; | 55 void forEach(PassOwnPtr<CSSVariablesMapForEachCallback>, ScriptValue& thisAr
g) const; |
| 56 void forEach(PassRefPtr<CSSVariablesMapForEachCallback>) const; | 56 void forEach(PassOwnPtr<CSSVariablesMapForEachCallback>) const; |
| 57 | 57 |
| 58 void clearStyleDeclaration() { m_styleDeclaration = 0; } | 58 void clearStyleDeclaration() { m_styleDeclaration = 0; } |
| 59 | 59 |
| 60 private: | 60 private: |
| 61 explicit CSSVariablesMap(CSSStyleDeclaration* styleDeclaration) | 61 explicit CSSVariablesMap(CSSStyleDeclaration* styleDeclaration) |
| 62 : m_styleDeclaration(styleDeclaration) | 62 : m_styleDeclaration(styleDeclaration) |
| 63 { | 63 { |
| 64 ASSERT(RuntimeEnabledFeatures::cssVariablesEnabled()); | 64 ASSERT(RuntimeEnabledFeatures::cssVariablesEnabled()); |
| 65 } | 65 } |
| 66 | 66 |
| 67 void forEach(PassRefPtr<CSSVariablesMapForEachCallback>, ScriptValue* thisAr
g) const; | 67 void forEach(PassOwnPtr<CSSVariablesMapForEachCallback>, ScriptValue* thisAr
g) const; |
| 68 | 68 |
| 69 CSSStyleDeclaration* m_styleDeclaration; | 69 CSSStyleDeclaration* m_styleDeclaration; |
| 70 typedef Vector<CSSVariablesIterator*> Iterators; | 70 typedef Vector<CSSVariablesIterator*> Iterators; |
| 71 mutable Iterators m_activeIterators; | 71 mutable Iterators m_activeIterators; |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 } // namespace WebCore | 74 } // namespace WebCore |
| 75 | 75 |
| 76 #endif // CSSVariablesMap_h | 76 #endif // CSSVariablesMap_h |
| OLD | NEW |