| 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;
|
|
|