diff options
author | Grace Kloba <klobag@google.com> | 2010-03-12 13:54:21 -0800 |
---|---|---|
committer | Grace Kloba <klobag@google.com> | 2010-03-12 13:54:21 -0800 |
commit | a414df0ed56155cb1c92c0c6c1776583ffc334f2 (patch) | |
tree | bd682f0457fadd5a9abd347ff3405db062a946c9 /WebCore/platform | |
parent | 187a2d37109c06693e11c8a993f136210d662d62 (diff) | |
download | external_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
Diffstat (limited to 'WebCore/platform')
-rw-r--r-- | WebCore/platform/android/ScreenAndroid.cpp | 14 |
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 |