diff options
author | Grace Kloba <klobag@google.com> | 2009-12-02 17:39:47 -0800 |
---|---|---|
committer | Grace Kloba <klobag@google.com> | 2009-12-06 17:09:08 -0800 |
commit | ae5392bee4a0f78e4b30aac8c4448025e727df39 (patch) | |
tree | 0a2520a4207e0983d8cf8776f512704e64290c67 | |
parent | 6c9687c05aead139d549da6cfcccdfd65d2f4d26 (diff) | |
download | external_webkit-ae5392bee4a0f78e4b30aac8c4448025e727df39.zip external_webkit-ae5392bee4a0f78e4b30aac8c4448025e727df39.tar.gz external_webkit-ae5392bee4a0f78e4b30aac8c4448025e727df39.tar.bz2 |
Fix the wrong layout in the layout test.
When we create a new WebFrameView, the bounds needs
to be transferred from the old WebFrameView. Otherwise
the new View will have (0,0) as bounds.
Add transitionToCommitted() for transitionToCommittedFromCachedFrame().
-rw-r--r-- | WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp b/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp index ea1f327..265dfb4 100644 --- a/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp +++ b/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp @@ -825,6 +825,7 @@ void FrameLoaderClientAndroid::transitionToCommittedFromCachedFrame(WebCore::Cac #ifdef ANDROID_META_SUPPORT platformData->restoreMetadata(m_frame->settings()); #endif + m_webFrame->transitionToCommitted(m_frame); } void FrameLoaderClientAndroid::transitionToCommittedForNewPage() { @@ -842,12 +843,17 @@ void FrameLoaderClientAndroid::transitionToCommittedForNewPage() { WebViewCore* webViewCore = WebViewCore::getWebViewCore(m_frame->view()); 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(oldFrameView->getBounds().size(), Color::white, false, IntSize(), false); - + m_frame->createView(bounds.size(), Color::white, false, IntSize(), false); // Create a new WebFrameView for the new FrameView WebFrameView* newFrameView = new WebFrameView(m_frame->view(), webViewCore); + newFrameView->setLocation(bounds.x(), bounds.y()); + newFrameView->setSize(bounds.width(), bounds.height()); + newFrameView->setWindowBounds(windowBounds.x(), windowBounds.y(), windowBounds.width(), windowBounds.height()); // newFrameView attaches itself to FrameView which Retains the reference, so // call Release for newFrameView Release(newFrameView); |