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

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

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.h ('k') | Source/core/html/HTMLFormElement.h » ('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) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 } 71 }
72 72
73 String HTMLFormControlElement::formEnctype() const 73 String HTMLFormControlElement::formEnctype() const
74 { 74 {
75 const AtomicString& formEnctypeAttr = fastGetAttribute(formenctypeAttr); 75 const AtomicString& formEnctypeAttr = fastGetAttribute(formenctypeAttr);
76 if (formEnctypeAttr.isNull()) 76 if (formEnctypeAttr.isNull())
77 return emptyString(); 77 return emptyString();
78 return FormSubmission::Attributes::parseEncodingType(formEnctypeAttr); 78 return FormSubmission::Attributes::parseEncodingType(formEnctypeAttr);
79 } 79 }
80 80
81 void HTMLFormControlElement::setFormEnctype(const String& value) 81 void HTMLFormControlElement::setFormEnctype(const AtomicString& value)
82 { 82 {
83 setAttribute(formenctypeAttr, value); 83 setAttribute(formenctypeAttr, value);
84 } 84 }
85 85
86 String HTMLFormControlElement::formMethod() const 86 String HTMLFormControlElement::formMethod() const
87 { 87 {
88 const AtomicString& formMethodAttr = fastGetAttribute(formmethodAttr); 88 const AtomicString& formMethodAttr = fastGetAttribute(formmethodAttr);
89 if (formMethodAttr.isNull()) 89 if (formMethodAttr.isNull())
90 return emptyString(); 90 return emptyString();
91 return FormSubmission::Attributes::methodString(FormSubmission::Attributes:: parseMethodType(formMethodAttr)); 91 return FormSubmission::Attributes::methodString(FormSubmission::Attributes:: parseMethodType(formMethodAttr));
92 } 92 }
93 93
94 void HTMLFormControlElement::setFormMethod(const String& value) 94 void HTMLFormControlElement::setFormMethod(const AtomicString& value)
95 { 95 {
96 setAttribute(formmethodAttr, value); 96 setAttribute(formmethodAttr, value);
97 } 97 }
98 98
99 bool HTMLFormControlElement::formNoValidate() const 99 bool HTMLFormControlElement::formNoValidate() const
100 { 100 {
101 return fastHasAttribute(formnovalidateAttr); 101 return fastHasAttribute(formnovalidateAttr);
102 } 102 }
103 103
104 void HTMLFormControlElement::updateAncestorDisabledState() const 104 void HTMLFormControlElement::updateAncestorDisabledState() const
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 String fullName = name(); 527 String fullName = name();
528 String trimmedName = fullName.stripWhiteSpace(); 528 String trimmedName = fullName.stripWhiteSpace();
529 if (!trimmedName.isEmpty()) 529 if (!trimmedName.isEmpty())
530 return trimmedName; 530 return trimmedName;
531 fullName = getIdAttribute(); 531 fullName = getIdAttribute();
532 trimmedName = fullName.stripWhiteSpace(); 532 trimmedName = fullName.stripWhiteSpace();
533 return trimmedName; 533 return trimmedName;
534 } 534 }
535 535
536 } // namespace Webcore 536 } // namespace Webcore
OLDNEW
« no previous file with comments | « Source/core/html/HTMLFormControlElement.h ('k') | Source/core/html/HTMLFormElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698