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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 } | 50 } |
51 | 51 |
52 void HTMLKeygenElement::didAddUserAgentShadowRoot(ShadowRoot& root) | 52 void HTMLKeygenElement::didAddUserAgentShadowRoot(ShadowRoot& root) |
53 { | 53 { |
54 DEFINE_STATIC_LOCAL(AtomicString, keygenSelectPseudoId, ("-webkit-keygen-sel
ect", AtomicString::ConstructFromLiteral)); | 54 DEFINE_STATIC_LOCAL(AtomicString, keygenSelectPseudoId, ("-webkit-keygen-sel
ect", AtomicString::ConstructFromLiteral)); |
55 | 55 |
56 Vector<String> keys; | 56 Vector<String> keys; |
57 getSupportedKeySizes(locale(), keys); | 57 getSupportedKeySizes(locale(), keys); |
58 | 58 |
59 // Create a select element with one option element for each key size. | 59 // Create a select element with one option element for each key size. |
60 RefPtr<HTMLSelectElement> select = HTMLSelectElement::create(document()); | 60 RefPtrWillBeRawPtr<HTMLSelectElement> select = HTMLSelectElement::create(doc
ument()); |
61 select->setShadowPseudoId(keygenSelectPseudoId); | 61 select->setShadowPseudoId(keygenSelectPseudoId); |
62 for (size_t i = 0; i < keys.size(); ++i) { | 62 for (size_t i = 0; i < keys.size(); ++i) { |
63 RefPtr<HTMLOptionElement> option = HTMLOptionElement::create(document())
; | 63 RefPtrWillBeRawPtr<HTMLOptionElement> option = HTMLOptionElement::create
(document()); |
64 option->appendChild(Text::create(document(), keys[i])); | 64 option->appendChild(Text::create(document(), keys[i])); |
65 select->appendChild(option); | 65 select->appendChild(option); |
66 } | 66 } |
67 | 67 |
68 root.appendChild(select); | 68 root.appendChild(select); |
69 } | 69 } |
70 | 70 |
71 void HTMLKeygenElement::parseAttribute(const QualifiedName& name, const AtomicSt
ring& value) | 71 void HTMLKeygenElement::parseAttribute(const QualifiedName& name, const AtomicSt
ring& value) |
72 { | 72 { |
73 // Reflect disabled attribute on the shadow select element | 73 // Reflect disabled attribute on the shadow select element |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 { | 111 { |
112 return true; | 112 return true; |
113 } | 113 } |
114 | 114 |
115 bool HTMLKeygenElement::supportsAutofocus() const | 115 bool HTMLKeygenElement::supportsAutofocus() const |
116 { | 116 { |
117 return true; | 117 return true; |
118 } | 118 } |
119 | 119 |
120 } // namespace | 120 } // namespace |
OLD | NEW |