From be312690095b3ccc1f52336b69c11bf42d4eb9e5 Mon Sep 17 00:00:00 2001 From: Cary Clark Date: Tue, 6 Apr 2010 16:07:01 -0400 Subject: keep frames associated with regular hits and direct hits The hit test on the nav cache returns a node/frame pair. It looks for the closest hit, but gives priority to a direct hit. Track the frame associated with the direct hit separately, so that the correct node/frame pair is returned. Change-Id: Icb1e3de4a0aad3c6dd9b2b81669f9c7bbb260282 http://b/2316138 --- WebKit/android/nav/CachedFrame.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'WebKit/android/nav/CachedFrame.h') diff --git a/WebKit/android/nav/CachedFrame.h b/WebKit/android/nav/CachedFrame.h index f7276c1..ed76583 100644 --- a/WebKit/android/nav/CachedFrame.h +++ b/WebKit/android/nav/CachedFrame.h @@ -92,7 +92,8 @@ public: const CachedNode* document() const { return mCachedNodes.begin(); } bool empty() const { return mCachedNodes.size() < 2; } // must have 1 past doc const CachedNode* findBestAt(const WebCore::IntRect& , int* best, - bool* inside, const CachedNode** , const CachedFrame** , int* x, + bool* inside, const CachedNode** , const CachedFrame** directFrame, + const CachedFrame** resultFrame, int* x, int* y, bool checkForHidden) const; const CachedFrame* findBestFrameAt(int x, int y) const; const CachedNode* findBestHitAt(const WebCore::IntRect& , -- cgit v1.1