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

Unified Diff: ui/views/view.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/view.h ('k') | ui/views/view_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/view.cc
diff --git a/ui/views/view.cc b/ui/views/view.cc
index 4e292f3154fc7a01cfb2f84f334f83927727f7d9..ee8be17e8e3c70e3ab0b47b0937e81d5b045f8fa 100644
--- a/ui/views/view.cc
+++ b/ui/views/view.cc
@@ -317,7 +317,7 @@ gfx::Insets View::GetInsets() const {
}
gfx::Rect View::GetVisibleBounds() const {
- if (!IsVisibleInRootView())
+ if (!IsDrawn())
return gfx::Rect();
gfx::Rect vis_bounds(0, 0, width(), height());
gfx::Rect ancestor_bounds;
@@ -398,8 +398,8 @@ void View::SetVisible(bool visible) {
}
}
-bool View::IsVisibleInRootView() const {
- return visible_ && parent_ ? parent_->IsVisibleInRootView() : false;
+bool View::IsDrawn() const {
+ return visible_ && parent_ ? parent_->IsDrawn() : false;
}
void View::SetEnabled(bool enabled) {
@@ -895,12 +895,11 @@ void View::SetNextFocusableView(View* view) {
}
bool View::IsFocusableInRootView() const {
- return IsFocusable() && IsVisibleInRootView();
+ return IsFocusable() && IsDrawn();
}
bool View::IsAccessibilityFocusableInRootView() const {
- return (focusable_ || accessibility_focusable_) && enabled_ &&
- IsVisibleInRootView();
+ return (focusable_ || accessibility_focusable_) && enabled_ && IsDrawn();
}
FocusManager* View::GetFocusManager() {
@@ -1935,7 +1934,7 @@ void View::RegisterPendingAccelerators() {
return;
}
// Only register accelerators if we are visible.
- if (!IsVisibleInRootView() || !GetWidget()->IsVisible())
+ if (!IsDrawn() || !GetWidget()->IsVisible())
return;
for (std::vector<ui::Accelerator>::const_iterator i(
accelerators_->begin() + registered_accelerator_count_);
« no previous file with comments | « ui/views/view.h ('k') | ui/views/view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698