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

Side by Side Diff: Source/core/html/HTMLFormElement.cpp

Issue 66643004: Remove QualifiedName argument from most HTMLElement::create functions (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
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, 2008, 2009 Apple Inc. All rights reserv ed. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed.
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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 #include "core/frame/UseCounter.h" 52 #include "core/frame/UseCounter.h"
53 #include "core/rendering/RenderTextControl.h" 53 #include "core/rendering/RenderTextControl.h"
54 #include "platform/UserGestureIndicator.h" 54 #include "platform/UserGestureIndicator.h"
55 55
56 using namespace std; 56 using namespace std;
57 57
58 namespace WebCore { 58 namespace WebCore {
59 59
60 using namespace HTMLNames; 60 using namespace HTMLNames;
61 61
62 HTMLFormElement::HTMLFormElement(const QualifiedName& tagName, Document& documen t) 62 HTMLFormElement::HTMLFormElement(Document& document)
63 : HTMLElement(tagName, document) 63 : HTMLElement(formTag, document)
64 , m_associatedElementsBeforeIndex(0) 64 , m_associatedElementsBeforeIndex(0)
65 , m_associatedElementsAfterIndex(0) 65 , m_associatedElementsAfterIndex(0)
66 , m_wasUserSubmitted(false) 66 , m_wasUserSubmitted(false)
67 , m_isSubmittingOrPreparingForSubmission(false) 67 , m_isSubmittingOrPreparingForSubmission(false)
68 , m_shouldSubmit(false) 68 , m_shouldSubmit(false)
69 , m_isInResetFunction(false) 69 , m_isInResetFunction(false)
70 , m_wasDemoted(false) 70 , m_wasDemoted(false)
71 , m_requestAutocompleteTimer(this, &HTMLFormElement::requestAutocompleteTime rFired) 71 , m_requestAutocompleteTimer(this, &HTMLFormElement::requestAutocompleteTime rFired)
72 { 72 {
73 ASSERT(hasTagName(formTag));
74 ScriptWrappable::init(this); 73 ScriptWrappable::init(this);
75 } 74 }
76 75
77 PassRefPtr<HTMLFormElement> HTMLFormElement::create(Document& document) 76 PassRefPtr<HTMLFormElement> HTMLFormElement::create(Document& document)
78 { 77 {
79 UseCounter::count(document, UseCounter::FormElement); 78 UseCounter::count(document, UseCounter::FormElement);
80 return adoptRef(new HTMLFormElement(formTag, document)); 79 return adoptRef(new HTMLFormElement(document));
81 }
82
83 PassRefPtr<HTMLFormElement> HTMLFormElement::create(const QualifiedName& tagName , Document& document)
84 {
85 UseCounter::count(document, UseCounter::FormElement);
86 return adoptRef(new HTMLFormElement(tagName, document));
87 } 80 }
88 81
89 HTMLFormElement::~HTMLFormElement() 82 HTMLFormElement::~HTMLFormElement()
90 { 83 {
91 document().formController()->willDeleteForm(this); 84 document().formController()->willDeleteForm(this);
92 85
93 for (unsigned i = 0; i < m_associatedElements.size(); ++i) 86 for (unsigned i = 0; i < m_associatedElements.size(); ++i)
94 m_associatedElements[i]->formWillBeDestroyed(); 87 m_associatedElements[i]->formWillBeDestroyed();
95 for (unsigned i = 0; i < m_imageElements.size(); ++i) 88 for (unsigned i = 0; i < m_imageElements.size(); ++i)
96 m_imageElements[i]->m_form = 0; 89 m_imageElements[i]->m_form = 0;
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 } 799 }
807 800
808 void HTMLFormElement::setDemoted(bool demoted) 801 void HTMLFormElement::setDemoted(bool demoted)
809 { 802 {
810 if (demoted) 803 if (demoted)
811 UseCounter::count(document(), UseCounter::DemotedFormElement); 804 UseCounter::count(document(), UseCounter::DemotedFormElement);
812 m_wasDemoted = demoted; 805 m_wasDemoted = demoted;
813 } 806 }
814 807
815 } // namespace 808 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698