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

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

Issue 2561043002: Clean-up after Form Association Refactoring (Closed)
Patch Set: Removed constructorNeedsFormElement from scripts and HTMLTagNames Created 4 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, 2007, 2010 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2010 Apple Inc. All rights reserved.
6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
7 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) 7 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org)
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 19 matching lines...) Expand all
30 #include "core/events/KeyboardEvent.h" 30 #include "core/events/KeyboardEvent.h"
31 #include "core/html/FormData.h" 31 #include "core/html/FormData.h"
32 #include "core/html/HTMLFormElement.h" 32 #include "core/html/HTMLFormElement.h"
33 #include "core/layout/LayoutButton.h" 33 #include "core/layout/LayoutButton.h"
34 #include "wtf/StdLibExtras.h" 34 #include "wtf/StdLibExtras.h"
35 35
36 namespace blink { 36 namespace blink {
37 37
38 using namespace HTMLNames; 38 using namespace HTMLNames;
39 39
40 inline HTMLButtonElement::HTMLButtonElement(Document& document, 40 inline HTMLButtonElement::HTMLButtonElement(Document& document)
41 HTMLFormElement* form) 41 : HTMLFormControlElement(buttonTag, document),
42 : HTMLFormControlElement(buttonTag, document, form),
43 m_type(SUBMIT), 42 m_type(SUBMIT),
44 m_isActivatedSubmit(false) {} 43 m_isActivatedSubmit(false) {}
45 44
46 HTMLButtonElement* HTMLButtonElement::create(Document& document, 45 HTMLButtonElement* HTMLButtonElement::create(Document& document) {
47 HTMLFormElement* form) { 46 return new HTMLButtonElement(document);
48 return new HTMLButtonElement(document, form);
49 } 47 }
50 48
51 void HTMLButtonElement::setType(const AtomicString& type) { 49 void HTMLButtonElement::setType(const AtomicString& type) {
52 setAttribute(typeAttr, type); 50 setAttribute(typeAttr, type);
53 } 51 }
54 52
55 LayoutObject* HTMLButtonElement::createLayoutObject(const ComputedStyle&) { 53 LayoutObject* HTMLButtonElement::createLayoutObject(const ComputedStyle&) {
56 return new LayoutButton(this); 54 return new LayoutButton(this);
57 } 55 }
58 56
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 Node::InsertionNotificationRequest HTMLButtonElement::insertedInto( 212 Node::InsertionNotificationRequest HTMLButtonElement::insertedInto(
215 ContainerNode* insertionPoint) { 213 ContainerNode* insertionPoint) {
216 InsertionNotificationRequest request = 214 InsertionNotificationRequest request =
217 HTMLFormControlElement::insertedInto(insertionPoint); 215 HTMLFormControlElement::insertedInto(insertionPoint);
218 logAddElementIfIsolatedWorldAndInDocument("button", typeAttr, formmethodAttr, 216 logAddElementIfIsolatedWorldAndInDocument("button", typeAttr, formmethodAttr,
219 formactionAttr); 217 formactionAttr);
220 return request; 218 return request;
221 } 219 }
222 220
223 } // namespace blink 221 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLButtonElement.h ('k') | third_party/WebKit/Source/core/html/HTMLFieldSetElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698