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 18 matching lines...) Expand all Loading... |
29 #include "core/HTMLNames.h" | 29 #include "core/HTMLNames.h" |
30 #include "core/dom/DOMTokenList.h" | 30 #include "core/dom/DOMTokenList.h" |
31 #include "core/dom/Element.h" | 31 #include "core/dom/Element.h" |
32 #include "core/dom/SpaceSplitString.h" | 32 #include "core/dom/SpaceSplitString.h" |
33 #include <memory> | 33 #include <memory> |
34 | 34 |
35 namespace blink { | 35 namespace blink { |
36 | 36 |
37 class Element; | 37 class Element; |
38 | 38 |
39 typedef int ExceptionCode; | |
40 | |
41 class ClassList final : public DOMTokenList { | 39 class ClassList final : public DOMTokenList { |
42 public: | 40 public: |
43 static ClassList* create(Element* element) { return new ClassList(element); } | 41 static ClassList* create(Element* element) { return new ClassList(element); } |
44 | 42 |
45 unsigned length() const override; | 43 unsigned length() const override; |
46 const AtomicString item(unsigned index) const override; | 44 const AtomicString item(unsigned index) const override; |
47 | 45 |
48 Element* element() override { return m_element; } | 46 Element* element() override { return m_element; } |
49 | 47 |
50 void clearValueForQuirksMode() { m_classNamesForQuirksMode = nullptr; } | 48 void clearValueForQuirksMode() { m_classNamesForQuirksMode = nullptr; } |
(...skipping 14 matching lines...) Expand all Loading... |
65 m_element->setAttribute(HTMLNames::classAttr, value); | 63 m_element->setAttribute(HTMLNames::classAttr, value); |
66 } | 64 } |
67 | 65 |
68 Member<Element> m_element; | 66 Member<Element> m_element; |
69 mutable std::unique_ptr<SpaceSplitString> m_classNamesForQuirksMode; | 67 mutable std::unique_ptr<SpaceSplitString> m_classNamesForQuirksMode; |
70 }; | 68 }; |
71 | 69 |
72 } // namespace blink | 70 } // namespace blink |
73 | 71 |
74 #endif // ClassList_h | 72 #endif // ClassList_h |
OLD | NEW |