From ab49f04690b4683b82ae4b08eb1814d22784472f Mon Sep 17 00:00:00 2001 From: Derek Sollenberger Date: Fri, 18 Dec 2009 09:01:01 -0500 Subject: Fix to ensure plugin is notified even when the screen width does not change. --- WebKit/android/jni/WebViewCore.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'WebKit/android') diff --git a/WebKit/android/jni/WebViewCore.cpp b/WebKit/android/jni/WebViewCore.cpp index 896d902..1c1384a 100644 --- a/WebKit/android/jni/WebViewCore.cpp +++ b/WebKit/android/jni/WebViewCore.cpp @@ -1156,14 +1156,14 @@ void WebViewCore::setSizeScreenWidthAndScale(int width, int height, r->setNeedsLayoutAndPrefWidthsRecalc(); m_mainFrame->view()->forceLayout(); // scroll to restore current screen center - if (!node) - return; - const WebCore::IntRect& newBounds = node->getRect(); - DBG_NAV_LOGD("nb:(x=%d,y=%d,w=%d," - "h=%d,ns=%d)", newBounds.x(), newBounds.y(), - newBounds.width(), newBounds.height()); - scrollBy(newBounds.x() - bounds.x(), newBounds.y() - bounds.y(), - false); + if (node) { + const WebCore::IntRect& newBounds = node->getRect(); + DBG_NAV_LOGD("nb:(x=%d,y=%d,w=%d," + "h=%d,ns=%d)", newBounds.x(), newBounds.y(), + newBounds.width(), newBounds.height()); + scrollBy(newBounds.x() - bounds.x(), newBounds.y() - bounds.y(), + false); + } } } -- cgit v1.1