| Index: views/controls/scroll_view.cc
|
| ===================================================================
|
| --- views/controls/scroll_view.cc (revision 21299)
|
| +++ views/controls/scroll_view.cc (working copy)
|
| @@ -261,9 +261,9 @@
|
| return gfx::Rect();
|
|
|
| const int x =
|
| - (horiz_sb_ && horiz_sb_->IsVisible()) ? horiz_sb_->GetPosition() : 0;
|
| + horiz_sb_->IsVisible() ? horiz_sb_->GetPosition() : 0;
|
| const int y =
|
| - (vert_sb_ && vert_sb_->IsVisible()) ? vert_sb_->GetPosition() : 0;
|
| + vert_sb_->IsVisible() ? vert_sb_->GetPosition() : 0;
|
| return gfx::Rect(x, y, viewport_->width(), viewport_->height());
|
| }
|
|
|
| @@ -271,10 +271,8 @@
|
| int y,
|
| int width,
|
| int height) {
|
| - if (!contents_ || ((!horiz_sb_ || !horiz_sb_->IsVisible()) &&
|
| - (!vert_sb_ || !vert_sb_->IsVisible()))) {
|
| + if (!contents_ || (!horiz_sb_->IsVisible() && !vert_sb_->IsVisible()))
|
| return;
|
| - }
|
|
|
| // Figure out the maximums for this scroll view.
|
| const int contents_max_x =
|
| @@ -337,7 +335,7 @@
|
| }
|
| }
|
|
|
| -// TODO(ACW). We should really use ScrollWindowEx as needed
|
| +// TODO(ACW): We should really use ScrollWindowEx as needed
|
| void ScrollView::ScrollToPosition(ScrollBar* source, int position) {
|
| if (!contents_)
|
| return;
|
| @@ -502,7 +500,7 @@
|
| : VariableRowHeightScrollHelper(NULL),
|
| top_margin_(top_margin),
|
| row_height_(row_height) {
|
| - DCHECK(row_height > 0);
|
| + DCHECK_GT(row_height, 0);
|
| }
|
|
|
| VariableRowHeightScrollHelper::RowInfo
|
|
|