From 15e726c96b7c81e9bbacac36d6abdff2eea4f44e Mon Sep 17 00:00:00 2001 From: Nicolas Roard Date: Wed, 17 Mar 2010 02:06:20 +0000 Subject: Compute the position of the fixed elements to be relative to the screen and not the virtual viewport. This fixes Bug:2515587 and Bug:2457215 Change-Id: Ib987787cf9bf74b760b857dbbb397f85af334dce --- WebKit/android/WebCoreSupport/PlatformBridge.cpp | 12 ++++++++++++ WebKit/android/jni/WebViewCore.h | 1 + 2 files changed, 13 insertions(+) (limited to 'WebKit/android') diff --git a/WebKit/android/WebCoreSupport/PlatformBridge.cpp b/WebKit/android/WebCoreSupport/PlatformBridge.cpp index b8bee7b..05aa42b 100644 --- a/WebKit/android/WebCoreSupport/PlatformBridge.cpp +++ b/WebKit/android/WebCoreSupport/PlatformBridge.cpp @@ -59,6 +59,18 @@ void PlatformBridge::immediateRepaint(const WebCore::FrameView* view) #endif // USE(ACCELERATED_COMPOSITING) +int PlatformBridge::screenWidth(const WebCore::FrameView* view) +{ + android::WebViewCore* core = android::WebViewCore::getWebViewCore(view); + return static_cast((core->screenWidthScale() * core->screenWidth()) / core->scale()); +} + +int PlatformBridge::screenHeight(const WebCore::FrameView* view) +{ + android::WebViewCore* core = android::WebViewCore::getWebViewCore(view); + return core->screenHeight(); +} + WTF::Vector PlatformBridge::getSupportedKeyStrengthList() { KeyGeneratorClient* client = JavaSharedClient::GetKeyGeneratorClient(); diff --git a/WebKit/android/jni/WebViewCore.h b/WebKit/android/jni/WebViewCore.h index 01033f2..0ec8bed 100644 --- a/WebKit/android/jni/WebViewCore.h +++ b/WebKit/android/jni/WebViewCore.h @@ -445,6 +445,7 @@ namespace android { // record the inval area, and the picture size bool recordContent(SkRegion* , SkIPoint* ); int screenWidth() const { return m_screenWidth; } + int screenHeight() const { return m_screenHeight; } float scale() const { return m_scale; } float screenWidthScale() const { return m_screenWidthScale; } WebCore::Frame* mainFrame() const { return m_mainFrame; } -- cgit v1.1