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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 | 72 |
73 RefPtr<HTMLDivElement> content = HTMLDivElement::create(document()); | 73 RefPtr<HTMLDivElement> content = HTMLDivElement::create(document()); |
74 content->setIdAttribute(ShadowElementNames::detailsContent()); | 74 content->setIdAttribute(ShadowElementNames::detailsContent()); |
75 content->appendChild(HTMLContentElement::create(document())); | 75 content->appendChild(HTMLContentElement::create(document())); |
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 for (Node* child = firstChild(); child; child = child->nextSibling()) { | 82 for (Element* child = ElementTraversal::firstWithin(*this); child; child = E
lementTraversal::nextSibling(*child)) { |
83 if (child->hasTagName(summaryTag)) | 83 if (child->hasTagName(summaryTag)) |
84 return toElement(child); | 84 return child; |
85 } | 85 } |
86 | 86 |
87 HTMLContentElement* content = toHTMLContentElement(userAgentShadowRoot()->fi
rstChild()); | 87 HTMLContentElement* content = toHTMLContentElement(userAgentShadowRoot()->fi
rstChild()); |
88 ASSERT(content->firstChild() && content->firstChild()->hasTagName(summaryTag
)); | 88 ASSERT(content->firstChild() && content->firstChild()->hasTagName(summaryTag
)); |
89 return toElement(content->firstChild()); | 89 return toElement(content->firstChild()); |
90 } | 90 } |
91 | 91 |
92 void HTMLDetailsElement::parseAttribute(const QualifiedName& name, const AtomicS
tring& value) | 92 void HTMLDetailsElement::parseAttribute(const QualifiedName& name, const AtomicS
tring& value) |
93 { | 93 { |
94 if (name == openAttr) { | 94 if (name == openAttr) { |
(...skipping 22 matching lines...) Expand all Loading... |
117 { | 117 { |
118 setAttribute(openAttr, m_isOpen ? nullAtom : emptyAtom); | 118 setAttribute(openAttr, m_isOpen ? nullAtom : emptyAtom); |
119 } | 119 } |
120 | 120 |
121 bool HTMLDetailsElement::isInteractiveContent() const | 121 bool HTMLDetailsElement::isInteractiveContent() const |
122 { | 122 { |
123 return true; | 123 return true; |
124 } | 124 } |
125 | 125 |
126 } | 126 } |
OLD | NEW |