Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(130)

Side by Side Diff: Source/core/html/HTMLDetailsElement.cpp

Issue 198553002: Use new is*Element() helper functions even more in HTML code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/html/HTMLAreaElement.cpp ('k') | Source/core/html/HTMLDialogElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLAreaElement.cpp ('k') | Source/core/html/HTMLDialogElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698