diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-13 18:44:19 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-13 18:44:19 +0000 |
commit | 9d801dd4c8e42bada7cc5306f4693efbba8dac3a (patch) | |
tree | 5ee2d7c3d5eebbcd048994f50f834e3ca8d6bc1f | |
parent | c2d3052594e4efb4adfb71c2dcecd5fcd9ee1ea1 (diff) | |
download | chromium_src-9d801dd4c8e42bada7cc5306f4693efbba8dac3a.zip chromium_src-9d801dd4c8e42bada7cc5306f4693efbba8dac3a.tar.gz chromium_src-9d801dd4c8e42bada7cc5306f4693efbba8dac3a.tar.bz2 |
Fix an off-by-one error in posix backing store scrolling.
This error (sometimes) caused a crash when scrolling all the way to the bottom of a page and then attempting to scroll back up.
Review URL: http://codereview.chromium.org/20361
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9768 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/renderer_host/backing_store_posix.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/chrome/browser/renderer_host/backing_store_posix.cc b/chrome/browser/renderer_host/backing_store_posix.cc index 1ff62be..f925ef9 100644 --- a/chrome/browser/renderer_host/backing_store_posix.cc +++ b/chrome/browser/renderer_host/backing_store_posix.cc @@ -113,7 +113,7 @@ void BackingStore::ScrollRect(base::ProcessHandle process, } else { // Move |x| to the first pixel of the last row of the clip rect. x += clip_rect.x() * 4; - x += clip_rect.bottom() * stride; + x += (clip_rect.bottom() - 1) * stride; for (int i = clip_rect.y(); i < clip_rect.height() + dy; ++i) { memcpy(x, x + stride * dy, len); |