| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Peter Kelly (pmk@post.com) | 4 * (C) 2001 Peter Kelly (pmk@post.com) |
| 5 * (C) 2001 Dirk Mueller (mueller@kde.org) | 5 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All r
ights reserved. | 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All r
ights 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 Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 | 59 |
| 60 const StylePropertySet* presentationAttributeStyle(); | 60 const StylePropertySet* presentationAttributeStyle(); |
| 61 virtual void collectStyleForPresentationAttribute(const QualifiedName&, cons
t AtomicString&, MutableStylePropertySet*) { } | 61 virtual void collectStyleForPresentationAttribute(const QualifiedName&, cons
t AtomicString&, MutableStylePropertySet*) { } |
| 62 | 62 |
| 63 protected: | 63 protected: |
| 64 StyledElement(const QualifiedName& name, Document* document, ConstructionTyp
e type) | 64 StyledElement(const QualifiedName& name, Document* document, ConstructionTyp
e type) |
| 65 : Element(name, document, type) | 65 : Element(name, document, type) |
| 66 { | 66 { |
| 67 } | 67 } |
| 68 | 68 |
| 69 virtual void attributeChanged(const QualifiedName&, const AtomicString&) OVE
RRIDE; | 69 virtual void attributeChanged(const QualifiedName&, const AtomicString&, Att
ributeModificationReason = ModifiedDirectly) OVERRIDE; |
| 70 | 70 |
| 71 virtual bool isPresentationAttribute(const QualifiedName&) const { return fa
lse; } | 71 virtual bool isPresentationAttribute(const QualifiedName&) const { return fa
lse; } |
| 72 | 72 |
| 73 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr
opertyID, int identifier); | 73 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr
opertyID, int identifier); |
| 74 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr
opertyID, double value, CSSPrimitiveValue::UnitTypes); | 74 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr
opertyID, double value, CSSPrimitiveValue::UnitTypes); |
| 75 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr
opertyID, const String& value); | 75 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr
opertyID, const String& value); |
| 76 | 76 |
| 77 virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const; | 77 virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const; |
| 78 | 78 |
| 79 private: | 79 private: |
| 80 void styleAttributeChanged(const AtomicString& newStyleString); | 80 void styleAttributeChanged(const AtomicString& newStyleString, AttributeModi
ficationReason); |
| 81 | 81 |
| 82 void inlineStyleChanged(); | 82 void inlineStyleChanged(); |
| 83 PropertySetCSSStyleDeclaration* inlineStyleCSSOMWrapper(); | 83 PropertySetCSSStyleDeclaration* inlineStyleCSSOMWrapper(); |
| 84 void setInlineStyleFromString(const AtomicString&); | 84 void setInlineStyleFromString(const AtomicString&); |
| 85 MutableStylePropertySet* ensureMutableInlineStyle(); | 85 MutableStylePropertySet* ensureMutableInlineStyle(); |
| 86 | 86 |
| 87 void makePresentationAttributeCacheKey(PresentationAttributeCacheKey&) const
; | 87 void makePresentationAttributeCacheKey(PresentationAttributeCacheKey&) const
; |
| 88 void rebuildPresentationAttributeStyle(); | 88 void rebuildPresentationAttributeStyle(); |
| 89 }; | 89 }; |
| 90 | 90 |
| 91 inline void StyledElement::invalidateStyleAttribute() | 91 inline void StyledElement::invalidateStyleAttribute() |
| 92 { | 92 { |
| 93 ASSERT(elementData()); | 93 ASSERT(elementData()); |
| 94 elementData()->m_styleAttributeIsDirty = true; | 94 elementData()->m_styleAttributeIsDirty = true; |
| 95 } | 95 } |
| 96 | 96 |
| 97 inline const StylePropertySet* StyledElement::presentationAttributeStyle() | 97 inline const StylePropertySet* StyledElement::presentationAttributeStyle() |
| 98 { | 98 { |
| 99 if (!elementData()) | 99 if (!elementData()) |
| 100 return 0; | 100 return 0; |
| 101 if (elementData()->m_presentationAttributeStyleIsDirty) | 101 if (elementData()->m_presentationAttributeStyleIsDirty) |
| 102 rebuildPresentationAttributeStyle(); | 102 rebuildPresentationAttributeStyle(); |
| 103 return elementData()->presentationAttributeStyle(); | 103 return elementData()->presentationAttributeStyle(); |
| 104 } | 104 } |
| 105 | 105 |
| 106 } //namespace | 106 } //namespace |
| 107 | 107 |
| 108 #endif | 108 #endif |
| OLD | NEW |