diff options
author | John Reck <jreck@google.com> | 2012-03-02 09:16:50 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-03-02 09:16:50 -0800 |
commit | a5814187e4b55a2682707ab4d69cdb586c0a9210 (patch) | |
tree | 93482661594f244a608629581097dd3a34051283 /Source/WebKit | |
parent | 2c3cd80f5f0e09d2d14390dd03357a0ca8795711 (diff) | |
parent | b5f9fc7c5bf10db6f4a97c94f027142a57a5cf36 (diff) | |
download | external_webkit-a5814187e4b55a2682707ab4d69cdb586c0a9210.zip external_webkit-a5814187e4b55a2682707ab4d69cdb586c0a9210.tar.gz external_webkit-a5814187e4b55a2682707ab4d69cdb586c0a9210.tar.bz2 |
Merge "Fix m.movies.com crash"
Diffstat (limited to 'Source/WebKit')
-rw-r--r-- | Source/WebKit/android/jni/WebViewCore.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/Source/WebKit/android/jni/WebViewCore.cpp b/Source/WebKit/android/jni/WebViewCore.cpp index c3937bc..3a48490 100644 --- a/Source/WebKit/android/jni/WebViewCore.cpp +++ b/Source/WebKit/android/jni/WebViewCore.cpp @@ -538,6 +538,8 @@ WebViewCore* WebViewCore::getWebViewCore(const WebCore::FrameView* view) { if (!view) return 0; + if (view->platformWidget()) + return static_cast<WebFrameView*>(view->platformWidget())->webViewCore(); Frame* frame = view->frame(); while (Frame* parent = frame->tree()->parent()) frame = parent; @@ -553,9 +555,16 @@ WebViewCore* WebViewCore::getWebViewCore(const WebCore::ScrollView* view) { if (!view) return 0; - FrameView* frameView = static_cast<FrameView*>(view->root()); - if (!frameView) - return 0; + if (view->platformWidget()) + return static_cast<WebFrameView*>(view->platformWidget())->webViewCore(); + const FrameView* frameView = 0; + if (view->isFrameView()) + frameView = static_cast<const FrameView*>(view); + else { + frameView = static_cast<const FrameView*>(view->root()); + if (!frameView) + return 0; + } return getWebViewCore(frameView); } @@ -898,8 +907,6 @@ void WebViewCore::scrollTo(int x, int y, bool animate) { ALOG_ASSERT(m_javaGlue->m_obj, "A Java widget was not associated with this view bridge!"); -// ALOGD("WebViewCore::scrollTo(%d %d)\n", x, y); - JNIEnv* env = JSC::Bindings::getJNIEnv(); AutoJObject javaObject = m_javaGlue->object(env); if (!javaObject.get()) |