summaryrefslogtreecommitdiffstats
path: root/WebKit
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit')
-rw-r--r--WebKit/android/jni/WebCoreViewBridge.h48
-rw-r--r--WebKit/android/jni/WebViewCore.cpp1
2 files changed, 33 insertions, 16 deletions
diff --git a/WebKit/android/jni/WebCoreViewBridge.h b/WebKit/android/jni/WebCoreViewBridge.h
index 61990af..59e1c9a 100644
--- a/WebKit/android/jni/WebCoreViewBridge.h
+++ b/WebKit/android/jni/WebCoreViewBridge.h
@@ -38,20 +38,22 @@ namespace WebCore
class WebCoreViewBridge : public WebCoreRefObject {
public:
- WebCoreViewBridge() :
- mBounds(0,0,0,0),
- m_windowBounds(0,0,0,0)
- {}
- virtual ~WebCoreViewBridge() {}
+ WebCoreViewBridge() { }
+ virtual ~WebCoreViewBridge() { }
virtual void draw(WebCore::GraphicsContext* ctx,
const WebCore::IntRect& rect) = 0;
const WebCore::IntRect& getBounds() const
{
- return mBounds;
+ return m_bounds;
}
-
+
+ const WebCore::IntRect& getVisibleBounds() const
+ {
+ return m_visibleBounds;
+ }
+
const WebCore::IntRect& getWindowBounds() const
{
return m_windowBounds;
@@ -59,14 +61,22 @@ public:
void setSize(int w, int h)
{
- mBounds.setWidth(w);
- mBounds.setHeight(h);
+ m_bounds.setWidth(w);
+ m_bounds.setHeight(h);
+ }
+
+ void setVisibleSize(int w, int h)
+ {
+ m_visibleBounds.setWidth(w);
+ m_visibleBounds.setHeight(h);
}
void setLocation(int x, int y)
{
- mBounds.setX(x);
- mBounds.setY(y);
+ m_bounds.setX(x);
+ m_bounds.setY(y);
+ m_visibleBounds.setX(x);
+ m_visibleBounds.setY(y);
}
void setWindowBounds(int x, int y, int h, int v)
@@ -74,17 +84,23 @@ public:
m_windowBounds = WebCore::IntRect(x, y, h, v);
}
- int width() const { return mBounds.width(); }
- int height() const { return mBounds.height(); }
- int locX() const { return mBounds.x(); }
- int locY() const { return mBounds.y(); }
+ int width() const { return m_bounds.width(); }
+ int height() const { return m_bounds.height(); }
+ int locX() const { return m_bounds.x(); }
+ int locY() const { return m_bounds.y(); }
+
+ int visibleWidth() const { return m_visibleBounds.width(); }
+ int visibleHeight() const { return m_visibleBounds.height(); }
+ int visibleX() const { return m_visibleBounds.x(); }
+ int visibleY() const { return m_visibleBounds.y(); }
virtual bool forFrameView() const { return false; }
virtual bool forPluginView() const { return false; }
private:
- WebCore::IntRect mBounds;
+ WebCore::IntRect m_bounds;
WebCore::IntRect m_windowBounds;
+ WebCore::IntRect m_visibleBounds;
};
#endif // WEBCORE_VIEW_BRIDGE_H
diff --git a/WebKit/android/jni/WebViewCore.cpp b/WebKit/android/jni/WebViewCore.cpp
index 89abf38..79f3a8a 100644
--- a/WebKit/android/jni/WebViewCore.cpp
+++ b/WebKit/android/jni/WebViewCore.cpp
@@ -1183,6 +1183,7 @@ void WebViewCore::setSizeScreenWidthAndScale(int width, int height,
int ow = window->width();
int oh = window->height();
window->setSize(width, height);
+ window->setVisibleSize(realScreenWidth, screenHeight);
int osw = m_screenWidth;
int orsw = m_screenWidth * m_screenWidthScale / m_scale;
int osh = m_screenHeight;