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

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

Issue 99333011: Make sure getAttribute() / setAttribute() callers use AtomicStrings (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years 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
« no previous file with comments | « Source/core/html/HTMLButtonElement.cpp ('k') | Source/core/html/HTMLDocument.h » ('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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 ScriptWrappable::init(this); 48 ScriptWrappable::init(this);
49 } 49 }
50 50
51 RenderObject* HTMLDetailsElement::createRenderer(RenderStyle*) 51 RenderObject* HTMLDetailsElement::createRenderer(RenderStyle*)
52 { 52 {
53 return new RenderBlockFlow(this); 53 return new RenderBlockFlow(this);
54 } 54 }
55 55
56 void HTMLDetailsElement::didAddUserAgentShadowRoot(ShadowRoot& root) 56 void HTMLDetailsElement::didAddUserAgentShadowRoot(ShadowRoot& root)
57 { 57 {
58 DEFINE_STATIC_LOCAL(AtomicString, summarySelector, ("summary:first-of-type", AtomicString::ConstructFromLiteral)); 58 DEFINE_STATIC_LOCAL(const AtomicString, summarySelector, ("summary:first-of- type", AtomicString::ConstructFromLiteral));
59 59
60 RefPtr<HTMLSummaryElement> defaultSummary = HTMLSummaryElement::create(docum ent()); 60 RefPtr<HTMLSummaryElement> defaultSummary = HTMLSummaryElement::create(docum ent());
61 defaultSummary->appendChild(Text::create(document(), locale().queryString(bl ink::WebLocalizedString::DetailsLabel))); 61 defaultSummary->appendChild(Text::create(document(), locale().queryString(bl ink::WebLocalizedString::DetailsLabel)));
62 62
63 RefPtr<HTMLContentElement> content = HTMLContentElement::create(document()); 63 RefPtr<HTMLContentElement> content = HTMLContentElement::create(document());
64 content->setAttribute(selectAttr, summarySelector); 64 content->setAttribute(selectAttr, summarySelector);
65 content->appendChild(defaultSummary); 65 content->appendChild(defaultSummary);
66 66
67 root.appendChild(content); 67 root.appendChild(content);
68 root.appendChild(HTMLContentElement::create(document())); 68 root.appendChild(HTMLContentElement::create(document()));
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 { 105 {
106 setAttribute(openAttr, m_isOpen ? nullAtom : emptyAtom); 106 setAttribute(openAttr, m_isOpen ? nullAtom : emptyAtom);
107 } 107 }
108 108
109 bool HTMLDetailsElement::isInteractiveContent() const 109 bool HTMLDetailsElement::isInteractiveContent() const
110 { 110 {
111 return true; 111 return true;
112 } 112 }
113 113
114 } 114 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLButtonElement.cpp ('k') | Source/core/html/HTMLDocument.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698