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

Unified Diff: views/controls/scroll_view.cc

Issue 7057014: Variety of tweaks to View API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « views/controls/native_control.cc ('k') | views/controls/scrollbar/bitmap_scroll_bar.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/scroll_view.cc
===================================================================
--- views/controls/scroll_view.cc (revision 86083)
+++ views/controls/scroll_view.cc (working copy)
@@ -103,7 +103,7 @@
if (!control)
return;
if (should_show) {
- if (!control->IsVisible()) {
+ if (!control->visible()) {
AddChildView(control);
control->SetVisible(true);
}
@@ -258,15 +258,15 @@
return gfx::Rect();
const int x =
- (horiz_sb_ && horiz_sb_->IsVisible()) ? horiz_sb_->GetPosition() : 0;
+ (horiz_sb_ && horiz_sb_->visible()) ? horiz_sb_->GetPosition() : 0;
const int y =
- (vert_sb_ && vert_sb_->IsVisible()) ? vert_sb_->GetPosition() : 0;
+ (vert_sb_ && vert_sb_->visible()) ? vert_sb_->GetPosition() : 0;
return gfx::Rect(x, y, viewport_->width(), viewport_->height());
}
void ScrollView::ScrollContentsRegionToBeVisible(const gfx::Rect& rect) {
- if (!contents_ || ((!horiz_sb_ || !horiz_sb_->IsVisible()) &&
- (!vert_sb_ || !vert_sb_->IsVisible()))) {
+ if (!contents_ || ((!horiz_sb_ || !horiz_sb_->visible()) &&
+ (!vert_sb_ || !vert_sb_->visible()))) {
return;
}
@@ -316,13 +316,13 @@
return;
}
- if (horiz_sb_->IsVisible()) {
+ if (horiz_sb_->visible()) {
int vw = viewport_->width();
int cw = contents_->width();
int origin = contents_->x();
horiz_sb_->Update(vw, cw, -origin);
}
- if (vert_sb_->IsVisible()) {
+ if (vert_sb_->visible()) {
int vh = viewport_->height();
int ch = contents_->height();
int origin = contents_->y();
@@ -335,7 +335,7 @@
if (!contents_)
return;
- if (source == horiz_sb_ && horiz_sb_->IsVisible()) {
+ if (source == horiz_sb_ && horiz_sb_->visible()) {
int vw = viewport_->width();
int cw = contents_->width();
int origin = contents_->x();
@@ -348,7 +348,7 @@
contents_->SetX(-position);
contents_->SchedulePaintInRect(contents_->GetVisibleBounds());
}
- } else if (source == vert_sb_ && vert_sb_->IsVisible()) {
+ } else if (source == vert_sb_ && vert_sb_->visible()) {
int vh = viewport_->height();
int ch = contents_->height();
int origin = contents_->y();
@@ -387,11 +387,11 @@
bool processed = false;
// Give vertical scrollbar priority
- if (vert_sb_->IsVisible()) {
+ if (vert_sb_->visible()) {
processed = vert_sb_->OnKeyPressed(event);
}
- if (!processed && horiz_sb_->IsVisible()) {
+ if (!processed && horiz_sb_->visible()) {
processed = horiz_sb_->OnKeyPressed(event);
}
return processed;
@@ -400,10 +400,10 @@
bool ScrollView::OnMouseWheel(const MouseWheelEvent& e) {
bool processed = false;
// Give vertical scrollbar priority
- if (vert_sb_->IsVisible()) {
+ if (vert_sb_->visible()) {
processed = vert_sb_->OnMouseWheel(e);
}
- if (!processed && horiz_sb_->IsVisible()) {
+ if (!processed && horiz_sb_->visible()) {
processed = horiz_sb_->OnMouseWheel(e);
}
return processed;
« no previous file with comments | « views/controls/native_control.cc ('k') | views/controls/scrollbar/bitmap_scroll_bar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698