| 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 29 matching lines...) Expand all Loading... |
| 40 | 40 |
| 41 class StyledElement : public Element { | 41 class StyledElement : public Element { |
| 42 public: | 42 public: |
| 43 virtual ~StyledElement(); | 43 virtual ~StyledElement(); |
| 44 | 44 |
| 45 virtual const StylePropertySet* additionalPresentationAttributeStyle() { ret
urn 0; } | 45 virtual const StylePropertySet* additionalPresentationAttributeStyle() { ret
urn 0; } |
| 46 void invalidateStyleAttribute(); | 46 void invalidateStyleAttribute(); |
| 47 | 47 |
| 48 const StylePropertySet* inlineStyle() const { return elementData() ? element
Data()->m_inlineStyle.get() : 0; } | 48 const StylePropertySet* inlineStyle() const { return elementData() ? element
Data()->m_inlineStyle.get() : 0; } |
| 49 | 49 |
| 50 bool setInlineStyleProperty(CSSPropertyID, int identifier, bool important =
false); | 50 bool setInlineStyleProperty(CSSPropertyID, CSSValueID identifier, bool impor
tant = false); |
| 51 bool setInlineStyleProperty(CSSPropertyID, CSSPropertyID identifier, bool im
portant = false); |
| 51 bool setInlineStyleProperty(CSSPropertyID, double value, CSSPrimitiveValue::
UnitTypes, bool important = false); | 52 bool setInlineStyleProperty(CSSPropertyID, double value, CSSPrimitiveValue::
UnitTypes, bool important = false); |
| 52 bool setInlineStyleProperty(CSSPropertyID, const String& value, bool importa
nt = false); | 53 bool setInlineStyleProperty(CSSPropertyID, const String& value, bool importa
nt = false); |
| 53 bool removeInlineStyleProperty(CSSPropertyID); | 54 bool removeInlineStyleProperty(CSSPropertyID); |
| 54 void removeAllInlineStyleProperties(); | 55 void removeAllInlineStyleProperties(); |
| 55 | 56 |
| 56 void synchronizeStyleAttributeInternal() const; | 57 void synchronizeStyleAttributeInternal() const; |
| 57 | 58 |
| 58 virtual CSSStyleDeclaration* style() OVERRIDE; | 59 virtual CSSStyleDeclaration* style() OVERRIDE; |
| 59 | 60 |
| 60 const StylePropertySet* presentationAttributeStyle(); | 61 const StylePropertySet* presentationAttributeStyle(); |
| 61 virtual void collectStyleForPresentationAttribute(const QualifiedName&, cons
t AtomicString&, MutableStylePropertySet*) { } | 62 virtual void collectStyleForPresentationAttribute(const QualifiedName&, cons
t AtomicString&, MutableStylePropertySet*) { } |
| 62 | 63 |
| 63 protected: | 64 protected: |
| 64 StyledElement(const QualifiedName& name, Document* document, ConstructionTyp
e type) | 65 StyledElement(const QualifiedName& name, Document* document, ConstructionTyp
e type) |
| 65 : Element(name, document, type) | 66 : Element(name, document, type) |
| 66 { | 67 { |
| 67 } | 68 } |
| 68 | 69 |
| 69 virtual void attributeChanged(const QualifiedName&, const AtomicString&, Att
ributeModificationReason = ModifiedDirectly) OVERRIDE; | 70 virtual void attributeChanged(const QualifiedName&, const AtomicString&, Att
ributeModificationReason = ModifiedDirectly) OVERRIDE; |
| 70 | 71 |
| 71 virtual bool isPresentationAttribute(const QualifiedName&) const { return fa
lse; } | 72 virtual bool isPresentationAttribute(const QualifiedName&) const { return fa
lse; } |
| 72 | 73 |
| 73 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr
opertyID, int identifier); | 74 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr
opertyID, CSSValueID identifier); |
| 74 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr
opertyID, double value, CSSPrimitiveValue::UnitTypes); | 75 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr
opertyID, double value, CSSPrimitiveValue::UnitTypes); |
| 75 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr
opertyID, const String& value); | 76 void addPropertyToPresentationAttributeStyle(MutableStylePropertySet*, CSSPr
opertyID, const String& value); |
| 76 | 77 |
| 77 virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const; | 78 virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const; |
| 78 | 79 |
| 79 private: | 80 private: |
| 80 void styleAttributeChanged(const AtomicString& newStyleString, AttributeModi
ficationReason); | 81 void styleAttributeChanged(const AtomicString& newStyleString, AttributeModi
ficationReason); |
| 81 | 82 |
| 82 void inlineStyleChanged(); | 83 void inlineStyleChanged(); |
| 83 PropertySetCSSStyleDeclaration* inlineStyleCSSOMWrapper(); | 84 PropertySetCSSStyleDeclaration* inlineStyleCSSOMWrapper(); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 99 if (!elementData()) | 100 if (!elementData()) |
| 100 return 0; | 101 return 0; |
| 101 if (elementData()->m_presentationAttributeStyleIsDirty) | 102 if (elementData()->m_presentationAttributeStyleIsDirty) |
| 102 rebuildPresentationAttributeStyle(); | 103 rebuildPresentationAttributeStyle(); |
| 103 return elementData()->presentationAttributeStyle(); | 104 return elementData()->presentationAttributeStyle(); |
| 104 } | 105 } |
| 105 | 106 |
| 106 } //namespace | 107 } //namespace |
| 107 | 108 |
| 108 #endif | 109 #endif |
| OLD | NEW |