| 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 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 class ExceptionState; | 39 class ExceptionState; |
| 40 class MutableStylePropertySet; | 40 class MutableStylePropertySet; |
| 41 class StyleSheetContents; | 41 class StyleSheetContents; |
| 42 | 42 |
| 43 class AbstractPropertySetCSSStyleDeclaration : public CSSStyleDeclaration { | 43 class AbstractPropertySetCSSStyleDeclaration : public CSSStyleDeclaration { |
| 44 public: | 44 public: |
| 45 virtual Element* parentElement() const { return 0; } | 45 virtual Element* parentElement() const { return 0; } |
| 46 virtual void clearParentElement() { ASSERT_NOT_REACHED(); } | 46 virtual void clearParentElement() { ASSERT_NOT_REACHED(); } |
| 47 StyleSheetContents* contextStyleSheet() const; | 47 StyleSheetContents* contextStyleSheet() const; |
| 48 | 48 |
| 49 protected: |
| 50 virtual PassRefPtr<CSSVariablesIterator> variablesIterator() const OVERRIDE; |
| 51 |
| 49 private: | 52 private: |
| 50 virtual CSSRule* parentRule() const OVERRIDE { return 0; }; | 53 virtual CSSRule* parentRule() const OVERRIDE { return 0; }; |
| 51 virtual unsigned length() const OVERRIDE; | 54 virtual unsigned length() const OVERRIDE; |
| 52 virtual String item(unsigned index) const OVERRIDE; | 55 virtual String item(unsigned index) const OVERRIDE; |
| 53 virtual PassRefPtr<CSSValue> getPropertyCSSValue(const String& propertyName)
OVERRIDE; | 56 virtual PassRefPtr<CSSValue> getPropertyCSSValue(const String& propertyName)
OVERRIDE; |
| 54 virtual String getPropertyValue(const String& propertyName) OVERRIDE; | 57 virtual String getPropertyValue(const String& propertyName) OVERRIDE; |
| 55 virtual String getPropertyPriority(const String& propertyName) OVERRIDE; | 58 virtual String getPropertyPriority(const String& propertyName) OVERRIDE; |
| 56 virtual String getPropertyShorthand(const String& propertyName) OVERRIDE; | 59 virtual String getPropertyShorthand(const String& propertyName) OVERRIDE; |
| 57 virtual bool isPropertyImplicit(const String& propertyName) OVERRIDE; | 60 virtual bool isPropertyImplicit(const String& propertyName) OVERRIDE; |
| 58 virtual void setProperty(const String& propertyName, const String& value, co
nst String& priority, ExceptionState&) OVERRIDE; | 61 virtual void setProperty(const String& propertyName, const String& value, co
nst String& priority, ExceptionState&) OVERRIDE; |
| 59 virtual String removeProperty(const String& propertyName, ExceptionState&) O
VERRIDE; | 62 virtual String removeProperty(const String& propertyName, ExceptionState&) O
VERRIDE; |
| 60 virtual String cssText() const OVERRIDE; | 63 virtual String cssText() const OVERRIDE; |
| 61 virtual void setCSSText(const String&, ExceptionState&) OVERRIDE; | 64 virtual void setCSSText(const String&, ExceptionState&) OVERRIDE; |
| 62 virtual PassRefPtr<CSSValue> getPropertyCSSValueInternal(CSSPropertyID) OVER
RIDE; | 65 virtual PassRefPtr<CSSValue> getPropertyCSSValueInternal(CSSPropertyID) OVER
RIDE; |
| 63 virtual String getPropertyValueInternal(CSSPropertyID) OVERRIDE; | 66 virtual String getPropertyValueInternal(CSSPropertyID) OVERRIDE; |
| 64 virtual void setPropertyInternal(CSSPropertyID, const String& value, bool im
portant, ExceptionState&) OVERRIDE; | 67 virtual void setPropertyInternal(CSSPropertyID, const String& value, bool im
portant, ExceptionState&) OVERRIDE; |
| 65 | 68 |
| 66 virtual unsigned variableCount() const OVERRIDE; | 69 virtual unsigned variableCount() const OVERRIDE; |
| 67 virtual String variableValue(const AtomicString& name) const OVERRIDE; | 70 virtual String variableValue(const AtomicString& name) const OVERRIDE; |
| 68 virtual bool setVariableValue(const AtomicString& name, const String& value,
ExceptionState&) OVERRIDE; | 71 virtual bool setVariableValue(const AtomicString& name, const String& value,
ExceptionState&) OVERRIDE; |
| 69 virtual bool removeVariable(const AtomicString& name) OVERRIDE; | 72 virtual bool removeVariable(const AtomicString& name) OVERRIDE; |
| 70 virtual bool clearVariables(ExceptionState&) OVERRIDE; | 73 virtual bool clearVariables(ExceptionState&) OVERRIDE; |
| 71 virtual PassRefPtr<CSSVariablesIterator> variablesIterator() const OVERRIDE; | |
| 72 | 74 |
| 73 virtual bool cssPropertyMatches(CSSPropertyID, const CSSValue*) const OVERRI
DE; | 75 virtual bool cssPropertyMatches(CSSPropertyID, const CSSValue*) const OVERRI
DE; |
| 74 virtual PassRefPtr<MutableStylePropertySet> copyProperties() const OVERRIDE; | 76 virtual PassRefPtr<MutableStylePropertySet> copyProperties() const OVERRIDE; |
| 75 | 77 |
| 76 CSSValue* cloneAndCacheForCSSOM(CSSValue*); | 78 CSSValue* cloneAndCacheForCSSOM(CSSValue*); |
| 77 | 79 |
| 78 protected: | 80 protected: |
| 79 enum MutationType { NoChanges, PropertyChanged }; | 81 enum MutationType { NoChanges, PropertyChanged }; |
| 80 virtual void willMutate() { } | 82 virtual void willMutate() { } |
| 81 virtual void didMutate(MutationType) { } | 83 virtual void didMutate(MutationType) { } |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 | 131 |
| 130 class InlineCSSStyleDeclaration : public AbstractPropertySetCSSStyleDeclaration | 132 class InlineCSSStyleDeclaration : public AbstractPropertySetCSSStyleDeclaration |
| 131 { | 133 { |
| 132 public: | 134 public: |
| 133 explicit InlineCSSStyleDeclaration(Element* parentElement) | 135 explicit InlineCSSStyleDeclaration(Element* parentElement) |
| 134 : m_parentElement(parentElement) | 136 : m_parentElement(parentElement) |
| 135 { | 137 { |
| 136 } | 138 } |
| 137 | 139 |
| 138 private: | 140 private: |
| 141 virtual PassRefPtr<CSSVariablesIterator> variablesIterator() const OVERRIDE; |
| 139 virtual MutableStylePropertySet* propertySet() const OVERRIDE; | 142 virtual MutableStylePropertySet* propertySet() const OVERRIDE; |
| 140 virtual void ref() OVERRIDE; | 143 virtual void ref() OVERRIDE; |
| 141 virtual void deref() OVERRIDE; | 144 virtual void deref() OVERRIDE; |
| 142 virtual CSSStyleSheet* parentStyleSheet() const OVERRIDE; | 145 virtual CSSStyleSheet* parentStyleSheet() const OVERRIDE; |
| 143 virtual Element* parentElement() const OVERRIDE { return m_parentElement; } | 146 virtual Element* parentElement() const OVERRIDE { return m_parentElement; } |
| 144 virtual void clearParentElement() OVERRIDE { m_parentElement = 0; } | 147 virtual void clearParentElement() OVERRIDE { m_parentElement = 0; } |
| 145 | 148 |
| 146 virtual void didMutate(MutationType) OVERRIDE; | 149 virtual void didMutate(MutationType) OVERRIDE; |
| 147 | 150 |
| 148 Element* m_parentElement; | 151 Element* m_parentElement; |
| 149 }; | 152 }; |
| 150 | 153 |
| 151 } // namespace WebCore | 154 } // namespace WebCore |
| 152 | 155 |
| 153 #endif | 156 #endif |
| OLD | NEW |