| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google 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 26 matching lines...) Expand all Loading... |
| 37 | 37 |
| 38 typedef int ExceptionCode; | 38 typedef int ExceptionCode; |
| 39 | 39 |
| 40 class ClassList final : public DOMTokenList { | 40 class ClassList final : public DOMTokenList { |
| 41 public: | 41 public: |
| 42 static PassRefPtrWillBeRawPtr<ClassList> create(Element* element) | 42 static PassRefPtrWillBeRawPtr<ClassList> create(Element* element) |
| 43 { | 43 { |
| 44 return adoptRefWillBeNoop(new ClassList(element)); | 44 return adoptRefWillBeNoop(new ClassList(element)); |
| 45 } | 45 } |
| 46 | 46 |
| 47 #if !ENABLE(OILPAN) |
| 48 void ref() override; |
| 49 void deref() override; |
| 50 #endif |
| 51 |
| 47 unsigned length() const override; | 52 unsigned length() const override; |
| 48 const AtomicString item(unsigned index) const override; | 53 const AtomicString item(unsigned index) const override; |
| 49 | 54 |
| 50 Element* element() override { return m_element; } | 55 Element* element() override { return m_element; } |
| 51 | 56 |
| 52 void clearValueForQuirksMode() { m_classNamesForQuirksMode = nullptr; } | 57 void clearValueForQuirksMode() { m_classNamesForQuirksMode = nullptr; } |
| 53 | 58 |
| 54 DECLARE_VIRTUAL_TRACE(); | 59 DECLARE_VIRTUAL_TRACE(); |
| 55 | 60 |
| 56 private: | 61 private: |
| 57 explicit ClassList(Element*); | 62 explicit ClassList(Element*); |
| 58 | 63 |
| 59 bool containsInternal(const AtomicString&) const override; | 64 bool containsInternal(const AtomicString&) const override; |
| 60 | 65 |
| 61 const SpaceSplitString& classNames() const; | 66 const SpaceSplitString& classNames() const; |
| 62 | 67 |
| 63 const AtomicString& value() const override { return m_element->getAttribute(
HTMLNames::classAttr); } | 68 const AtomicString& value() const override { return m_element->getAttribute(
HTMLNames::classAttr); } |
| 64 void setValue(const AtomicString& value) override { m_element->setAttribute(
HTMLNames::classAttr, value); } | 69 void setValue(const AtomicString& value) override { m_element->setAttribute(
HTMLNames::classAttr, value); } |
| 65 | 70 |
| 66 RawPtrWillBeMember<Element> m_element; | 71 RawPtrWillBeMember<Element> m_element; |
| 67 mutable OwnPtr<SpaceSplitString> m_classNamesForQuirksMode; | 72 mutable OwnPtr<SpaceSplitString> m_classNamesForQuirksMode; |
| 68 }; | 73 }; |
| 69 | 74 |
| 70 } // namespace blink | 75 } // namespace blink |
| 71 | 76 |
| 72 #endif // ClassList_h | 77 #endif // ClassList_h |
| OLD | NEW |