OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010, 2011 Nokia Corporation and/or its subsidiary(-ies) | 2 * Copyright (C) 2010, 2011 Nokia Corporation and/or its subsidiary(-ies) |
3 * | 3 * |
4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 { | 52 { |
53 RefPtrWillBeRawPtr<HTMLDetailsElement> details = adoptRefWillBeNoop(new HTML
DetailsElement(document)); | 53 RefPtrWillBeRawPtr<HTMLDetailsElement> details = adoptRefWillBeNoop(new HTML
DetailsElement(document)); |
54 details->ensureUserAgentShadowRoot(); | 54 details->ensureUserAgentShadowRoot(); |
55 return details.release(); | 55 return details.release(); |
56 } | 56 } |
57 | 57 |
58 HTMLDetailsElement::HTMLDetailsElement(Document& document) | 58 HTMLDetailsElement::HTMLDetailsElement(Document& document) |
59 : HTMLElement(detailsTag, document) | 59 : HTMLElement(detailsTag, document) |
60 , m_isOpen(false) | 60 , m_isOpen(false) |
61 { | 61 { |
62 ScriptWrappable::init(this); | |
63 UseCounter::count(document, UseCounter::DetailsElement); | 62 UseCounter::count(document, UseCounter::DetailsElement); |
64 } | 63 } |
65 | 64 |
66 HTMLDetailsElement::~HTMLDetailsElement() | 65 HTMLDetailsElement::~HTMLDetailsElement() |
67 { | 66 { |
68 detailsToggleEventSender().cancelEvent(this); | 67 detailsToggleEventSender().cancelEvent(this); |
69 } | 68 } |
70 | 69 |
71 void HTMLDetailsElement::dispatchPendingEvent(DetailsEventSender* eventSender) | 70 void HTMLDetailsElement::dispatchPendingEvent(DetailsEventSender* eventSender) |
72 { | 71 { |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 { | 142 { |
144 setAttribute(openAttr, m_isOpen ? nullAtom : emptyAtom); | 143 setAttribute(openAttr, m_isOpen ? nullAtom : emptyAtom); |
145 } | 144 } |
146 | 145 |
147 bool HTMLDetailsElement::isInteractiveContent() const | 146 bool HTMLDetailsElement::isInteractiveContent() const |
148 { | 147 { |
149 return true; | 148 return true; |
150 } | 149 } |
151 | 150 |
152 } | 151 } |
OLD | NEW |