summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--WebKit/android/WebCoreSupport/FrameLoaderClientAndroid.cpp8
-rw-r--r--WebKit/android/jni/WebViewCore.cpp8
2 files changed, 10 insertions, 6 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());
diff --git a/WebKit/android/jni/WebViewCore.cpp b/WebKit/android/jni/WebViewCore.cpp
index 80de32f..914bcfb 100644
--- a/WebKit/android/jni/WebViewCore.cpp
+++ b/WebKit/android/jni/WebViewCore.cpp
@@ -863,6 +863,10 @@ BaseLayerAndroid* WebViewCore::createBaseLayer()
BaseLayerAndroid* base = new BaseLayerAndroid();
base->setContent(m_content);
+ bool layoutSucceeded = layoutIfNeededRecursive(m_mainFrame);
+ // Layout only fails if called during a layout.
+ LOG_ASSERT(layoutSucceeded, "Can never be called recursively");
+
#if USE(ACCELERATED_COMPOSITING)
// We set the background color
if (m_mainFrame && m_mainFrame->document()
@@ -915,8 +919,8 @@ BaseLayerAndroid* WebViewCore::recordContent(SkRegion* region, SkIPoint* point)
void WebViewCore::splitContent(PictureSet* content)
{
- bool layoutSuceeded = layoutIfNeededRecursive(m_mainFrame);
- LOG_ASSERT(layoutSuceeded, "Can never be called recursively");
+ bool layoutSucceeded = layoutIfNeededRecursive(m_mainFrame);
+ LOG_ASSERT(layoutSucceeded, "Can never be called recursively");
content->split(&m_content);
rebuildPictureSet(&m_content);
content->set(m_content);