diff options
author | John Reck <jreck@google.com> | 2012-06-06 17:31:32 -0700 |
---|---|---|
committer | John Reck <jreck@google.com> | 2012-06-06 17:33:37 -0700 |
commit | 0d4f6046828b8680b32eb3f0289323c06d2b13e2 (patch) | |
tree | f35518328b58ccc5a0e04f938e7fda6987ae0e5d /Source | |
parent | 7da43ef8daf722f6d10dc4c452e1dc7be11b4a9f (diff) | |
download | external_webkit-0d4f6046828b8680b32eb3f0289323c06d2b13e2.zip external_webkit-0d4f6046828b8680b32eb3f0289323c06d2b13e2.tar.gz external_webkit-0d4f6046828b8680b32eb3f0289323c06d2b13e2.tar.bz2 |
Remove unnecessary Android code from hitTestForLayer
Bug: 6613097
The bug here is that the clipping rects it is calculating are
wrong, which results in the hit test failing. However, as we
now actually scroll our overflow layers (which we didn't at the
time this was added), this code is no longer necessary anyway.
WebKit knows how to do hit tests correctly, just let it.
This is a partial revert of I0da2d8db
Change-Id: I7b42f36dd199d431508da934878fc0f56e76559c
Diffstat (limited to 'Source')
-rw-r--r-- | Source/WebCore/rendering/RenderLayer.cpp | 10 | ||||
-rw-r--r-- | Source/WebCore/rendering/RenderLayer.h | 22 |
2 files changed, 0 insertions, 32 deletions
diff --git a/Source/WebCore/rendering/RenderLayer.cpp b/Source/WebCore/rendering/RenderLayer.cpp index 1ffa0de..bad0668 100644 --- a/Source/WebCore/rendering/RenderLayer.cpp +++ b/Source/WebCore/rendering/RenderLayer.cpp @@ -3152,14 +3152,6 @@ RenderLayer* RenderLayer::hitTestLayer(RenderLayer* rootLayer, RenderLayer* cont candidateLayer = hitLayer; } -#if ENABLE(ANDROID_OVERFLOW_SCROLL) - if (hasOverflowParent()) { - ClipRects clipRects; - calculateClipRects(rootLayer, clipRects, useTemporaryClipRects); - fgRect.intersect(clipRects.hitTestClip()); - bgRect.intersect(clipRects.hitTestClip()); - } -#endif // Next we want to see if the mouse pos is inside the child RenderObjects of the layer. if (fgRect.intersects(hitTestArea) && isSelfPaintingLayer()) { // Hit test with a temporary HitTestResult, because we only want to commit to 'result' if we know we're frontmost. @@ -3451,8 +3443,6 @@ void RenderLayer::calculateClipRects(const RenderLayer* rootLayer, ClipRects& cl if (renderer()->hasOverflowClip()) { IntRect newOverflowClip = toRenderBox(renderer())->overflowClipRect(x, y, relevancy); #if ENABLE(ANDROID_OVERFLOW_SCROLL) - clipRects.setHitTestClip(intersection(clipRects.fixed() ? clipRects.fixedClipRect() - : newOverflowClip, clipRects.hitTestClip())); if (hasOverflowScroll()) { RenderBox* box = toRenderBox(renderer()); newOverflowClip = diff --git a/Source/WebCore/rendering/RenderLayer.h b/Source/WebCore/rendering/RenderLayer.h index 5e421f0..ceb9026 100644 --- a/Source/WebCore/rendering/RenderLayer.h +++ b/Source/WebCore/rendering/RenderLayer.h @@ -80,9 +80,6 @@ public: : m_overflowClipRect(r) , m_fixedClipRect(r) , m_posClipRect(r) -#if ENABLE(ANDROID_OVERFLOW_SCROLL) - , m_hitTestClip(r) -#endif , m_refCnt(0) , m_fixed(false) { @@ -92,9 +89,6 @@ public: : m_overflowClipRect(other.overflowClipRect()) , m_fixedClipRect(other.fixedClipRect()) , m_posClipRect(other.posClipRect()) -#if ENABLE(ANDROID_OVERFLOW_SCROLL) - , m_hitTestClip(other.hitTestClip()) -#endif , m_refCnt(0) , m_fixed(other.fixed()) { @@ -105,9 +99,6 @@ public: m_overflowClipRect = r; m_fixedClipRect = r; m_posClipRect = r; -#if ENABLE(ANDROID_OVERFLOW_SCROLL) - m_hitTestClip = r; -#endif m_fixed = false; } @@ -119,10 +110,6 @@ public: const IntRect& posClipRect() const { return m_posClipRect; } void setPosClipRect(const IntRect& r) { m_posClipRect = r; } -#if ENABLE(ANDROID_OVERFLOW_SCROLL) - const IntRect& hitTestClip() const { return m_hitTestClip; } - void setHitTestClip(const IntRect& r) { m_hitTestClip = r; } -#endif bool fixed() const { return m_fixed; } void setFixed(bool fixed) { m_fixed = fixed; } @@ -143,9 +130,6 @@ public: return m_overflowClipRect == other.overflowClipRect() && m_fixedClipRect == other.fixedClipRect() && m_posClipRect == other.posClipRect() && -#if ENABLE(ANDROID_OVERFLOW_SCROLL) - m_hitTestClip == other.hitTestClip() && -#endif m_fixed == other.fixed(); } @@ -154,9 +138,6 @@ public: m_overflowClipRect = other.overflowClipRect(); m_fixedClipRect = other.fixedClipRect(); m_posClipRect = other.posClipRect(); -#if ENABLE(ANDROID_OVERFLOW_SCROLL) - m_hitTestClip = other.hitTestClip(); -#endif m_fixed = other.fixed(); return *this; } @@ -169,9 +150,6 @@ private: IntRect m_overflowClipRect; IntRect m_fixedClipRect; IntRect m_posClipRect; -#if ENABLE(ANDROID_OVERFLOW_SCROLL) - IntRect m_hitTestClip; -#endif unsigned m_refCnt : 31; bool m_fixed : 1; }; |