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

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

Issue 2866193002: Forms: Validation Message bubble should not open during print(). (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/HTMLFormControlElementTest.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 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 TextDirection& sub_message_dir) { 458 TextDirection& sub_message_dir) {
459 message_dir = DetermineDirectionality(message); 459 message_dir = DetermineDirectionality(message);
460 if (!sub_message.IsEmpty()) 460 if (!sub_message.IsEmpty())
461 sub_message_dir = GetLayoutObject()->Style()->Direction(); 461 sub_message_dir = GetLayoutObject()->Style()->Direction();
462 } 462 }
463 463
464 void HTMLFormControlElement::UpdateVisibleValidationMessage() { 464 void HTMLFormControlElement::UpdateVisibleValidationMessage() {
465 Page* page = GetDocument().GetPage(); 465 Page* page = GetDocument().GetPage();
466 if (!page || !page->IsPageVisible() || GetDocument().UnloadStarted()) 466 if (!page || !page->IsPageVisible() || GetDocument().UnloadStarted())
467 return; 467 return;
468 if (GetDocument().GetFrame()->ShouldUsePrintingLayout()) 468 if (page->Suspended())
469 return; 469 return;
470 String message; 470 String message;
471 if (GetLayoutObject() && willValidate()) 471 if (GetLayoutObject() && willValidate())
472 message = validationMessage().StripWhiteSpace(); 472 message = validationMessage().StripWhiteSpace();
473 473
474 has_validation_message_ = true; 474 has_validation_message_ = true;
475 ValidationMessageClient* client = &page->GetValidationMessageClient(); 475 ValidationMessageClient* client = &page->GetValidationMessageClient();
476 TextDirection message_dir = TextDirection::kLtr; 476 TextDirection message_dir = TextDirection::kLtr;
477 TextDirection sub_message_dir = TextDirection::kLtr; 477 TextDirection sub_message_dir = TextDirection::kLtr;
478 String sub_message = ValidationSubMessage().StripWhiteSpace(); 478 String sub_message = ValidationSubMessage().StripWhiteSpace();
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 const Element& source) { 637 const Element& source) {
638 HTMLElement::CopyNonAttributePropertiesFromElement(source); 638 HTMLElement::CopyNonAttributePropertiesFromElement(source);
639 SetNeedsValidityCheck(); 639 SetNeedsValidityCheck();
640 } 640 }
641 641
642 void HTMLFormControlElement::AssociateWith(HTMLFormElement* form) { 642 void HTMLFormControlElement::AssociateWith(HTMLFormElement* form) {
643 AssociateByParser(form); 643 AssociateByParser(form);
644 }; 644 };
645 645
646 } // namespace blink 646 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/HTMLFormControlElementTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698