summaryrefslogtreecommitdiffstats
path: root/Source/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2012-04-17 15:29:36 -0700
committerJohn Reck <jreck@google.com>2012-04-17 15:30:06 -0700
commit4f8aa4f0ecca0a22c3907ae810301b48b3370f95 (patch)
tree99d02f754f988033e848d9785829252bbb3156dc /Source/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp
parent893264ea664be9af3ac64e24116045b51df6f031 (diff)
downloadexternal_webkit-4f8aa4f0ecca0a22c3907ae810301b48b3370f95.zip
external_webkit-4f8aa4f0ecca0a22c3907ae810301b48b3370f95.tar.gz
external_webkit-4f8aa4f0ecca0a22c3907ae810301b48b3370f95.tar.bz2
Fix crash in createWindow
Bug: 6343878 frame->view()->platformWidget() is only valid on the main frame, not subframes. Fix the dialog check to use windowRect(), which handles getting the WebCoreViewBridge from the right frame Change-Id: Ia7083e2b7d54774bc33f41ac58f547c4c139c5b6
Diffstat (limited to 'Source/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp')
-rw-r--r--Source/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp b/Source/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp
index c10f5b3..907dc3c 100644
--- a/Source/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp
+++ b/Source/WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp
@@ -188,10 +188,10 @@ Page* ChromeClientAndroid::createWindow(Frame* frame, const FrameLoadRequest&,
return frame->page();
#endif
- const WebCoreViewBridge* bridge = frame->view()->platformWidget();
+ FloatRect window = windowRect();
bool dialog = features.dialog || !features.resizable
- || (features.heightSet && features.height < bridge->height()
- && features.widthSet && features.width < bridge->width())
+ || (features.heightSet && features.height < window.height()
+ && features.widthSet && features.width < window.width())
|| (!features.menuBarVisible && !features.statusBarVisible
&& !features.toolBarVisible && !features.locationBarVisible
&& !features.scrollbarsVisible);