diff options
author | Steve Block <steveblock@google.com> | 2011-11-24 15:24:03 +0000 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2011-11-24 15:56:20 +0000 |
commit | 92aa6da37acade932d9c3c90b1a0511adc2eab75 (patch) | |
tree | dcda26e23441433869d9b6d56eeb0ecb6c5b4e33 /Source/WebKit/android/jni/WebViewCore.cpp | |
parent | 3eaf0f8cdb150a43732c8391a73046811b3c378d (diff) | |
download | external_webkit-92aa6da37acade932d9c3c90b1a0511adc2eab75.zip external_webkit-92aa6da37acade932d9c3c90b1a0511adc2eab75.tar.gz external_webkit-92aa6da37acade932d9c3c90b1a0511adc2eab75.tar.bz2 |
Fix WebViewCore::createBaseLayer() to always do a layout and paint the background color
It seems that it's not valid to do this only when the base layer's inval region
is not empty.
This is a partial revert of https://android-git.corp.google.com/g/#/c/142481.
Bug: 5501576
Change-Id: Ie608674e0b61e0d6280777583c64499ff5afe8a3
Diffstat (limited to 'Source/WebKit/android/jni/WebViewCore.cpp')
-rw-r--r-- | Source/WebKit/android/jni/WebViewCore.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/Source/WebKit/android/jni/WebViewCore.cpp b/Source/WebKit/android/jni/WebViewCore.cpp index 7692de1..6cc15d7 100644 --- a/Source/WebKit/android/jni/WebViewCore.cpp +++ b/Source/WebKit/android/jni/WebViewCore.cpp @@ -897,17 +897,15 @@ BaseLayerAndroid* WebViewCore::createBaseLayer(SkRegion* region) BaseLayerAndroid* base = new BaseLayerAndroid(); base->setContent(m_content); - if (!region->isEmpty()) { - m_skipContentDraw = true; - bool layoutSucceeded = layoutIfNeededRecursive(m_mainFrame); - m_skipContentDraw = false; - // Layout only fails if called during a layout. - LOG_ASSERT(layoutSucceeded, "Can never be called recursively"); - } + m_skipContentDraw = true; + bool layoutSucceeded = layoutIfNeededRecursive(m_mainFrame); + m_skipContentDraw = false; + // 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 (!region->isEmpty() && m_mainFrame && m_mainFrame->document() + if (m_mainFrame && m_mainFrame->document() && m_mainFrame->document()->body()) { Document* document = m_mainFrame->document(); RefPtr<RenderStyle> style = document->styleForElementIgnoringPendingStylesheets(document->body()); |