summaryrefslogtreecommitdiffstats
path: root/WebKit/android/nav
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/android/nav')
-rw-r--r--WebKit/android/nav/CachedFrame.cpp25
-rw-r--r--WebKit/android/nav/WebView.cpp2
2 files changed, 16 insertions, 11 deletions
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) {