summaryrefslogtreecommitdiffstats
path: root/WebKit
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit')
-rw-r--r--WebKit/android/nav/CacheBuilder.cpp6
-rw-r--r--WebKit/android/nav/SelectText.cpp3
2 files changed, 6 insertions, 3 deletions
diff --git a/WebKit/android/nav/CacheBuilder.cpp b/WebKit/android/nav/CacheBuilder.cpp
index 48583be..4cb9695 100644
--- a/WebKit/android/nav/CacheBuilder.cpp
+++ b/WebKit/android/nav/CacheBuilder.cpp
@@ -1030,8 +1030,10 @@ void CacheBuilder::BuildFrame(Frame* root, Frame* frame,
// The frame itself might be composited so we need to track the layer. Do
// not track the base frame's layer as the main content is draw as part of
// BaseLayerAndroid's picture.
- if (frame != root && frame->contentRenderer()->usesCompositing() && node->lastChild())
- TrackLayer(layerTracker, frame->contentRenderer(), node->lastChild(), globalOffsetX, globalOffsetY);
+ if (frame != root && frame->contentRenderer()
+ && frame->contentRenderer()->usesCompositing() && node->lastChild())
+ TrackLayer(layerTracker, frame->contentRenderer(), node->lastChild(),
+ globalOffsetX, globalOffsetY);
#endif
while (walk.mMore || (node = node->traverseNextNode()) != NULL) {
#if DUMP_NAV_CACHE
diff --git a/WebKit/android/nav/SelectText.cpp b/WebKit/android/nav/SelectText.cpp
index 7597450..f2d7521 100644
--- a/WebKit/android/nav/SelectText.cpp
+++ b/WebKit/android/nav/SelectText.cpp
@@ -486,7 +486,7 @@ public:
return false;
}
- virtual bool onIRectGlyph(const SkIRect& rect, const SkBounder::GlyphRec& )
+ virtual bool onIRect(const SkIRect& rect)
{
SkIRect bounds;
bounds.set(rect.fLeft, top(), rect.fRight, bottom());
@@ -1980,6 +1980,7 @@ bool SelectText::wordSelection(const CachedRoot* root, const IntRect& vis,
y = (m_selStart.fTop + m_selStart.fBottom) >> 1;
SkIRect clipRect = m_visibleRect;
clipRect.fLeft -= m_visibleRect.width() >> 1;
+ clipRect.fLeft = std::max(clipRect.fLeft, 0);
int base;
SkIRect left = findLeft(*m_picture, clipRect, x, y, &base);
if (!left.isEmpty()) {