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

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

Issue 16081007: Introduce toHTMLInputElement(Node*), and use it. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/editing/ReplaceSelectionCommand.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) 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 // FIXME: This message should be moved off the console once a solution t o https://bugs.webkit.org/show_bug.cgi?id=103274 exists. 177 // FIXME: This message should be moved off the console once a solution t o https://bugs.webkit.org/show_bug.cgi?id=103274 exists.
178 element->document()->addConsoleMessage(SecurityMessageSource, ErrorMessa geLevel, "Blocked autofocusing on a form control because the form's frame is san dboxed and the 'allow-scripts' permission is not set."); 178 element->document()->addConsoleMessage(SecurityMessageSource, ErrorMessa geLevel, "Blocked autofocusing on a form control because the form's frame is san dboxed and the 'allow-scripts' permission is not set.");
179 return false; 179 return false;
180 } 180 }
181 if (element->hasAutofocused()) 181 if (element->hasAutofocused())
182 return false; 182 return false;
183 183
184 // FIXME: Should this set of hasTagName checks be replaced by a 184 // FIXME: Should this set of hasTagName checks be replaced by a
185 // virtual member function? 185 // virtual member function?
186 if (element->hasTagName(inputTag)) 186 if (element->hasTagName(inputTag))
187 return !static_cast<HTMLInputElement*>(element)->isInputTypeHidden(); 187 return !toHTMLInputElement(element)->isInputTypeHidden();
188 if (element->hasTagName(selectTag)) 188 if (element->hasTagName(selectTag))
189 return true; 189 return true;
190 if (element->hasTagName(keygenTag)) 190 if (element->hasTagName(keygenTag))
191 return true; 191 return true;
192 if (element->hasTagName(buttonTag)) 192 if (element->hasTagName(buttonTag))
193 return true; 193 return true;
194 if (element->hasTagName(textareaTag)) 194 if (element->hasTagName(textareaTag))
195 return true; 195 return true;
196 196
197 return false; 197 return false;
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 } 473 }
474 474
475 void HTMLFormControlElement::reportMemoryUsage(MemoryObjectInfo* memoryObjectInf o) const 475 void HTMLFormControlElement::reportMemoryUsage(MemoryObjectInfo* memoryObjectInf o) const
476 { 476 {
477 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::DOM); 477 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::DOM);
478 LabelableElement::reportMemoryUsage(memoryObjectInfo); 478 LabelableElement::reportMemoryUsage(memoryObjectInfo);
479 info.addMember(m_validationMessage, "validationMessage"); 479 info.addMember(m_validationMessage, "validationMessage");
480 } 480 }
481 481
482 } // namespace Webcore 482 } // namespace Webcore
OLDNEW
« no previous file with comments | « Source/core/editing/ReplaceSelectionCommand.cpp ('k') | Source/core/html/HTMLFormElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698