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

Unified Diff: ui/views/focus/focus_traversal_unittest.cc

Issue 2345183002: Views: Draw Textfield selected text in gray when top-level Widget loses focus.
Patch Set: Review comments. Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: ui/views/focus/focus_traversal_unittest.cc
diff --git a/ui/views/focus/focus_traversal_unittest.cc b/ui/views/focus/focus_traversal_unittest.cc
index 1bf6ebccd3aa234598892b4d3ca8a172515acc18..afeaf97fb51b6b5a0e9b1d277dce00bbc60bdcb1 100644
--- a/ui/views/focus/focus_traversal_unittest.cc
+++ b/ui/views/focus/focus_traversal_unittest.cc
@@ -137,7 +137,15 @@ class BorderView : public NativeViewHost {
SetFocusBehavior(FocusBehavior::NEVER);
}
- ~BorderView() override {}
+ ~BorderView() override {
+#if !defined(OS_MACOSX)
+ // TYPE_CONTROL Widget close order is different on macOS vs Windows/Linux.
tapted 2016/11/07 06:14:50 We generally need platforms to behave the same - t
Patti Lor 2016/11/08 01:47:31 Deleted as discussed offline.
+ // On macOS, |widget_|'s native widget will be destroyed by the time this
+ // destructor is reached, so avoid possible use-after-frees on it (see
+ // Widget::CloseNow()) by calling this only on Windows and Linux.
+ widget_->CloseNow();
+#endif
+ }
virtual internal::RootView* GetContentsRootView() {
return static_cast<internal::RootView*>(widget_->GetRootView());

Powered by Google App Engine
This is Rietveld 408576698