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

Unified Diff: ui/views/controls/native_control_win.cc

Issue 8915007: views: Rename IsVisibleInRootView() to IsDrawn(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/controls/native/native_view_host_win.cc ('k') | ui/views/view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/native_control_win.cc
diff --git a/ui/views/controls/native_control_win.cc b/ui/views/controls/native_control_win.cc
index 041b85a058d6d28574a06e4bd078c15c49a5ec22..25278411c35be247c986a08ef6f06b129ff7ba73 100644
--- a/ui/views/controls/native_control_win.cc
+++ b/ui/views/controls/native_control_win.cc
@@ -79,18 +79,18 @@ void NativeControlWin::ViewHierarchyChanged(bool is_add, View* parent,
void NativeControlWin::VisibilityChanged(View* starting_from, bool is_visible) {
// We might get called due to visibility changes at any point in the
// hierarchy, lets check whether we are really visible or not.
- bool visible = IsVisibleInRootView();
- if (!visible && native_view()) {
+ bool is_drawn = IsDrawn();
+ if (!is_drawn && native_view()) {
// We destroy the child control HWND when we become invisible because of the
// performance cost of maintaining many HWNDs.
HWND hwnd = native_view();
Detach();
DestroyWindow(hwnd);
- } else if (visible && !native_view()) {
+ } else if (is_drawn && !native_view()) {
if (GetWidget())
CreateNativeControl();
}
- if (visible) {
+ if (is_drawn) {
// The view becomes visible after native control is created.
// Layout now.
Layout();
« no previous file with comments | « ui/views/controls/native/native_view_host_win.cc ('k') | ui/views/view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698