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

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 5 years 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 17 matching lines...) Expand all
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 document().frame()->loader().client()->usedKeygen();
jochen (gone - plz use gerrit) 2015/11/24 13:05:08 why not in the ctor?
66
64 // TODO(mstensho): While it's harmful and meaningless to allow most display types on replaced 67 // 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 68 // 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 69 // them. Table-cell (and maybe table-caption too), for instance. See crbug.c om/335040
67 return new LayoutBlockFlow(this); 70 return new LayoutBlockFlow(this);
68 } 71 }
69 72
70 void HTMLKeygenElement::didAddUserAgentShadowRoot(ShadowRoot& root) 73 void HTMLKeygenElement::didAddUserAgentShadowRoot(ShadowRoot& root)
71 { 74 {
72 DEFINE_STATIC_LOCAL(AtomicString, keygenSelectPseudoId, ("-webkit-keygen-sel ect", AtomicString::ConstructFromLiteral)); 75 DEFINE_STATIC_LOCAL(AtomicString, keygenSelectPseudoId, ("-webkit-keygen-sel ect", AtomicString::ConstructFromLiteral));
73 76
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 { 132 {
130 return true; 133 return true;
131 } 134 }
132 135
133 bool HTMLKeygenElement::supportsAutofocus() const 136 bool HTMLKeygenElement::supportsAutofocus() const
134 { 137 {
135 return true; 138 return true;
136 } 139 }
137 140
138 } // namespace 141 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698