summaryrefslogtreecommitdiffstats
path: root/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp
diff options
context:
space:
mode:
authorPatrick Scott <phanna@android.com>2011-01-18 16:24:08 -0500
committerPatrick Scott <phanna@android.com>2011-01-18 16:24:08 -0500
commit211634993282bd9d5c18b26d70e7909aa4a3cfdc (patch)
tree1240ddd560d467b7979a74c713538f43316dd1e0 /WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp
parentf42f297f9d1e499b6b54e6c73ddb46dbb4745ede (diff)
downloadexternal_webkit-211634993282bd9d5c18b26d70e7909aa4a3cfdc.zip
external_webkit-211634993282bd9d5c18b26d70e7909aa4a3cfdc.tar.gz
external_webkit-211634993282bd9d5c18b26d70e7909aa4a3cfdc.tar.bz2
Layout before creating the base layer.
WebKit asserts during draw that the frame does not need a layout. Do the layout to also get the most updated data. Move the bridge assert after the parent check as some frames are never attached and no history item is created. Change-Id: If646d6ed2b409a3078d2f7a6793b7aed94ffecaf
Diffstat (limited to 'WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp')
-rw-r--r--WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp b/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp
index d165afa..52fa4ee 100644
--- a/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp
+++ b/WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp
@@ -807,12 +807,12 @@ void FrameLoaderClientAndroid::frameLoadCompleted() {
void FrameLoaderClientAndroid::saveViewStateToItem(HistoryItem* item) {
ASSERT(m_frame);
ASSERT(item);
- // We should have added a bridge when the child item was added to its
- // parent.
- AndroidWebHistoryBridge* bridge = item->bridge();
- ASSERT(bridge);
// store the current scale (only) for the top frame
if (!m_frame->tree()->parent()) {
+ // We should have added a bridge when the child item was added to its
+ // parent.
+ AndroidWebHistoryBridge* bridge = item->bridge();
+ ASSERT(bridge);
WebViewCore* webViewCore = WebViewCore::getWebViewCore(m_frame->view());
bridge->setScale(webViewCore->scale());
bridge->setTextWrapScale(webViewCore->textWrapScale());