| 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 29 matching lines...) Expand all Loading... |
| 40 | 40 |
| 41 namespace blink { | 41 namespace blink { |
| 42 | 42 |
| 43 class ShareableElementData; | 43 class ShareableElementData; |
| 44 class StylePropertySet; | 44 class StylePropertySet; |
| 45 class UniqueElementData; | 45 class UniqueElementData; |
| 46 | 46 |
| 47 // ElementData represents very common, but not necessarily unique to an element, | 47 // ElementData represents very common, but not necessarily unique to an element, |
| 48 // data such as attributes, inline style, and parsed class names and ids. | 48 // data such as attributes, inline style, and parsed class names and ids. |
| 49 class ElementData : public RefCounted<ElementData> { | 49 class ElementData : public RefCounted<ElementData> { |
| 50 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; | 50 WTF_MAKE_FAST_ALLOCATED; |
| 51 public: | 51 public: |
| 52 // Override RefCounted's deref() to ensure operator delete is called on | 52 // Override RefCounted's deref() to ensure operator delete is called on |
| 53 // the appropriate subclass type. | 53 // the appropriate subclass type. |
| 54 void deref(); | 54 void deref(); |
| 55 | 55 |
| 56 void clearClass() const { m_classNames.clear(); } | 56 void clearClass() const { m_classNames.clear(); } |
| 57 void setClass(const AtomicString& className, bool shouldFoldCase) const { m_
classNames.set(className, shouldFoldCase); } | 57 void setClass(const AtomicString& className, bool shouldFoldCase) const { m_
classNames.set(className, shouldFoldCase); } |
| 58 const SpaceSplitString& classNames() const { return m_classNames; } | 58 const SpaceSplitString& classNames() const { return m_classNames; } |
| 59 | 59 |
| 60 const AtomicString& idForStyleResolution() const { return m_idForStyleResolu
tion; } | 60 const AtomicString& idForStyleResolution() const { return m_idForStyleResolu
tion; } |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 } | 196 } |
| 197 | 197 |
| 198 inline MutableAttributeCollection UniqueElementData::attributes() | 198 inline MutableAttributeCollection UniqueElementData::attributes() |
| 199 { | 199 { |
| 200 return MutableAttributeCollection(m_attributeVector); | 200 return MutableAttributeCollection(m_attributeVector); |
| 201 } | 201 } |
| 202 | 202 |
| 203 } // namespace blink | 203 } // namespace blink |
| 204 | 204 |
| 205 #endif // ElementData_h | 205 #endif // ElementData_h |
| OLD | NEW |