diff options
author | mad@chromium.org <mad@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-27 02:17:02 +0000 |
---|---|---|
committer | mad@chromium.org <mad@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-27 02:17:02 +0000 |
commit | f911f74c395b825df8a1b92158e032a7e971b2a2 (patch) | |
tree | 921e55cfcd18e2af95439ff6a8d37d432125213c /chrome/renderer | |
parent | 75419b624210ad3863be5897000cbb6e7235505b (diff) | |
download | chromium_src-f911f74c395b825df8a1b92158e032a7e971b2a2.zip chromium_src-f911f74c395b825df8a1b92158e032a7e971b2a2.tar.gz chromium_src-f911f74c395b825df8a1b92158e032a7e971b2a2.tar.bz2 |
We don't support beeing scrolled in two dimensions at a time.
This can happen when zooming on an image as identified in related bug.
So we split it in two phases.
BUG=5873
Review URL: http://codereview.chromium.org/27064
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10568 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-rw-r--r-- | chrome/renderer/render_widget.cc | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/chrome/renderer/render_widget.cc b/chrome/renderer/render_widget.cc index 5929a7d..911e86e 100644 --- a/chrome/renderer/render_widget.cc +++ b/chrome/renderer/render_widget.cc @@ -480,8 +480,11 @@ void RenderWidget::DidInvalidateRect(WebWidget* webwidget, void RenderWidget::DidScrollRect(WebWidget* webwidget, int dx, int dy, const gfx::Rect& clip_rect) { - // We only support scrolling along one axis at a time. - DCHECK((dx && !dy) || (!dx && dy)); + if (dx != 0 && dy != 0) { + // We only support scrolling along one axis at a time. + DidScrollRect(webwidget, 0, dy, clip_rect); + dy = 0; + } bool intersects_with_painting = paint_rect_.Intersects(clip_rect); @@ -597,15 +600,7 @@ void RenderWidget::GetRootWindowRect(WebWidget* webwidget, gfx::Rect* rect) { void RenderWidget::GetRootWindowResizerRect(WebWidget* webwidget, gfx::Rect* rect) { - // This is disabled to verify if WebKit is responsible for the slow down - // that was witnessed in the page cycler tests when the resize corner - // code was commited... -#if defined(OS_MACOSX) - // ...we need it enabled on Mac so scrollbars are usable. *rect = resizer_rect_; -#elif defined(OS_WIN) || defined(OS_LINUX) - *rect = gfx::Rect(); // resizer_rect_; -#endif } void RenderWidget::OnImeSetInputMode(bool is_active) { |