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

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

Issue 2585473004: Merge "Form validation: Do not show validation bubble if the page is invisible." to M56 branch (Closed)
Patch Set: Created 4 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 | « no previous file | no next file » | 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 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 TextDirection& messageDir, 447 TextDirection& messageDir,
448 String& subMessage, 448 String& subMessage,
449 TextDirection& subMessageDir) { 449 TextDirection& subMessageDir) {
450 messageDir = determineDirectionality(message); 450 messageDir = determineDirectionality(message);
451 if (!subMessage.isEmpty()) 451 if (!subMessage.isEmpty())
452 subMessageDir = layoutObject()->style()->direction(); 452 subMessageDir = layoutObject()->style()->direction();
453 } 453 }
454 454
455 void HTMLFormControlElement::updateVisibleValidationMessage() { 455 void HTMLFormControlElement::updateVisibleValidationMessage() {
456 Page* page = document().page(); 456 Page* page = document().page();
457 if (!page) 457 if (!page || !page->isPageVisible())
458 return; 458 return;
459 String message; 459 String message;
460 if (layoutObject() && willValidate()) 460 if (layoutObject() && willValidate())
461 message = validationMessage().stripWhiteSpace(); 461 message = validationMessage().stripWhiteSpace();
462 462
463 m_hasValidationMessage = true; 463 m_hasValidationMessage = true;
464 ValidationMessageClient* client = &page->validationMessageClient(); 464 ValidationMessageClient* client = &page->validationMessageClient();
465 TextDirection messageDir = LTR; 465 TextDirection messageDir = LTR;
466 TextDirection subMessageDir = LTR; 466 TextDirection subMessageDir = LTR;
467 String subMessage = validationSubMessage().stripWhiteSpace(); 467 String subMessage = validationSubMessage().stripWhiteSpace();
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 return trimmedName; 621 return trimmedName;
622 } 622 }
623 623
624 void HTMLFormControlElement::copyNonAttributePropertiesFromElement( 624 void HTMLFormControlElement::copyNonAttributePropertiesFromElement(
625 const Element& source) { 625 const Element& source) {
626 HTMLElement::copyNonAttributePropertiesFromElement(source); 626 HTMLElement::copyNonAttributePropertiesFromElement(source);
627 setNeedsValidityCheck(); 627 setNeedsValidityCheck();
628 } 628 }
629 629
630 } // namespace blink 630 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698