diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-11 00:24:28 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-11 00:24:28 +0000 |
commit | 2936ac28c737283ec9b0ada0b84daffc810293ac (patch) | |
tree | d55637b4fed97c9d94f2a9150e202c64b74ada31 /chrome/renderer/paint_aggregator.cc | |
parent | 028117dee12726ec5bdcd7774022d6fbfe2ade52 (diff) | |
download | chromium_src-2936ac28c737283ec9b0ada0b84daffc810293ac.zip chromium_src-2936ac28c737283ec9b0ada0b84daffc810293ac.tar.gz chromium_src-2936ac28c737283ec9b0ada0b84daffc810293ac.tar.bz2 |
Handle the case of two scroll events cancelling each other out.
R=pkasting
BUG=none
TEST=covered by unittests
Review URL: http://codereview.chromium.org/491022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34314 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/paint_aggregator.cc')
-rw-r--r-- | chrome/renderer/paint_aggregator.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/renderer/paint_aggregator.cc b/chrome/renderer/paint_aggregator.cc index 125f7b5..c5c4405 100644 --- a/chrome/renderer/paint_aggregator.cc +++ b/chrome/renderer/paint_aggregator.cc @@ -155,6 +155,12 @@ void PaintAggregator::ScrollRect(int dx, int dy, const gfx::Rect& clip_rect) { update_.scroll_rect = clip_rect; update_.scroll_delta.Offset(dx, dy); + // We might have just wiped out a pre-existing scroll. + if (update_.scroll_delta == gfx::Point()) { + update_.scroll_rect = gfx::Rect(); + return; + } + // Adjust any contained paint rects and check for any overlapping paints. for (size_t i = 0; i < update_.paint_rects.size(); ++i) { if (update_.scroll_rect.Contains(update_.paint_rects[i])) { |