| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 virtual PassRefPtr<Element> cloneElementWithoutAttributesAndChildren() | 62 virtual PassRefPtr<Element> cloneElementWithoutAttributesAndChildren() |
| 63 { | 63 { |
| 64 return create(document()); | 64 return create(document()); |
| 65 } | 65 } |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 inline HTMLKeygenElement::HTMLKeygenElement(const QualifiedName& tagName, Docume
nt* document, HTMLFormElement* form) | 68 inline HTMLKeygenElement::HTMLKeygenElement(const QualifiedName& tagName, Docume
nt* document, HTMLFormElement* form) |
| 69 : HTMLFormControlElementWithState(tagName, document, form) | 69 : HTMLFormControlElementWithState(tagName, document, form) |
| 70 { | 70 { |
| 71 ASSERT(hasTagName(keygenTag)); | 71 ASSERT(hasTagName(keygenTag)); |
| 72 ScriptWrappable::init(this); |
| 72 | 73 |
| 73 // Create a select element with one option element for each key size. | 74 // Create a select element with one option element for each key size. |
| 74 Vector<String> keys; | 75 Vector<String> keys; |
| 75 getSupportedKeySizes(keys); | 76 getSupportedKeySizes(keys); |
| 76 | 77 |
| 77 RefPtr<HTMLSelectElement> select = KeygenSelectElement::create(document); | 78 RefPtr<HTMLSelectElement> select = KeygenSelectElement::create(document); |
| 78 for (size_t i = 0; i < keys.size(); ++i) { | 79 for (size_t i = 0; i < keys.size(); ++i) { |
| 79 RefPtr<HTMLOptionElement> option = HTMLOptionElement::create(document); | 80 RefPtr<HTMLOptionElement> option = HTMLOptionElement::create(document); |
| 80 select->appendChild(option, IGNORE_EXCEPTION); | 81 select->appendChild(option, IGNORE_EXCEPTION); |
| 81 option->appendChild(Text::create(document, keys[i]), IGNORE_EXCEPTION); | 82 option->appendChild(Text::create(document, keys[i]), IGNORE_EXCEPTION); |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 return false; | 128 return false; |
| 128 } | 129 } |
| 129 | 130 |
| 130 HTMLSelectElement* HTMLKeygenElement::shadowSelect() const | 131 HTMLSelectElement* HTMLKeygenElement::shadowSelect() const |
| 131 { | 132 { |
| 132 ShadowRoot* root = userAgentShadowRoot(); | 133 ShadowRoot* root = userAgentShadowRoot(); |
| 133 return root ? toHTMLSelectElement(root->firstChild()) : 0; | 134 return root ? toHTMLSelectElement(root->firstChild()) : 0; |
| 134 } | 135 } |
| 135 | 136 |
| 136 } // namespace | 137 } // namespace |
| OLD | NEW |