summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/ScrollView.cpp
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2012-02-28 18:42:02 -0800
committerNicolas Roard <nicolasroard@google.com>2012-03-01 16:38:55 -0800
commit9a8423b643a8ce99e5642f2548600f9125382e89 (patch)
tree1121fb39001bead0e89edd593b40a16a0397d710 /Source/WebCore/platform/ScrollView.cpp
parentbd4ee4debb53cea094c09b198f7ba4e8307a2998 (diff)
downloadexternal_webkit-9a8423b643a8ce99e5642f2548600f9125382e89.zip
external_webkit-9a8423b643a8ce99e5642f2548600f9125382e89.tar.gz
external_webkit-9a8423b643a8ce99e5642f2548600f9125382e89.tar.bz2
Fix iframe, for reals!
Change-Id: I588aa5709e7a3c2ced9479c3cf9c1827bf6f7733
Diffstat (limited to 'Source/WebCore/platform/ScrollView.cpp')
-rw-r--r--Source/WebCore/platform/ScrollView.cpp52
1 files changed, 24 insertions, 28 deletions
diff --git a/Source/WebCore/platform/ScrollView.cpp b/Source/WebCore/platform/ScrollView.cpp
index 58a1fbf..140c8e5 100644
--- a/Source/WebCore/platform/ScrollView.cpp
+++ b/Source/WebCore/platform/ScrollView.cpp
@@ -29,6 +29,10 @@
#include "AXObjectCache.h"
#if PLATFORM(ANDROID)
#include "FrameView.h"
+#include "GraphicsLayerAndroid.h"
+#include "RenderLayer.h"
+#include "RenderLayerBacking.h"
+#include "RenderView.h"
#endif
#include "GraphicsContext.h"
#include "GraphicsLayer.h"
@@ -304,34 +308,6 @@ void ScrollView::setContentsSize(const IntSize& newSize)
}
#if PLATFORM(ANDROID)
-int ScrollView::actualWidth() const
-{
- if (platformWidget())
- return platformActualWidth();
- return width();
-}
-
-int ScrollView::actualHeight() const
-{
- if (platformWidget())
- return platformActualHeight();
- return height();
-}
-
-int ScrollView::actualScrollX() const
-{
- if (platformWidget())
- return platformActualScrollX();
- return scrollX();
-}
-
-int ScrollView::actualScrollY() const
-{
- if (platformWidget())
- return platformActualScrollY();
- return scrollY();
-}
-
FrameView* ScrollView::frameView() {
if (this->isFrameView()) {
FrameView* frameView = reinterpret_cast<FrameView*>(this);
@@ -397,6 +373,26 @@ void ScrollView::scrollTo(const IntSize& newOffset)
return;
m_scrollOffset = newOffset;
+#if PLATFORM(ANDROID)
+ if (parent()) {
+ FrameView* frameView = this->frameView();
+ // IFrames are composited on a layer, we do not need to repaint them
+ // when scrolling
+ if (frameView) {
+ RenderView* renderer = frameView->frame()->contentRenderer();
+ if (renderer) {
+ RenderLayer* layer = renderer->layer();
+ if (layer->backing()) {
+ GraphicsLayerAndroid* backing = static_cast<GraphicsLayerAndroid*>(
+ layer->backing()->graphicsLayer());
+ backing->updateScrollOffset();
+ }
+ }
+ return;
+ }
+ }
+#endif
+
if (scrollbarsSuppressed())
return;