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

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

Issue 2956593003: Revert of Move navigation-induced hiding of form-validation-bubble to the browser process. (Closed)
Patch Set: Created 3 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/html/HTMLFormControlElement.h" 5 #include "core/html/HTMLFormControlElement.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include "core/dom/Document.h" 8 #include "core/dom/Document.h"
9 #include "core/frame/LocalFrameView.h" 9 #include "core/frame/LocalFrameView.h"
10 #include "core/html/HTMLInputElement.h" 10 #include "core/html/HTMLInputElement.h"
(...skipping 23 matching lines...) Expand all
34 34
35 void HideValidationMessage(const Element& anchor) override { 35 void HideValidationMessage(const Element& anchor) override {
36 if (anchor_ == &anchor) 36 if (anchor_ == &anchor)
37 anchor_ = nullptr; 37 anchor_ = nullptr;
38 } 38 }
39 39
40 bool IsValidationMessageVisible(const Element& anchor) override { 40 bool IsValidationMessageVisible(const Element& anchor) override {
41 return anchor_ == &anchor; 41 return anchor_ == &anchor;
42 } 42 }
43 43
44 void WillUnloadDocument(const Document&) override {}
45 void DocumentDetached(const Document&) override {}
44 void WillBeDestroyed() override {} 46 void WillBeDestroyed() override {}
45 DEFINE_INLINE_VIRTUAL_TRACE() { 47 DEFINE_INLINE_VIRTUAL_TRACE() {
46 visitor->Trace(anchor_); 48 visitor->Trace(anchor_);
47 ValidationMessageClient::Trace(visitor); 49 ValidationMessageClient::Trace(visitor);
48 } 50 }
49 51
50 private: 52 private:
51 Member<const Element> anchor_; 53 Member<const Element> anchor_;
52 }; 54 };
53 } 55 }
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 Page::OrdinaryPages().insert(&GetPage()); 133 Page::OrdinaryPages().insert(&GetPage());
132 134
133 HTMLInputElement* input = 135 HTMLInputElement* input =
134 toHTMLInputElement(GetDocument().getElementById("input")); 136 toHTMLInputElement(GetDocument().getElementById("input"));
135 ScopedPageSuspender suspender; // print() suspends the page. 137 ScopedPageSuspender suspender; // print() suspends the page.
136 input->reportValidity(); 138 input->reportValidity();
137 EXPECT_FALSE(validation_message_client->IsValidationMessageVisible(*input)); 139 EXPECT_FALSE(validation_message_client->IsValidationMessageVisible(*input));
138 } 140 }
139 141
140 } // namespace blink 142 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/DocumentTest.cpp ('k') | third_party/WebKit/Source/core/page/Page.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698