summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrace Kloba <klobag@google.com>2010-03-12 13:54:21 -0800
committerGrace Kloba <klobag@google.com>2010-03-12 13:54:21 -0800
commita414df0ed56155cb1c92c0c6c1776583ffc334f2 (patch)
treebd682f0457fadd5a9abd347ff3405db062a946c9
parent187a2d37109c06693e11c8a993f136210d662d62 (diff)
downloadexternal_webkit-a414df0ed56155cb1c92c0c6c1776583ffc334f2.zip
external_webkit-a414df0ed56155cb1c92c0c6c1776583ffc334f2.tar.gz
external_webkit-a414df0ed56155cb1c92c0c6c1776583ffc334f2.tar.bz2
Use the bounds we layout the page for screenRect.
This should fix the problem where links in google.com news panel show up in the subwindow. Fix http://b/issue?id=2509597
-rw-r--r--WebCore/platform/android/ScreenAndroid.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/WebCore/platform/android/ScreenAndroid.cpp b/WebCore/platform/android/ScreenAndroid.cpp
index 8cec844..21df08a 100644
--- a/WebCore/platform/android/ScreenAndroid.cpp
+++ b/WebCore/platform/android/ScreenAndroid.cpp
@@ -38,6 +38,8 @@
#include <ui/DisplayInfo.h>
#include <ui/PixelFormat.h>
#include <surfaceflinger/SurfaceComposerClient.h>
+#include "ScrollView.h"
+#include "WebCoreViewBridge.h"
namespace WebCore {
@@ -66,18 +68,16 @@ bool screenIsMonochrome(Widget* page)
// the accuracy of these number are not too important.
FloatRect screenRect(Widget* page)
{
- android::DisplayInfo info;
- android::SurfaceComposerClient::getDisplayInfo(android::DisplayID(0), &info);
- return FloatRect(0.0, 0.0, info.w, info.h);
+ IntRect rect = page->root()->platformWidget()->getBounds();
+ return FloatRect(0.0, 0.0, rect.width(), rect.height());
}
// Similar screenRect, this function is commonly used by javascripts
// to position and resize windows (usually to full screen).
-FloatRect screenAvailableRect(Widget*)
+FloatRect screenAvailableRect(Widget* page)
{
- android::DisplayInfo info;
- android::SurfaceComposerClient::getDisplayInfo(android::DisplayID(0), &info);
- return FloatRect(0.0, 0.0, info.w, info.h);
+ IntRect rect = page->root()->platformWidget()->getBounds();
+ return FloatRect(0.0, 0.0, rect.width(), rect.height());
}
} // namespace WebCore