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

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

Issue 99333011: Make sure getAttribute() / setAttribute() callers use AtomicStrings (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 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
« no previous file with comments | « Source/core/html/HTMLFormControlElement.cpp ('k') | Source/core/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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 static PassRefPtr<HTMLFormElement> create(Document&); 49 static PassRefPtr<HTMLFormElement> create(Document&);
50 virtual ~HTMLFormElement(); 50 virtual ~HTMLFormElement();
51 51
52 PassRefPtr<HTMLCollection> elements(); 52 PassRefPtr<HTMLCollection> elements();
53 void getNamedElements(const AtomicString&, Vector<RefPtr<Node> >&); 53 void getNamedElements(const AtomicString&, Vector<RefPtr<Node> >&);
54 54
55 unsigned length() const; 55 unsigned length() const;
56 Node* item(unsigned index); 56 Node* item(unsigned index);
57 57
58 String enctype() const { return m_attributes.encodingType(); } 58 String enctype() const { return m_attributes.encodingType(); }
59 void setEnctype(const String&); 59 void setEnctype(const AtomicString&);
60 60
61 String encoding() const { return m_attributes.encodingType(); } 61 String encoding() const { return m_attributes.encodingType(); }
62 void setEncoding(const String& value) { setEnctype(value); } 62 void setEncoding(const AtomicString& value) { setEnctype(value); }
63 63
64 bool shouldAutocomplete() const; 64 bool shouldAutocomplete() const;
65 65
66 // FIXME: Should rename these two functions to say "form control" or "form-a ssociated element" instead of "form element". 66 // FIXME: Should rename these two functions to say "form control" or "form-a ssociated element" instead of "form element".
67 void registerFormElement(FormAssociatedElement&); 67 void registerFormElement(FormAssociatedElement&);
68 void removeFormElement(FormAssociatedElement*); 68 void removeFormElement(FormAssociatedElement*);
69 69
70 void registerImgElement(HTMLImageElement*); 70 void registerImgElement(HTMLImageElement*);
71 void removeImgElement(HTMLImageElement*); 71 void removeImgElement(HTMLImageElement*);
72 72
73 bool prepareForSubmission(Event*); 73 bool prepareForSubmission(Event*);
74 void submit(); 74 void submit();
75 void submitFromJavaScript(); 75 void submitFromJavaScript();
76 void reset(); 76 void reset();
77 77
78 void setDemoted(bool); 78 void setDemoted(bool);
79 79
80 void submitImplicitly(Event*, bool fromImplicitSubmissionTrigger); 80 void submitImplicitly(Event*, bool fromImplicitSubmissionTrigger);
81 bool formWouldHaveSecureSubmission(const String& url); 81 bool formWouldHaveSecureSubmission(const String& url);
82 82
83 String name() const; 83 String name() const;
84 84
85 bool noValidate() const; 85 bool noValidate() const;
86 86
87 String acceptCharset() const { return m_attributes.acceptCharset(); } 87 const AtomicString& action() const;
88 void setAcceptCharset(const String&); 88 void setAction(const AtomicString&);
89
90 String action() const;
91 void setAction(const String&);
92 89
93 String method() const; 90 String method() const;
94 void setMethod(const String&); 91 void setMethod(const AtomicString&);
95 92
96 virtual String target() const; 93 virtual String target() const;
97 94
98 bool wasUserSubmitted() const; 95 bool wasUserSubmitted() const;
99 96
100 HTMLFormControlElement* defaultButton() const; 97 HTMLFormControlElement* defaultButton() const;
101 98
102 bool checkValidity(); 99 bool checkValidity();
103 bool checkValidityWithoutDispatchingEvents(); 100 bool checkValidityWithoutDispatchingEvents();
104 101
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 181
185 Vector<RefPtr<Event> > m_pendingAutocompleteEvents; 182 Vector<RefPtr<Event> > m_pendingAutocompleteEvents;
186 Timer<HTMLFormElement> m_requestAutocompleteTimer; 183 Timer<HTMLFormElement> m_requestAutocompleteTimer;
187 }; 184 };
188 185
189 DEFINE_NODE_TYPE_CASTS(HTMLFormElement, hasTagName(HTMLNames::formTag)); 186 DEFINE_NODE_TYPE_CASTS(HTMLFormElement, hasTagName(HTMLNames::formTag));
190 187
191 } // namespace WebCore 188 } // namespace WebCore
192 189
193 #endif // HTMLFormElement_h 190 #endif // HTMLFormElement_h
OLDNEW
« no previous file with comments | « Source/core/html/HTMLFormControlElement.cpp ('k') | Source/core/html/HTMLFormElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698