diff options
author | Cary Clark <cary@android.com> | 2010-11-09 05:50:56 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-11-09 05:50:56 -0800 |
commit | f671316a27d2de1c701427993a6acb56349ac96b (patch) | |
tree | a47c27d8367d4ef49c1bef5103bbc7667c10e2b4 /WebKit | |
parent | 31ee2547d67e901b5e9af790f1f4903ecf0faffa (diff) | |
parent | f1610d01f92cb77827d2de13c0ed38554e4f0790 (diff) | |
download | external_webkit-f671316a27d2de1c701427993a6acb56349ac96b.zip external_webkit-f671316a27d2de1c701427993a6acb56349ac96b.tar.gz external_webkit-f671316a27d2de1c701427993a6acb56349ac96b.tar.bz2 |
Merge "update dom version on style change"
Diffstat (limited to 'WebKit')
-rw-r--r-- | WebKit/android/jni/WebViewCore.cpp | 3 | ||||
-rw-r--r-- | WebKit/android/nav/CachedFrame.cpp | 25 | ||||
-rw-r--r-- | WebKit/android/nav/WebView.cpp | 2 |
3 files changed, 18 insertions, 12 deletions
diff --git a/WebKit/android/jni/WebViewCore.cpp b/WebKit/android/jni/WebViewCore.cpp index deae37f..64b53c4 100644 --- a/WebKit/android/jni/WebViewCore.cpp +++ b/WebKit/android/jni/WebViewCore.cpp @@ -675,7 +675,8 @@ void WebViewCore::recordPictureSet(PictureSet* content) // as domTreeVersion only increment, we can just check the sum to see // whether we need to update the frame cache for (Frame* frame = m_mainFrame; frame; frame = frame->tree()->traverseNext()) { - latestVersion += frame->document()->domTreeVersion(); + const Document* doc = frame->document(); + latestVersion += doc->domTreeVersion() + doc->styleVersion(); } } DBG_NAV_LOGD("m_lastFocused=%p oldFocusNode=%p" diff --git a/WebKit/android/nav/CachedFrame.cpp b/WebKit/android/nav/CachedFrame.cpp index e331464..8f0df7a 100644 --- a/WebKit/android/nav/CachedFrame.cpp +++ b/WebKit/android/nav/CachedFrame.cpp @@ -52,13 +52,15 @@ WebCore::IntRect CachedFrame::adjustBounds(const CachedNode* node, #if USE(ACCELERATED_COMPOSITING) const CachedLayer* cachedLayer = layer(node); const WebCore::LayerAndroid* rootLayer = mRoot->rootLayer(); - IntRect rrect = cachedLayer->adjustBounds(rootLayer, rect); - if (!cachedLayer->layer(rootLayer)->contentIsScrollable()) - rrect.move(-mViewBounds.x(), -mViewBounds.y()); - return rrect; -#else - return rect; + const LayerAndroid* aLayer = cachedLayer->layer(rootLayer); + if (aLayer) { + IntRect rrect = cachedLayer->adjustBounds(rootLayer, rect); + if (!aLayer->contentIsScrollable()) + rrect.move(-mViewBounds.x(), -mViewBounds.y()); + return rrect; + } #endif + return rect; } // This is for nodes inside a layer. It takes an IntRect that has been @@ -71,10 +73,13 @@ WebCore::IntRect CachedFrame::unadjustBounds(const CachedNode* node, if (node->isInLayer()) { const CachedLayer* cachedLayer = layer(node); const WebCore::LayerAndroid* rootLayer = mRoot->rootLayer(); - IntRect rrect = cachedLayer->unadjustBounds(rootLayer, rect); - if (!cachedLayer->layer(rootLayer)->contentIsScrollable()) - rrect.move(mViewBounds.x(), mViewBounds.y()); - return rrect; + const LayerAndroid* aLayer = cachedLayer->layer(rootLayer); + if (aLayer) { + IntRect rrect = cachedLayer->unadjustBounds(rootLayer, rect); + if (!aLayer->contentIsScrollable()) + rrect.move(mViewBounds.x(), mViewBounds.y()); + return rrect; + } } #endif return rect; diff --git a/WebKit/android/nav/WebView.cpp b/WebKit/android/nav/WebView.cpp index d754af5..9579509 100644 --- a/WebKit/android/nav/WebView.cpp +++ b/WebKit/android/nav/WebView.cpp @@ -885,7 +885,7 @@ void selectBestAt(const WebCore::IntRect& rect) { const CachedFrame* frame; int rx, ry; - CachedRoot* root = getFrameCache(DontAllowNewer); + CachedRoot* root = getFrameCache(AllowNewer); const CachedNode* node = findAt(root, rect, &frame, &rx, &ry); if (!node) { |