diff options
| -rw-r--r-- | WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp | 11 | ||||
| -rw-r--r-- | WebKit/android/jni/WebFrameView.h | 4 | ||||
| -rw-r--r-- | WebKit/android/jni/WebViewCore.cpp | 4 |
3 files changed, 14 insertions, 5 deletions
diff --git a/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp b/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp index 60598f8..10cd0b3 100644 --- a/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp +++ b/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp @@ -891,11 +891,12 @@ void FrameLoaderClientAndroid::transitionToCommittedForNewPage() { Retain(webViewCore); // Save the old WebFrameView's bounds and apply them to the new WebFrameView - WebFrameView* oldFrameView = static_cast<WebFrameView*> (m_frame->view()->platformWidget()); - IntRect bounds = oldFrameView->getBounds(); - IntRect windowBounds = oldFrameView->getWindowBounds(); - // we only support opaque, white background for now - m_frame->createView(bounds.size(), Color::white, false, IntSize(), false); + WebFrameView* oldWebFrameView = static_cast<WebFrameView*> (m_frame->view()->platformWidget()); + IntRect bounds = oldWebFrameView->getBounds(); + IntRect windowBounds = oldWebFrameView->getWindowBounds(); + WebCore::FrameView* oldFrameView = oldWebFrameView->view(); + m_frame->createView(bounds.size(), oldFrameView->baseBackgroundColor(), oldFrameView->isTransparent(), IntSize(), false); + // Create a new WebFrameView for the new FrameView WebFrameView* newFrameView = new WebFrameView(m_frame->view(), webViewCore); newFrameView->setLocation(bounds.x(), bounds.y()); diff --git a/WebKit/android/jni/WebFrameView.h b/WebKit/android/jni/WebFrameView.h index d83def1..823f2b4 100644 --- a/WebKit/android/jni/WebFrameView.h +++ b/WebKit/android/jni/WebFrameView.h @@ -49,6 +49,10 @@ namespace android { void setView(WebCore::FrameView* frameView); + WebCore::FrameView* view() const { + return mFrameView; + } + virtual bool forFrameView() const { return true; } private: diff --git a/WebKit/android/jni/WebViewCore.cpp b/WebKit/android/jni/WebViewCore.cpp index 6e0ef43..8556dd8 100644 --- a/WebKit/android/jni/WebViewCore.cpp +++ b/WebKit/android/jni/WebViewCore.cpp @@ -2365,6 +2365,10 @@ void WebViewCore::setBackgroundColor(SkColor c) WebCore::Color bcolor((int)SkColorGetR(c), (int)SkColorGetG(c), (int)SkColorGetB(c), (int)SkColorGetA(c)); view->setBaseBackgroundColor(bcolor); + + // Background color of 0 indicates we want a transparent background + if (c == 0) + view->setTransparent(true); } jclass WebViewCore::getPluginClass(const WebCore::String& libName, const char* className) |
