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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 content->setInlineStyleProperty(CSSPropertyDisplay, CSSValueNone); | 76 content->setInlineStyleProperty(CSSPropertyDisplay, CSSValueNone); |
77 root.appendChild(content.release()); | 77 root.appendChild(content.release()); |
78 } | 78 } |
79 | 79 |
80 Element* HTMLDetailsElement::findMainSummary() const | 80 Element* HTMLDetailsElement::findMainSummary() const |
81 { | 81 { |
82 if (HTMLSummaryElement* summary = Traversal<HTMLSummaryElement>::firstChild(
*this)) | 82 if (HTMLSummaryElement* summary = Traversal<HTMLSummaryElement>::firstChild(
*this)) |
83 return summary; | 83 return summary; |
84 | 84 |
85 HTMLContentElement* content = toHTMLContentElement(userAgentShadowRoot()->fi
rstChild()); | 85 HTMLContentElement* content = toHTMLContentElement(userAgentShadowRoot()->fi
rstChild()); |
86 ASSERT(content->firstChild() && content->firstChild()->hasTagName(summaryTag
)); | 86 ASSERT(content->firstChild() && isHTMLSummaryElement(*content->firstChild())
); |
87 return toElement(content->firstChild()); | 87 return toElement(content->firstChild()); |
88 } | 88 } |
89 | 89 |
90 void HTMLDetailsElement::parseAttribute(const QualifiedName& name, const AtomicS
tring& value) | 90 void HTMLDetailsElement::parseAttribute(const QualifiedName& name, const AtomicS
tring& value) |
91 { | 91 { |
92 if (name == openAttr) { | 92 if (name == openAttr) { |
93 bool oldValue = m_isOpen; | 93 bool oldValue = m_isOpen; |
94 m_isOpen = !value.isNull(); | 94 m_isOpen = !value.isNull(); |
95 if (m_isOpen == oldValue) | 95 if (m_isOpen == oldValue) |
96 return; | 96 return; |
(...skipping 18 matching lines...) Expand all Loading... |
115 { | 115 { |
116 setAttribute(openAttr, m_isOpen ? nullAtom : emptyAtom); | 116 setAttribute(openAttr, m_isOpen ? nullAtom : emptyAtom); |
117 } | 117 } |
118 | 118 |
119 bool HTMLDetailsElement::isInteractiveContent() const | 119 bool HTMLDetailsElement::isInteractiveContent() const |
120 { | 120 { |
121 return true; | 121 return true; |
122 } | 122 } |
123 | 123 |
124 } | 124 } |
OLD | NEW |