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

Side by Side Diff: WebCore/html/HTMLFormElement.h

Issue 3464001: Merge 67240 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/517/
Patch Set: Created 10 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
« no previous file with comments | « no previous file | WebCore/html/HTMLFormElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 24 matching lines...) Expand all
35 class Event; 35 class Event;
36 class FormData; 36 class FormData;
37 class HTMLFormControlElement; 37 class HTMLFormControlElement;
38 class HTMLImageElement; 38 class HTMLImageElement;
39 class HTMLInputElement; 39 class HTMLInputElement;
40 class HTMLFormCollection; 40 class HTMLFormCollection;
41 class TextEncoding; 41 class TextEncoding;
42 42
43 struct CollectionCache; 43 struct CollectionCache;
44 44
45 class HTMLFormElement : public HTMLElement { 45 class HTMLFormElement : public HTMLElement {
46 public: 46 public:
47 static PassRefPtr<HTMLFormElement> create(Document*); 47 static PassRefPtr<HTMLFormElement> create(Document*);
48 static PassRefPtr<HTMLFormElement> create(const QualifiedName&, Document*); 48 static PassRefPtr<HTMLFormElement> create(const QualifiedName&, Document*);
49 virtual ~HTMLFormElement(); 49 virtual ~HTMLFormElement();
50 50
51 PassRefPtr<HTMLCollection> elements(); 51 PassRefPtr<HTMLCollection> elements();
52 void getNamedElements(const AtomicString&, Vector<RefPtr<Node> >&); 52 void getNamedElements(const AtomicString&, Vector<RefPtr<Node> >&);
53 53
54 unsigned length() const; 54 unsigned length() const;
55 Node* item(unsigned index); 55 Node* item(unsigned index);
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 void setAcceptCharset(const String&); 91 void setAcceptCharset(const String&);
92 92
93 String action() const; 93 String action() const;
94 void setAction(const String&); 94 void setAction(const String&);
95 95
96 String method() const; 96 String method() const;
97 void setMethod(const String&); 97 void setMethod(const String&);
98 98
99 virtual String target() const; 99 virtual String target() const;
100 100
101 FormSubmissionTrigger submissionTrigger() const; 101 bool wasUserSubmitted() const;
102 102
103 HTMLFormControlElement* defaultButton() const; 103 HTMLFormControlElement* defaultButton() const;
104 104
105 bool checkValidity(); 105 bool checkValidity();
106 106
107 PassRefPtr<HTMLFormControlElement> elementForAlias(const AtomicString&); 107 PassRefPtr<HTMLFormControlElement> elementForAlias(const AtomicString&);
108 void addElementAlias(HTMLFormControlElement*, const AtomicString& alias); 108 void addElementAlias(HTMLFormControlElement*, const AtomicString& alias);
109 109
110 CheckedRadioButtons& checkedRadioButtons() { return m_checkedRadioButtons; } 110 CheckedRadioButtons& checkedRadioButtons() { return m_checkedRadioButtons; }
111 111
112 const Vector<HTMLFormControlElement*>& associatedElements() const { return m _associatedElements; } 112 const Vector<HTMLFormControlElement*>& associatedElements() const { return m _associatedElements; }
113 113
114 private: 114 private:
115 HTMLFormElement(const QualifiedName&, Document*); 115 HTMLFormElement(const QualifiedName&, Document*);
116 116
117 virtual bool rendererIsNeeded(RenderStyle*); 117 virtual bool rendererIsNeeded(RenderStyle*);
118 virtual void insertedIntoDocument(); 118 virtual void insertedIntoDocument();
119 virtual void removedFromDocument(); 119 virtual void removedFromDocument();
120 120
121 virtual void handleLocalEvents(Event*); 121 virtual void handleLocalEvents(Event*);
122 122
123 virtual void parseMappedAttribute(Attribute*); 123 virtual void parseMappedAttribute(Attribute*);
124 124
125 virtual bool isURLAttribute(Attribute*) const; 125 virtual bool isURLAttribute(Attribute*) const;
126 126
127 virtual void documentDidBecomeActive(); 127 virtual void documentDidBecomeActive();
128 128
129 virtual void willMoveToNewOwnerDocument(); 129 virtual void willMoveToNewOwnerDocument();
130 virtual void didMoveToNewOwnerDocument(); 130 virtual void didMoveToNewOwnerDocument();
131 131
132 void submit(Event*, bool activateSubmitButton, bool lockHistory, FormSubmiss ionTrigger); 132 void submit(Event*, bool activateSubmitButton, bool processingUserGesture, F ormSubmissionTrigger);
133 133
134 unsigned formElementIndex(HTMLFormControlElement*); 134 unsigned formElementIndex(HTMLFormControlElement*);
135 // Returns true if the submission should be proceeded. 135 // Returns true if the submission should be proceeded.
136 bool validateInteractively(Event*); 136 bool validateInteractively(Event*);
137 // Validates each of the controls, and stores controls of which 'invalid' 137 // Validates each of the controls, and stores controls of which 'invalid'
138 // event was not canceled to the specified vector. 138 // event was not canceled to the specified vector.
139 void collectUnhandledInvalidControls(Vector<RefPtr<HTMLFormControlElement> > &); 139 void collectUnhandledInvalidControls(Vector<RefPtr<HTMLFormControlElement> > &);
140 140
141 friend class HTMLFormCollection; 141 friend class HTMLFormCollection;
142 142
143 typedef HashMap<RefPtr<AtomicStringImpl>, RefPtr<HTMLFormControlElement> > A liasMap; 143 typedef HashMap<RefPtr<AtomicStringImpl>, RefPtr<HTMLFormControlElement> > A liasMap;
144 144
145 FormSubmission::Attributes m_attributes; 145 FormSubmission::Attributes m_attributes;
146 OwnPtr<AliasMap> m_elementAliases; 146 OwnPtr<AliasMap> m_elementAliases;
147 OwnPtr<CollectionCache> m_collectionCache; 147 OwnPtr<CollectionCache> m_collectionCache;
148 148
149 CheckedRadioButtons m_checkedRadioButtons; 149 CheckedRadioButtons m_checkedRadioButtons;
150 150
151 Vector<HTMLFormControlElement*> m_associatedElements; 151 Vector<HTMLFormControlElement*> m_associatedElements;
152 Vector<HTMLImageElement*> m_imageElements; 152 Vector<HTMLImageElement*> m_imageElements;
153 153
154 FormSubmissionTrigger m_submissionTrigger; 154 bool m_wasUserSubmitted;
155 155
156 bool m_autocomplete : 1; 156 bool m_autocomplete : 1;
157 bool m_insubmit : 1; 157 bool m_insubmit : 1;
158 bool m_doingsubmit : 1; 158 bool m_doingsubmit : 1;
159 bool m_inreset : 1; 159 bool m_inreset : 1;
160 bool m_malformed : 1; 160 bool m_malformed : 1;
161 bool m_demoted : 1; 161 bool m_demoted : 1;
162 AtomicString m_name; 162 AtomicString m_name;
163 }; 163 };
164 164
165 } // namespace WebCore 165 } // namespace WebCore
166 166
167 #endif // HTMLFormElement_h 167 #endif // HTMLFormElement_h
OLDNEW
« no previous file with comments | « no previous file | WebCore/html/HTMLFormElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698