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

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

Issue 389343002: Custom validation message to take into account text direction (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 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 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 void HTMLFormControlElement::updateVisibleValidationMessage() 406 void HTMLFormControlElement::updateVisibleValidationMessage()
407 { 407 {
408 Page* page = document().page(); 408 Page* page = document().page();
409 if (!page) 409 if (!page)
410 return; 410 return;
411 String message; 411 String message;
412 if (renderer() && willValidate()) 412 if (renderer() && willValidate())
413 message = validationMessage().stripWhiteSpace(); 413 message = validationMessage().stripWhiteSpace();
414 if (!m_validationMessage) 414 if (!m_validationMessage)
415 m_validationMessage = ValidationMessage::create(this); 415 m_validationMessage = ValidationMessage::create(this);
416 m_validationMessage->updateValidationMessage(message); 416 m_validationMessage->updateValidationMessage(message, customError());
417 } 417 }
418 418
419 void HTMLFormControlElement::hideVisibleValidationMessage() 419 void HTMLFormControlElement::hideVisibleValidationMessage()
420 { 420 {
421 if (m_validationMessage) 421 if (m_validationMessage)
422 m_validationMessage->requestToHideMessage(); 422 m_validationMessage->requestToHideMessage();
423 } 423 }
424 424
425 bool HTMLFormControlElement::checkValidity(WillBeHeapVector<RefPtrWillBeMember<F ormAssociatedElement> >* unhandledInvalidControls) 425 bool HTMLFormControlElement::checkValidity(WillBeHeapVector<RefPtrWillBeMember<F ormAssociatedElement> >* unhandledInvalidControls)
426 { 426 {
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 502
503 void HTMLFormControlElement::setFocus(bool flag) 503 void HTMLFormControlElement::setFocus(bool flag)
504 { 504 {
505 LabelableElement::setFocus(flag); 505 LabelableElement::setFocus(flag);
506 506
507 if (!flag && wasChangedSinceLastFormControlChangeEvent()) 507 if (!flag && wasChangedSinceLastFormControlChangeEvent())
508 dispatchFormControlChangeEvent(); 508 dispatchFormControlChangeEvent();
509 } 509 }
510 510
511 } // namespace Webcore 511 } // namespace Webcore
OLDNEW
« no previous file with comments | « no previous file | Source/core/html/forms/ValidationMessage.h » ('j') | Source/web/ValidationMessageClientImpl.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698