Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLKeygenElement.cpp

Issue 1417033010: Adding <keygen> Content Setting (Blink) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@keygen_core
Patch Set: Rebase. Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 16 matching lines...) Expand all
27 #include "bindings/core/v8/ExceptionStatePlaceholder.h" 27 #include "bindings/core/v8/ExceptionStatePlaceholder.h"
28 #include "core/HTMLNames.h" 28 #include "core/HTMLNames.h"
29 #include "core/dom/Document.h" 29 #include "core/dom/Document.h"
30 #include "core/dom/Text.h" 30 #include "core/dom/Text.h"
31 #include "core/dom/shadow/ShadowRoot.h" 31 #include "core/dom/shadow/ShadowRoot.h"
32 #include "core/frame/UseCounter.h" 32 #include "core/frame/UseCounter.h"
33 #include "core/html/FormData.h" 33 #include "core/html/FormData.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 "core/layout/LayoutBlockFlow.h"
37 #include "core/loader/FrameLoaderClient.h"
37 #include "platform/text/PlatformLocale.h" 38 #include "platform/text/PlatformLocale.h"
38 #include "public/platform/Platform.h" 39 #include "public/platform/Platform.h"
39 #include "public/platform/WebLocalizedString.h" 40 #include "public/platform/WebLocalizedString.h"
40 #include "wtf/StdLibExtras.h" 41 #include "wtf/StdLibExtras.h"
41 42
42 using namespace blink; 43 using namespace blink;
43 44
44 namespace blink { 45 namespace blink {
45 46
46 using namespace HTMLNames; 47 using namespace HTMLNames;
47 48
48 HTMLKeygenElement::HTMLKeygenElement(Document& document, HTMLFormElement* form) 49 HTMLKeygenElement::HTMLKeygenElement(Document& document, HTMLFormElement* form)
49 : HTMLFormControlElementWithState(keygenTag, document, form) 50 : HTMLFormControlElementWithState(keygenTag, document, form)
50 { 51 {
51 UseCounter::count(document, UseCounter::HTMLKeygenElement); 52 UseCounter::count(document, UseCounter::HTMLKeygenElement);
53 if (document.frame())
54 document.frame()->loader().client()->didUseKeygen();
52 } 55 }
53 56
54 PassRefPtrWillBeRawPtr<HTMLKeygenElement> HTMLKeygenElement::create(Document& do cument, HTMLFormElement* form) 57 PassRefPtrWillBeRawPtr<HTMLKeygenElement> HTMLKeygenElement::create(Document& do cument, HTMLFormElement* form)
55 { 58 {
56 RefPtrWillBeRawPtr<HTMLKeygenElement> keygen = adoptRefWillBeNoop(new HTMLKe ygenElement(document, form)); 59 RefPtrWillBeRawPtr<HTMLKeygenElement> keygen = adoptRefWillBeNoop(new HTMLKe ygenElement(document, form));
57 keygen->ensureUserAgentShadowRoot(); 60 keygen->ensureUserAgentShadowRoot();
58 return keygen.release(); 61 return keygen.release();
59 } 62 }
60 63
61 LayoutObject* HTMLKeygenElement::createLayoutObject(const ComputedStyle& style) 64 LayoutObject* HTMLKeygenElement::createLayoutObject(const ComputedStyle& style)
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 { 131 {
129 return true; 132 return true;
130 } 133 }
131 134
132 bool HTMLKeygenElement::supportsAutofocus() const 135 bool HTMLKeygenElement::supportsAutofocus() const
133 { 136 {
134 return true; 137 return true;
135 } 138 }
136 139
137 } // namespace 140 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698