| OLD | NEW |
| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 DEFINE_STATIC_LOCAL(AtomicString, keygenSelectPseudoId, ("-webkit-keygen-sel
ect", AtomicString::ConstructFromLiteral)); | 61 DEFINE_STATIC_LOCAL(AtomicString, keygenSelectPseudoId, ("-webkit-keygen-sel
ect", AtomicString::ConstructFromLiteral)); |
| 62 | 62 |
| 63 Vector<String> keys; | 63 Vector<String> keys; |
| 64 keys.reserveCapacity(2); | 64 keys.reserveCapacity(2); |
| 65 keys.append(locale().queryString(WebLocalizedString::KeygenMenuHighGradeKeyS
ize)); | 65 keys.append(locale().queryString(WebLocalizedString::KeygenMenuHighGradeKeyS
ize)); |
| 66 keys.append(locale().queryString(WebLocalizedString::KeygenMenuMediumGradeKe
ySize)); | 66 keys.append(locale().queryString(WebLocalizedString::KeygenMenuMediumGradeKe
ySize)); |
| 67 | 67 |
| 68 // Create a select element with one option element for each key size. | 68 // Create a select element with one option element for each key size. |
| 69 RefPtrWillBeRawPtr<HTMLSelectElement> select = HTMLSelectElement::create(doc
ument()); | 69 RefPtrWillBeRawPtr<HTMLSelectElement> select = HTMLSelectElement::create(doc
ument()); |
| 70 select->setShadowPseudoId(keygenSelectPseudoId); | 70 select->setShadowPseudoId(keygenSelectPseudoId); |
| 71 for (size_t i = 0; i < keys.size(); ++i) { | 71 for (const String& key : keys) { |
| 72 RefPtrWillBeRawPtr<HTMLOptionElement> option = HTMLOptionElement::create
(document()); | 72 RefPtrWillBeRawPtr<HTMLOptionElement> option = HTMLOptionElement::create
(document()); |
| 73 option->appendChild(Text::create(document(), keys[i])); | 73 option->appendChild(Text::create(document(), key)); |
| 74 select->appendChild(option); | 74 select->appendChild(option); |
| 75 } | 75 } |
| 76 | 76 |
| 77 root.appendChild(select); | 77 root.appendChild(select); |
| 78 } | 78 } |
| 79 | 79 |
| 80 void HTMLKeygenElement::parseAttribute(const QualifiedName& name, const AtomicSt
ring& value) | 80 void HTMLKeygenElement::parseAttribute(const QualifiedName& name, const AtomicSt
ring& value) |
| 81 { | 81 { |
| 82 // Reflect disabled attribute on the shadow select element | 82 // Reflect disabled attribute on the shadow select element |
| 83 if (name == disabledAttr) | 83 if (name == disabledAttr) |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 { | 120 { |
| 121 return true; | 121 return true; |
| 122 } | 122 } |
| 123 | 123 |
| 124 bool HTMLKeygenElement::supportsAutofocus() const | 124 bool HTMLKeygenElement::supportsAutofocus() const |
| 125 { | 125 { |
| 126 return true; | 126 return true; |
| 127 } | 127 } |
| 128 | 128 |
| 129 } // namespace | 129 } // namespace |
| OLD | NEW |