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

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

Issue 435753003: Implement minlength for <input> and <textarea>. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 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) 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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 bool FormAssociatedElement::stepMismatch() const 230 bool FormAssociatedElement::stepMismatch() const
231 { 231 {
232 return false; 232 return false;
233 } 233 }
234 234
235 bool FormAssociatedElement::tooLong() const 235 bool FormAssociatedElement::tooLong() const
236 { 236 {
237 return false; 237 return false;
238 } 238 }
239 239
240 bool FormAssociatedElement::tooShort() const
241 {
242 return false;
243 }
244
240 bool FormAssociatedElement::typeMismatch() const 245 bool FormAssociatedElement::typeMismatch() const
241 { 246 {
242 return false; 247 return false;
243 } 248 }
244 249
245 bool FormAssociatedElement::valid() const 250 bool FormAssociatedElement::valid() const
246 { 251 {
247 bool someError = typeMismatch() || stepMismatch() || rangeUnderflow() || ran geOverflow() 252 bool someError = typeMismatch() || stepMismatch() || rangeUnderflow() || ran geOverflow()
248 || tooLong() || patternMismatch() || valueMissing() || hasBadInput() || customError(); 253 || tooLong() || tooShort() || patternMismatch() || valueMissing() || has BadInput()
254 || customError();
249 return !someError; 255 return !someError;
250 } 256 }
251 257
252 bool FormAssociatedElement::valueMissing() const 258 bool FormAssociatedElement::valueMissing() const
253 { 259 {
254 return false; 260 return false;
255 } 261 }
256 262
257 String FormAssociatedElement::customValidationMessage() const 263 String FormAssociatedElement::customValidationMessage() const
258 { 264 {
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 visitor->trace(m_element); 348 visitor->trace(m_element);
343 IdTargetObserver::trace(visitor); 349 IdTargetObserver::trace(visitor);
344 } 350 }
345 351
346 void FormAttributeTargetObserver::idTargetChanged() 352 void FormAttributeTargetObserver::idTargetChanged()
347 { 353 {
348 m_element->formAttributeTargetChanged(); 354 m_element->formAttributeTargetChanged();
349 } 355 }
350 356
351 } // namespace Webcore 357 } // namespace Webcore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698