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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLKeygenElement.cpp

Issue 2583233002: Migrate WTF::Vector::append() to ::push_back() [part 7 of N] (Closed)
Patch Set: Created 3 years, 12 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2010 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2010 Apple Inc. All rights reserved.
6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 // too), for instance. See crbug.com/335040 67 // too), for instance. See crbug.com/335040
68 return new LayoutBlockFlow(this); 68 return new LayoutBlockFlow(this);
69 } 69 }
70 70
71 void HTMLKeygenElement::didAddUserAgentShadowRoot(ShadowRoot& root) { 71 void HTMLKeygenElement::didAddUserAgentShadowRoot(ShadowRoot& root) {
72 DEFINE_STATIC_LOCAL(AtomicString, keygenSelectPseudoId, 72 DEFINE_STATIC_LOCAL(AtomicString, keygenSelectPseudoId,
73 ("-webkit-keygen-select")); 73 ("-webkit-keygen-select"));
74 74
75 Vector<String> keys; 75 Vector<String> keys;
76 keys.reserveCapacity(2); 76 keys.reserveCapacity(2);
77 keys.append( 77 keys.push_back(
78 locale().queryString(WebLocalizedString::KeygenMenuHighGradeKeySize)); 78 locale().queryString(WebLocalizedString::KeygenMenuHighGradeKeySize));
79 keys.append( 79 keys.push_back(
80 locale().queryString(WebLocalizedString::KeygenMenuMediumGradeKeySize)); 80 locale().queryString(WebLocalizedString::KeygenMenuMediumGradeKeySize));
81 81
82 // Create a select element with one option element for each key size. 82 // Create a select element with one option element for each key size.
83 HTMLSelectElement* select = HTMLSelectElement::create(document()); 83 HTMLSelectElement* select = HTMLSelectElement::create(document());
84 select->setShadowPseudoId(keygenSelectPseudoId); 84 select->setShadowPseudoId(keygenSelectPseudoId);
85 for (const String& key : keys) { 85 for (const String& key : keys) {
86 HTMLOptionElement* option = HTMLOptionElement::create(document()); 86 HTMLOptionElement* option = HTMLOptionElement::create(document());
87 option->appendChild(Text::create(document(), key)); 87 option->appendChild(Text::create(document(), key));
88 select->appendChild(option); 88 select->appendChild(option);
89 } 89 }
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 131
132 bool HTMLKeygenElement::isInteractiveContent() const { 132 bool HTMLKeygenElement::isInteractiveContent() const {
133 return true; 133 return true;
134 } 134 }
135 135
136 bool HTMLKeygenElement::supportsAutofocus() const { 136 bool HTMLKeygenElement::supportsAutofocus() const {
137 return true; 137 return true;
138 } 138 }
139 139
140 } // namespace blink 140 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLInputElement.cpp ('k') | third_party/WebKit/Source/core/html/HTMLMediaElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698