| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2014 Apple Inc. All rights reserved. | 3 * Copyright (C) 2014 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 void deref(); | 59 void deref(); |
| 60 #endif | 60 #endif |
| 61 | 61 |
| 62 void clearClass() const { m_classNames.clear(); } | 62 void clearClass() const { m_classNames.clear(); } |
| 63 void setClass(const AtomicString& className, bool shouldFoldCase) const { m_
classNames.set(className, shouldFoldCase ? SpaceSplitString::ShouldFoldCase : Sp
aceSplitString::ShouldNotFoldCase); } | 63 void setClass(const AtomicString& className, bool shouldFoldCase) const { m_
classNames.set(className, shouldFoldCase ? SpaceSplitString::ShouldFoldCase : Sp
aceSplitString::ShouldNotFoldCase); } |
| 64 const SpaceSplitString& classNames() const { return m_classNames; } | 64 const SpaceSplitString& classNames() const { return m_classNames; } |
| 65 | 65 |
| 66 const AtomicString& idForStyleResolution() const { return m_idForStyleResolu
tion; } | 66 const AtomicString& idForStyleResolution() const { return m_idForStyleResolu
tion; } |
| 67 void setIdForStyleResolution(const AtomicString& newId) const { m_idForStyle
Resolution = newId; } | 67 void setIdForStyleResolution(const AtomicString& newId) const { m_idForStyle
Resolution = newId; } |
| 68 | 68 |
| 69 const StylePropertySet* inlineStyle() const; | 69 const StylePropertySet* inlineStyle() const { return m_inlineStyle.get(); } |
| 70 | 70 |
| 71 const StylePropertySet* presentationAttributeStyle() const; | 71 const StylePropertySet* presentationAttributeStyle() const; |
| 72 | 72 |
| 73 AttributeCollection attributes() const; | 73 AttributeCollection attributes() const; |
| 74 | 74 |
| 75 bool hasID() const { return !m_idForStyleResolution.isNull(); } | 75 bool hasID() const { return !m_idForStyleResolution.isNull(); } |
| 76 bool hasClass() const { return !m_classNames.isNull(); } | 76 bool hasClass() const { return !m_classNames.isNull(); } |
| 77 | 77 |
| 78 bool isEquivalent(const ElementData* other) const; | 78 bool isEquivalent(const ElementData* other) const; |
| 79 | 79 |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 | 187 |
| 188 #if !ENABLE(OILPAN) | 188 #if !ENABLE(OILPAN) |
| 189 inline void ElementData::deref() | 189 inline void ElementData::deref() |
| 190 { | 190 { |
| 191 if (!derefBase()) | 191 if (!derefBase()) |
| 192 return; | 192 return; |
| 193 destroy(); | 193 destroy(); |
| 194 } | 194 } |
| 195 #endif | 195 #endif |
| 196 | 196 |
| 197 inline const StylePropertySet* ElementData::presentationAttributeStyle() const |
| 198 { |
| 199 if (!m_isUnique) |
| 200 return 0; |
| 201 return toUniqueElementData(this)->m_presentationAttributeStyle.get(); |
| 202 } |
| 203 |
| 197 inline AttributeCollection ElementData::attributes() const | 204 inline AttributeCollection ElementData::attributes() const |
| 198 { | 205 { |
| 199 if (isUnique()) | 206 if (isUnique()) |
| 200 return toUniqueElementData(this)->attributes(); | 207 return toUniqueElementData(this)->attributes(); |
| 201 return toShareableElementData(this)->attributes(); | 208 return toShareableElementData(this)->attributes(); |
| 202 } | 209 } |
| 203 | 210 |
| 204 inline AttributeCollection ShareableElementData::attributes() const | 211 inline AttributeCollection ShareableElementData::attributes() const |
| 205 { | 212 { |
| 206 return AttributeCollection(m_attributeArray, m_arraySize); | 213 return AttributeCollection(m_attributeArray, m_arraySize); |
| 207 } | 214 } |
| 208 | 215 |
| 209 inline AttributeCollection UniqueElementData::attributes() const | 216 inline AttributeCollection UniqueElementData::attributes() const |
| 210 { | 217 { |
| 211 return AttributeCollection(m_attributeVector.data(), m_attributeVector.size(
)); | 218 return AttributeCollection(m_attributeVector.data(), m_attributeVector.size(
)); |
| 212 } | 219 } |
| 213 | 220 |
| 214 inline MutableAttributeCollection UniqueElementData::attributes() | 221 inline MutableAttributeCollection UniqueElementData::attributes() |
| 215 { | 222 { |
| 216 return MutableAttributeCollection(m_attributeVector); | 223 return MutableAttributeCollection(m_attributeVector); |
| 217 } | 224 } |
| 218 | 225 |
| 219 } // namespace blink | 226 } // namespace blink |
| 220 | 227 |
| 221 #endif // ElementData_h | 228 #endif // ElementData_h |
| OLD | NEW |