diff options
| author | The Android Automerger <android-build@android.com> | 2011-05-08 22:37:22 -0700 |
|---|---|---|
| committer | The Android Automerger <android-build@android.com> | 2011-05-08 22:37:22 -0700 |
| commit | 1d62edecbc901d7d88ac6729e25aa0ad44b3aa04 (patch) | |
| tree | d7baeb49c8279b5c09ac94676e75fff284c104e1 /WebKit | |
| parent | 0702955df30f6610313bdf9363bc22a7fd6d640a (diff) | |
| parent | bf890dcc88ecd74d627a5ae8033ac16743bc7c01 (diff) | |
| download | external_webkit-1d62edecbc901d7d88ac6729e25aa0ad44b3aa04.zip external_webkit-1d62edecbc901d7d88ac6729e25aa0ad44b3aa04.tar.gz external_webkit-1d62edecbc901d7d88ac6729e25aa0ad44b3aa04.tar.bz2 | |
Merge remote branch 'goog/honeycomb-mr2' into honeycomb-LTE
Diffstat (limited to 'WebKit')
| -rw-r--r-- | WebKit/android/jni/WebViewCore.cpp | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/WebKit/android/jni/WebViewCore.cpp b/WebKit/android/jni/WebViewCore.cpp index c038ccd..1d9c26b 100644 --- a/WebKit/android/jni/WebViewCore.cpp +++ b/WebKit/android/jni/WebViewCore.cpp @@ -569,6 +569,11 @@ void WebViewCore::recordPictureSet(PictureSet* content) DBG_SET_LOG("!m_mainFrame->document()"); return; } + // If there is a pending style recalculation, just return. + if (m_mainFrame->document()->isPendingStyleRecalc()) { + LOGW("recordPictureSet: pending style recalc, ignoring."); + return; + } if (m_addInval.isEmpty()) { DBG_SET_LOG("m_addInval.isEmpty()"); return; @@ -1116,9 +1121,7 @@ void WebViewCore::requestKeyboard(bool showKeyboard) void WebViewCore::notifyProgressFinished() { - DBG_NAV_LOG("call updateFrameCache"); m_check_domtree_version = true; - updateFrameCache(); sendNotifyProgressFinished(); } @@ -1515,6 +1518,18 @@ void WebViewCore::updateFrameCache() DBG_NAV_LOG("!m_frameCacheOutOfDate"); return; } + + // If there is a pending style recalculation, do not update the frame cache. + // Until the recalculation is complete, there may be internal objects that + // are in an inconsistent state (such as font pointers). + // In any event, there's not much point to updating the cache while a style + // recalculation is pending, since it will simply have to be updated again + // once the recalculation is complete. + // TODO: Do we need to reschedule an update for after the style is recalculated? + if (m_mainFrame && m_mainFrame->document() && m_mainFrame->document()->isPendingStyleRecalc()) { + LOGW("updateFrameCache: pending style recalc, ignoring."); + return; + } #ifdef ANDROID_INSTRUMENT TimeCounterAuto counter(TimeCounter::WebViewCoreBuildNavTimeCounter); #endif |
