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 17 matching lines...) Expand all Loading... | |
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/frame/UseCounter.h" | 33 #include "core/frame/UseCounter.h" |
34 #include "core/html/FormData.h" | 34 #include "core/html/FormData.h" |
35 #include "core/html/HTMLOptionElement.h" | 35 #include "core/html/HTMLOptionElement.h" |
36 #include "core/html/HTMLSelectElement.h" | 36 #include "core/html/HTMLSelectElement.h" |
37 #include "core/layout/LayoutBlockFlow.h" | 37 #include "core/layout/LayoutBlockFlow.h" |
38 #include "core/loader/FrameLoaderClient.h" | |
38 #include "platform/text/PlatformLocale.h" | 39 #include "platform/text/PlatformLocale.h" |
39 #include "public/platform/Platform.h" | 40 #include "public/platform/Platform.h" |
40 #include "public/platform/WebLocalizedString.h" | 41 #include "public/platform/WebLocalizedString.h" |
41 #include "wtf/StdLibExtras.h" | 42 #include "wtf/StdLibExtras.h" |
42 | 43 |
43 using namespace blink; | 44 using namespace blink; |
44 | 45 |
45 namespace blink { | 46 namespace blink { |
46 | 47 |
47 using namespace HTMLNames; | 48 using namespace HTMLNames; |
48 | 49 |
49 HTMLKeygenElement::HTMLKeygenElement(Document& document, HTMLFormElement* form) | 50 HTMLKeygenElement::HTMLKeygenElement(Document& document, HTMLFormElement* form) |
50 : HTMLFormControlElementWithState(keygenTag, document, form) | 51 : HTMLFormControlElementWithState(keygenTag, document, form) |
51 { | 52 { |
52 UseCounter::count(document, UseCounter::HTMLKeygenElement); | 53 UseCounter::count(document, UseCounter::HTMLKeygenElement); |
53 } | 54 } |
54 | 55 |
55 PassRefPtrWillBeRawPtr<HTMLKeygenElement> HTMLKeygenElement::create(Document& do cument, HTMLFormElement* form) | 56 PassRefPtrWillBeRawPtr<HTMLKeygenElement> HTMLKeygenElement::create(Document& do cument, HTMLFormElement* form) |
56 { | 57 { |
57 RefPtrWillBeRawPtr<HTMLKeygenElement> keygen = adoptRefWillBeNoop(new HTMLKe ygenElement(document, form)); | 58 RefPtrWillBeRawPtr<HTMLKeygenElement> keygen = adoptRefWillBeNoop(new HTMLKe ygenElement(document, form)); |
58 keygen->ensureUserAgentShadowRoot(); | 59 keygen->ensureUserAgentShadowRoot(); |
59 return keygen.release(); | 60 return keygen.release(); |
60 } | 61 } |
61 | 62 |
62 LayoutObject* HTMLKeygenElement::createLayoutObject(const ComputedStyle& style) | 63 LayoutObject* HTMLKeygenElement::createLayoutObject(const ComputedStyle& style) |
63 { | 64 { |
65 if (!document().frame()->loader().client()->allowKeygen()) | |
66 document().frame()->loader().client()->didNotAllowKeygen(); | |
jochen (gone - plz use gerrit)
2015/11/07 05:53:29
why did you put this check here? Also, it seems li
svaldez
2015/11/10 15:23:41
Isn't this required to tell the browser that the r
jochen (gone - plz use gerrit)
2015/11/10 19:54:45
yes, but I don't understand why you've put this in
| |
67 | |
64 // TODO(mstensho): While it's harmful and meaningless to allow most display types on replaced | 68 // TODO(mstensho): While it's harmful and meaningless to allow most display types on replaced |
65 // content (e.g. table, table-row or flex), it would be useful to honor at l east some of | 69 // content (e.g. table, table-row or flex), it would be useful to honor at l east some of |
66 // them. Table-cell (and maybe table-caption too), for instance. See crbug.c om/335040 | 70 // them. Table-cell (and maybe table-caption too), for instance. See crbug.c om/335040 |
67 return new LayoutBlockFlow(this); | 71 return new LayoutBlockFlow(this); |
68 } | 72 } |
69 | 73 |
70 void HTMLKeygenElement::didAddUserAgentShadowRoot(ShadowRoot& root) | 74 void HTMLKeygenElement::didAddUserAgentShadowRoot(ShadowRoot& root) |
71 { | 75 { |
72 DEFINE_STATIC_LOCAL(AtomicString, keygenSelectPseudoId, ("-webkit-keygen-sel ect", AtomicString::ConstructFromLiteral)); | 76 DEFINE_STATIC_LOCAL(AtomicString, keygenSelectPseudoId, ("-webkit-keygen-sel ect", AtomicString::ConstructFromLiteral)); |
73 | 77 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
129 { | 133 { |
130 return true; | 134 return true; |
131 } | 135 } |
132 | 136 |
133 bool HTMLKeygenElement::supportsAutofocus() const | 137 bool HTMLKeygenElement::supportsAutofocus() const |
134 { | 138 { |
135 return true; | 139 return true; |
136 } | 140 } |
137 | 141 |
138 } // namespace | 142 } // namespace |
OLD | NEW |