Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2012 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| 11 * documentation and/or other materials provided with the distribution. | 11 * documentation and/or other materials provided with the distribution. |
| 12 * | 12 * |
| 13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY | 13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY |
| 14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | 14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | 15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR | 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR |
| 17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | 17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
| 18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | 18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
| 19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | 19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
| 20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | 20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY |
| 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #ifndef PropertySetCSSStyleDeclaration_h | 26 #ifndef PropertySetCSSStyleDeclaration_h |
| 27 #define PropertySetCSSStyleDeclaration_h | 27 #define PropertySetCSSStyleDeclaration_h |
| 28 | 28 |
| 29 #include "core/css/CSSStyleDeclaration.h" | 29 #include "core/css/CSSStyleDeclaration.h" |
| 30 #include "core/css/CSSVariablesMap.h" | |
| 30 #include <wtf/HashMap.h> | 31 #include <wtf/HashMap.h> |
| 31 | 32 |
| 32 namespace WebCore { | 33 namespace WebCore { |
| 33 | 34 |
| 34 class CSSRule; | 35 class CSSRule; |
| 35 class CSSProperty; | 36 class CSSProperty; |
| 36 class CSSValue; | 37 class CSSValue; |
| 37 class MutableStylePropertySet; | 38 class MutableStylePropertySet; |
| 38 class StyleSheetContents; | 39 class StyleSheetContents; |
| 39 class Element; | 40 class Element; |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 60 virtual String getPropertyPriority(const String& propertyName) OVERRIDE; | 61 virtual String getPropertyPriority(const String& propertyName) OVERRIDE; |
| 61 virtual String getPropertyShorthand(const String& propertyName) OVERRIDE; | 62 virtual String getPropertyShorthand(const String& propertyName) OVERRIDE; |
| 62 virtual bool isPropertyImplicit(const String& propertyName) OVERRIDE; | 63 virtual bool isPropertyImplicit(const String& propertyName) OVERRIDE; |
| 63 virtual void setProperty(const String& propertyName, const String& value, co nst String& priority, ExceptionCode&) OVERRIDE; | 64 virtual void setProperty(const String& propertyName, const String& value, co nst String& priority, ExceptionCode&) OVERRIDE; |
| 64 virtual String removeProperty(const String& propertyName, ExceptionCode&) OV ERRIDE; | 65 virtual String removeProperty(const String& propertyName, ExceptionCode&) OV ERRIDE; |
| 65 virtual String cssText() const OVERRIDE; | 66 virtual String cssText() const OVERRIDE; |
| 66 virtual void setCssText(const String&, ExceptionCode&) OVERRIDE; | 67 virtual void setCssText(const String&, ExceptionCode&) OVERRIDE; |
| 67 virtual PassRefPtr<CSSValue> getPropertyCSSValueInternal(CSSPropertyID) OVER RIDE; | 68 virtual PassRefPtr<CSSValue> getPropertyCSSValueInternal(CSSPropertyID) OVER RIDE; |
| 68 virtual String getPropertyValueInternal(CSSPropertyID) OVERRIDE; | 69 virtual String getPropertyValueInternal(CSSPropertyID) OVERRIDE; |
| 69 virtual void setPropertyInternal(CSSPropertyID, const String& value, bool im portant, ExceptionCode&) OVERRIDE; | 70 virtual void setPropertyInternal(CSSPropertyID, const String& value, bool im portant, ExceptionCode&) OVERRIDE; |
| 70 | 71 |
| 72 virtual PassRefPtr<CSSVariablesMap> var() OVERRIDE { return CSSVariablesMap: :create(this); } | |
|
esprehn
2013/07/10 02:42:11
This doesn't need to be virtual, all subclasses ne
alancutter (OOO until 2018)
2013/07/10 11:18:13
Done.
| |
| 73 virtual unsigned variableCount() const OVERRIDE; | |
| 74 virtual String variableValue(const AtomicString& name) const OVERRIDE; | |
| 75 virtual void setVariableValue(const AtomicString& name, const String& value, ExceptionCode&) OVERRIDE; | |
| 76 virtual bool removeVariable(const AtomicString& name) OVERRIDE; | |
| 77 virtual void clearVariables(ExceptionCode&) OVERRIDE; | |
| 78 | |
| 71 virtual bool cssPropertyMatches(CSSPropertyID, const CSSValue*) const OVERRI DE; | 79 virtual bool cssPropertyMatches(CSSPropertyID, const CSSValue*) const OVERRI DE; |
| 72 virtual PassRefPtr<MutableStylePropertySet> copyProperties() const OVERRIDE; | 80 virtual PassRefPtr<MutableStylePropertySet> copyProperties() const OVERRIDE; |
| 73 | 81 |
| 74 CSSValue* cloneAndCacheForCSSOM(CSSValue*); | 82 CSSValue* cloneAndCacheForCSSOM(CSSValue*); |
| 75 | 83 |
| 76 protected: | 84 protected: |
| 77 enum MutationType { NoChanges, PropertyChanged }; | 85 enum MutationType { NoChanges, PropertyChanged }; |
| 78 virtual void willMutate() { } | 86 virtual void willMutate() { } |
| 79 virtual void didMutate(MutationType) { } | 87 virtual void didMutate(MutationType) { } |
| 80 | 88 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 131 virtual void clearParentElement() OVERRIDE { m_parentElement = 0; } | 139 virtual void clearParentElement() OVERRIDE { m_parentElement = 0; } |
| 132 | 140 |
| 133 virtual void didMutate(MutationType) OVERRIDE; | 141 virtual void didMutate(MutationType) OVERRIDE; |
| 134 | 142 |
| 135 Element* m_parentElement; | 143 Element* m_parentElement; |
| 136 }; | 144 }; |
| 137 | 145 |
| 138 } // namespace WebCore | 146 } // namespace WebCore |
| 139 | 147 |
| 140 #endif | 148 #endif |
| OLD | NEW |