summaryrefslogtreecommitdiffstats
path: root/chrome/renderer
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-15 15:29:43 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-15 15:29:43 +0000
commitbcaf22711ffe6e692d4b514b4c40840476fdcc84 (patch)
treedc52943e39b3b7f24b73c48d59f0fe02c33af901 /chrome/renderer
parenta35259eca7766586a53949feb437a63b120cc2ca (diff)
downloadchromium_src-bcaf22711ffe6e692d4b514b4c40840476fdcc84.zip
chromium_src-bcaf22711ffe6e692d4b514b4c40840476fdcc84.tar.gz
chromium_src-bcaf22711ffe6e692d4b514b4c40840476fdcc84.tar.bz2
Negative scroll offsets are valid (and expected with RTL pages) yet gfx::Size cannot handle negative values. Switch to gfx::Point.
BUG=72477 TEST=no crash when reproing from bug; zero observable change otherwise. Review URL: http://codereview.chromium.org/6478015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74947 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-rw-r--r--chrome/renderer/render_view.cc4
-rw-r--r--chrome/renderer/render_view.h2
-rw-r--r--chrome/renderer/render_widget.cc4
-rw-r--r--chrome/renderer/render_widget.h2
4 files changed, 6 insertions, 6 deletions
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc
index fb63316..559647c 100644
--- a/chrome/renderer/render_view.cc
+++ b/chrome/renderer/render_view.cc
@@ -5130,9 +5130,9 @@ webkit::ppapi::PluginInstance* RenderView::GetBitmapForOptimizedPluginPaint(
paint_bounds, dib, location, clip);
}
-gfx::Size RenderView::GetScrollOffset() {
+gfx::Point RenderView::GetScrollOffset() {
WebKit::WebSize scroll_offset = webview()->mainFrame()->scrollOffset();
- return gfx::Size(scroll_offset.width, scroll_offset.height);
+ return gfx::Point(scroll_offset.width, scroll_offset.height);
}
void RenderView::OnClearFocusedNode() {
diff --git a/chrome/renderer/render_view.h b/chrome/renderer/render_view.h
index 7cbd422..7944059 100644
--- a/chrome/renderer/render_view.h
+++ b/chrome/renderer/render_view.h
@@ -648,7 +648,7 @@ class RenderView : public RenderWidget,
TransportDIB** dib,
gfx::Rect* location,
gfx::Rect* clip);
- virtual gfx::Size GetScrollOffset();
+ virtual gfx::Point GetScrollOffset();
virtual void DidHandleKeyEvent();
virtual void DidHandleMouseEvent(const WebKit::WebMouseEvent& event);
virtual void OnSetFocus(bool enable);
diff --git a/chrome/renderer/render_widget.cc b/chrome/renderer/render_widget.cc
index 7e21813..28ff55f 100644
--- a/chrome/renderer/render_widget.cc
+++ b/chrome/renderer/render_widget.cc
@@ -988,9 +988,9 @@ webkit::ppapi::PluginInstance* RenderWidget::GetBitmapForOptimizedPluginPaint(
return NULL;
}
-gfx::Size RenderWidget::GetScrollOffset() {
+gfx::Point RenderWidget::GetScrollOffset() {
// Bare RenderWidgets don't support scroll offset.
- return gfx::Size(0, 0);
+ return gfx::Point(0, 0);
}
void RenderWidget::SetHidden(bool hidden) {
diff --git a/chrome/renderer/render_widget.h b/chrome/renderer/render_widget.h
index 04939f5..dac1efa 100644
--- a/chrome/renderer/render_widget.h
+++ b/chrome/renderer/render_widget.h
@@ -224,7 +224,7 @@ class RenderWidget : public IPC::Channel::Listener,
// Gets the scroll offset of this widget, if this widget has a notion of
// scroll offset.
- virtual gfx::Size GetScrollOffset();
+ virtual gfx::Point GetScrollOffset();
// Sets the "hidden" state of this widget. All accesses to is_hidden_ should
// use this method so that we can properly inform the RenderThread of our