diff options
author | ccameron@chromium.org <ccameron@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-20 01:15:36 +0000 |
---|---|---|
committer | ccameron@chromium.org <ccameron@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-20 01:15:36 +0000 |
commit | e22f03fac4fc1b0dd1874a2d8fef69c9220b52c9 (patch) | |
tree | 3093a956cf71e66f1fd81b529dc1f156eedb465f /cc/test/fake_scrollbar.h | |
parent | 47203f336d91408ee2dfb9e3628ca1c42f8f2228 (diff) | |
download | chromium_src-e22f03fac4fc1b0dd1874a2d8fef69c9220b52c9.zip chromium_src-e22f03fac4fc1b0dd1874a2d8fef69c9220b52c9.tar.gz chromium_src-e22f03fac4fc1b0dd1874a2d8fef69c9220b52c9.tar.bz2 |
Correct computation of scrollbar track start
The track_start_ value should be the difference between where the track
starts and where the scrollbar starts. It was being set to the absolute
position where the track starts.
Add tests for ScrollbarLayerImpl::ComputeThumbQuadRect. Move syncing
geometry into a separate frunction from ScrollbarLayer::Update to
simplify tests.
BUG=271914
Review URL: https://chromiumcodereview.appspot.com/23007012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@218390 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test/fake_scrollbar.h')
-rw-r--r-- | cc/test/fake_scrollbar.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cc/test/fake_scrollbar.h b/cc/test/fake_scrollbar.h index b9ac409..0f068b0 100644 --- a/cc/test/fake_scrollbar.h +++ b/cc/test/fake_scrollbar.h @@ -30,12 +30,20 @@ class FakeScrollbar : public Scrollbar { gfx::Rect content_rect) OVERRIDE; void set_location(gfx::Point location) { location_ = location; } + void set_track_rect(gfx::Rect track_rect) { track_rect_ = track_rect; } + void set_thumb_thickness(int thumb_thickness) { + thumb_thickness_ = thumb_thickness; + } + void set_thumb_length(int thumb_length) { thumb_length_ = thumb_length; } private: bool paint_; bool has_thumb_; bool is_overlay_; + int thumb_thickness_; + int thumb_length_; gfx::Point location_; + gfx::Rect track_rect_; SkColor fill_color_; DISALLOW_COPY_AND_ASSIGN(FakeScrollbar); |