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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLFormElement.h

Issue 2340213002: submit() in submit event handler should not contains a value of a submit button. (Closed)
Patch Set: Created 4 years, 3 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) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 void setEncoding(const AtomicString& value) { setEnctype(value); } 59 void setEncoding(const AtomicString& value) { setEnctype(value); }
60 60
61 bool shouldAutocomplete() const; 61 bool shouldAutocomplete() const;
62 62
63 void associate(FormAssociatedElement&); 63 void associate(FormAssociatedElement&);
64 void disassociate(FormAssociatedElement&); 64 void disassociate(FormAssociatedElement&);
65 void associate(HTMLImageElement&); 65 void associate(HTMLImageElement&);
66 void disassociate(HTMLImageElement&); 66 void disassociate(HTMLImageElement&);
67 void didAssociateByParser(); 67 void didAssociateByParser();
68 68
69 void prepareForSubmission(Event*); 69 void prepareForSubmission(Event*, HTMLFormControlElement* submitButton);
70 void submitFromJavaScript(); 70 void submitFromJavaScript();
71 void reset(); 71 void reset();
72 72
73 void setDemoted(bool); 73 void setDemoted(bool);
74 74
75 void submitImplicitly(Event*, bool fromImplicitSubmissionTrigger); 75 void submitImplicitly(Event*, bool fromImplicitSubmissionTrigger);
76 76
77 String name() const; 77 String name() const;
78 78
79 bool noValidate() const; 79 bool noValidate() const;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 112
113 void parseAttribute(const QualifiedName&, const AtomicString&, const AtomicS tring&) override; 113 void parseAttribute(const QualifiedName&, const AtomicString&, const AtomicS tring&) override;
114 bool isURLAttribute(const Attribute&) const override; 114 bool isURLAttribute(const Attribute&) const override;
115 bool hasLegalLinkAttribute(const QualifiedName&) const override; 115 bool hasLegalLinkAttribute(const QualifiedName&) const override;
116 116
117 bool shouldRegisterAsNamedItem() const override { return true; } 117 bool shouldRegisterAsNamedItem() const override { return true; }
118 118
119 void copyNonAttributePropertiesFromElement(const Element&) override; 119 void copyNonAttributePropertiesFromElement(const Element&) override;
120 120
121 void submitDialog(FormSubmission*); 121 void submitDialog(FormSubmission*);
122 void submit(Event*, bool activateSubmitButton); 122 void submit(Event*, HTMLFormControlElement* submitButton);
123 123
124 void scheduleFormSubmission(FormSubmission*); 124 void scheduleFormSubmission(FormSubmission*);
125 125
126 void collectAssociatedElements(Node& root, FormAssociatedElement::List&) con st; 126 void collectAssociatedElements(Node& root, FormAssociatedElement::List&) con st;
127 void collectImageElements(Node& root, HeapVector<Member<HTMLImageElement>>&) ; 127 void collectImageElements(Node& root, HeapVector<Member<HTMLImageElement>>&) ;
128 128
129 // Returns true if the submission should proceed. 129 // Returns true if the submission should proceed.
130 bool validateInteractively(); 130 bool validateInteractively();
131 131
132 // Validates each of the controls, and stores controls of which 'invalid' 132 // Validates each of the controls, and stores controls of which 'invalid'
(...skipping 30 matching lines...) Expand all
163 bool m_hasElementsAssociatedByParser : 1; 163 bool m_hasElementsAssociatedByParser : 1;
164 bool m_hasElementsAssociatedByFormAttribute : 1; 164 bool m_hasElementsAssociatedByFormAttribute : 1;
165 bool m_didFinishParsingChildren : 1; 165 bool m_didFinishParsingChildren : 1;
166 bool m_isInResetFunction : 1; 166 bool m_isInResetFunction : 1;
167 bool m_wasDemoted : 1; 167 bool m_wasDemoted : 1;
168 }; 168 };
169 169
170 } // namespace blink 170 } // namespace blink
171 171
172 #endif // HTMLFormElement_h 172 #endif // HTMLFormElement_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLButtonElement.cpp ('k') | third_party/WebKit/Source/core/html/HTMLFormElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698