| 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 content->setInlineStyleProperty(CSSPropertyDisplay, CSSValueNone); | 105 content->setInlineStyleProperty(CSSPropertyDisplay, CSSValueNone); |
| 106 root.appendChild(content); | 106 root.appendChild(content); |
| 107 } | 107 } |
| 108 | 108 |
| 109 Element* HTMLDetailsElement::findMainSummary() const { | 109 Element* HTMLDetailsElement::findMainSummary() const { |
| 110 if (HTMLSummaryElement* summary = | 110 if (HTMLSummaryElement* summary = |
| 111 Traversal<HTMLSummaryElement>::firstChild(*this)) | 111 Traversal<HTMLSummaryElement>::firstChild(*this)) |
| 112 return summary; | 112 return summary; |
| 113 | 113 |
| 114 HTMLContentElement* content = | 114 HTMLContentElement* content = |
| 115 toHTMLContentElement(userAgentShadowRoot()->firstChild()); | 115 toHTMLContentElementOrDie(userAgentShadowRoot()->firstChild()); |
| 116 DCHECK(content->firstChild()); | 116 DCHECK(content->firstChild()); |
| 117 DCHECK(isHTMLSummaryElement(*content->firstChild())); | 117 CHECK(isHTMLSummaryElement(*content->firstChild())); |
| 118 return toElement(content->firstChild()); | 118 return toElement(content->firstChild()); |
| 119 } | 119 } |
| 120 | 120 |
| 121 void HTMLDetailsElement::parseAttribute(const QualifiedName& name, | 121 void HTMLDetailsElement::parseAttribute(const QualifiedName& name, |
| 122 const AtomicString& oldValue, | 122 const AtomicString& oldValue, |
| 123 const AtomicString& value) { | 123 const AtomicString& value) { |
| 124 if (name == openAttr) { | 124 if (name == openAttr) { |
| 125 bool oldValue = m_isOpen; | 125 bool oldValue = m_isOpen; |
| 126 m_isOpen = !value.isNull(); | 126 m_isOpen = !value.isNull(); |
| 127 if (m_isOpen == oldValue) | 127 if (m_isOpen == oldValue) |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 | 159 |
| 160 void HTMLDetailsElement::toggleOpen() { | 160 void HTMLDetailsElement::toggleOpen() { |
| 161 setAttribute(openAttr, m_isOpen ? nullAtom : emptyAtom); | 161 setAttribute(openAttr, m_isOpen ? nullAtom : emptyAtom); |
| 162 } | 162 } |
| 163 | 163 |
| 164 bool HTMLDetailsElement::isInteractiveContent() const { | 164 bool HTMLDetailsElement::isInteractiveContent() const { |
| 165 return true; | 165 return true; |
| 166 } | 166 } |
| 167 | 167 |
| 168 } // namespace blink | 168 } // namespace blink |
| OLD | NEW |