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

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: Add layout tests for minlength & maxlength together; fix comments Created 6 years, 2 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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 bool FormAssociatedElement::stepMismatch() const 232 bool FormAssociatedElement::stepMismatch() const
233 { 233 {
234 return false; 234 return false;
235 } 235 }
236 236
237 bool FormAssociatedElement::tooLong() const 237 bool FormAssociatedElement::tooLong() const
238 { 238 {
239 return false; 239 return false;
240 } 240 }
241 241
242 bool FormAssociatedElement::tooShort() const
243 {
244 return false;
245 }
246
242 bool FormAssociatedElement::typeMismatch() const 247 bool FormAssociatedElement::typeMismatch() const
243 { 248 {
244 return false; 249 return false;
245 } 250 }
246 251
247 bool FormAssociatedElement::valid() const 252 bool FormAssociatedElement::valid() const
248 { 253 {
249 bool someError = typeMismatch() || stepMismatch() || rangeUnderflow() || ran geOverflow() 254 bool someError = typeMismatch() || stepMismatch() || rangeUnderflow() || ran geOverflow()
250 || tooLong() || patternMismatch() || valueMissing() || hasBadInput() || customError(); 255 || tooLong() || tooShort() || patternMismatch() || valueMissing() || has BadInput()
256 || customError();
251 return !someError; 257 return !someError;
252 } 258 }
253 259
254 bool FormAssociatedElement::valueMissing() const 260 bool FormAssociatedElement::valueMissing() const
255 { 261 {
256 return false; 262 return false;
257 } 263 }
258 264
259 String FormAssociatedElement::customValidationMessage() const 265 String FormAssociatedElement::customValidationMessage() const
260 { 266 {
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 visitor->trace(m_element); 352 visitor->trace(m_element);
347 IdTargetObserver::trace(visitor); 353 IdTargetObserver::trace(visitor);
348 } 354 }
349 355
350 void FormAttributeTargetObserver::idTargetChanged() 356 void FormAttributeTargetObserver::idTargetChanged()
351 { 357 {
352 m_element->formAttributeTargetChanged(); 358 m_element->formAttributeTargetChanged();
353 } 359 }
354 360
355 } // namespace blink 361 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698