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 15 matching lines...) Expand all Loading... | |
26 #include "core/html/HTMLKeygenElement.h" | 26 #include "core/html/HTMLKeygenElement.h" |
27 | 27 |
28 #include "bindings/core/v8/ExceptionStatePlaceholder.h" | 28 #include "bindings/core/v8/ExceptionStatePlaceholder.h" |
29 #include "core/HTMLNames.h" | 29 #include "core/HTMLNames.h" |
30 #include "core/dom/Document.h" | 30 #include "core/dom/Document.h" |
31 #include "core/dom/Text.h" | 31 #include "core/dom/Text.h" |
32 #include "core/dom/shadow/ShadowRoot.h" | 32 #include "core/dom/shadow/ShadowRoot.h" |
33 #include "core/html/FormDataList.h" | 33 #include "core/html/FormDataList.h" |
34 #include "core/html/HTMLOptionElement.h" | 34 #include "core/html/HTMLOptionElement.h" |
35 #include "core/html/HTMLSelectElement.h" | 35 #include "core/html/HTMLSelectElement.h" |
36 #include "core/layout/LayoutBlockFlow.h" | |
36 #include "platform/text/PlatformLocale.h" | 37 #include "platform/text/PlatformLocale.h" |
37 #include "public/platform/Platform.h" | 38 #include "public/platform/Platform.h" |
38 #include "public/platform/WebLocalizedString.h" | 39 #include "public/platform/WebLocalizedString.h" |
39 #include "wtf/StdLibExtras.h" | 40 #include "wtf/StdLibExtras.h" |
40 | 41 |
41 using namespace blink; | 42 using namespace blink; |
42 | 43 |
43 namespace blink { | 44 namespace blink { |
44 | 45 |
45 using namespace HTMLNames; | 46 using namespace HTMLNames; |
46 | 47 |
47 HTMLKeygenElement::HTMLKeygenElement(Document& document, HTMLFormElement* form) | 48 HTMLKeygenElement::HTMLKeygenElement(Document& document, HTMLFormElement* form) |
48 : HTMLFormControlElementWithState(keygenTag, document, form) | 49 : HTMLFormControlElementWithState(keygenTag, document, form) |
49 { | 50 { |
50 } | 51 } |
51 | 52 |
52 PassRefPtrWillBeRawPtr<HTMLKeygenElement> HTMLKeygenElement::create(Document& do cument, HTMLFormElement* form) | 53 PassRefPtrWillBeRawPtr<HTMLKeygenElement> HTMLKeygenElement::create(Document& do cument, HTMLFormElement* form) |
53 { | 54 { |
54 RefPtrWillBeRawPtr<HTMLKeygenElement> keygen = adoptRefWillBeNoop(new HTMLKe ygenElement(document, form)); | 55 RefPtrWillBeRawPtr<HTMLKeygenElement> keygen = adoptRefWillBeNoop(new HTMLKe ygenElement(document, form)); |
55 keygen->ensureClosedShadowRoot(); | 56 keygen->ensureClosedShadowRoot(); |
56 return keygen.release(); | 57 return keygen.release(); |
57 } | 58 } |
58 | 59 |
60 LayoutObject* HTMLKeygenElement::createLayoutObject(const LayoutStyle& style) | |
61 { | |
62 return new LayoutBlockFlow(this); | |
Julien - ping for review
2015/03/23 15:16:51
We have this pattern around the code but it's maki
mstensho (USE GERRIT)
2015/03/23 22:46:46
Done.
| |
63 } | |
64 | |
59 void HTMLKeygenElement::didAddClosedShadowRoot(ShadowRoot& root) | 65 void HTMLKeygenElement::didAddClosedShadowRoot(ShadowRoot& root) |
60 { | 66 { |
61 DEFINE_STATIC_LOCAL(AtomicString, keygenSelectPseudoId, ("-webkit-keygen-sel ect", AtomicString::ConstructFromLiteral)); | 67 DEFINE_STATIC_LOCAL(AtomicString, keygenSelectPseudoId, ("-webkit-keygen-sel ect", AtomicString::ConstructFromLiteral)); |
62 | 68 |
63 Vector<String> keys; | 69 Vector<String> keys; |
64 keys.reserveCapacity(2); | 70 keys.reserveCapacity(2); |
65 keys.append(locale().queryString(WebLocalizedString::KeygenMenuHighGradeKeyS ize)); | 71 keys.append(locale().queryString(WebLocalizedString::KeygenMenuHighGradeKeyS ize)); |
66 keys.append(locale().queryString(WebLocalizedString::KeygenMenuMediumGradeKe ySize)); | 72 keys.append(locale().queryString(WebLocalizedString::KeygenMenuMediumGradeKe ySize)); |
67 | 73 |
68 // 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. |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
120 { | 126 { |
121 return true; | 127 return true; |
122 } | 128 } |
123 | 129 |
124 bool HTMLKeygenElement::supportsAutofocus() const | 130 bool HTMLKeygenElement::supportsAutofocus() const |
125 { | 131 { |
126 return true; | 132 return true; |
127 } | 133 } |
128 | 134 |
129 } // namespace | 135 } // namespace |
OLD | NEW |