From ad3386af2204fbbc9033a6dcced2f9b0adcd6f10 Mon Sep 17 00:00:00 2001 From: Steve Block Date: Thu, 5 Aug 2010 11:07:27 +0100 Subject: Merge WebKit at r64523 : Fix conflicts due to ANDROID_HITTEST_WITHSIZE A modified version of this Android-specific code was upstreamed in http://trac.webkit.org/changeset/64272 For the most part, the differences between the Android and upstreamed versions are syntactic only. In these cases, we take the upstream version. In a small number of cases, logical changes exist. In these cases, the Android logic has been retained, guarded with ANDROID_HITTEST_WITHSIZE, but using the new syntax. In particular ... - Android's HitTestResult::intersects(x, y, rect) is logically equivalent to the uspstream IntRect::intersects(HitTestPoint::rectFromPoint(x, y))). - Android's HitTestResult::addRawNode() is logically equivalent to the upstream HitTestResult::m_rectBasedTestResult.add(). - Android's HitTestResult::isRegionTest() is slightly different from the upstream HitTestResult::isRectBasedTest(). The latter is modified with a new ANDROID_HITTEST_WITHSIZE guard in HitTestResult::HitTestResult() to maintain the same behaviour. - The upstreamed code uses HitTestResult::addNodeToRectBasedTestResult() as a helper method in place of inline logic in the Android version. The slight difference in behaviour between this helper and the Android logic is reflected in the new ANDROID_HITTEST_WITHSIZE guard in the helper. This change should introduce no change in behaviour. Change-Id: I974d68e3ac963f18334418e32b08c3fd9ab1182e --- WebCore/page/EventHandler.cpp | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'WebCore/page/EventHandler.cpp') diff --git a/WebCore/page/EventHandler.cpp b/WebCore/page/EventHandler.cpp index 8f213c6..20ceed9 100644 --- a/WebCore/page/EventHandler.cpp +++ b/WebCore/page/EventHandler.cpp @@ -870,23 +870,9 @@ void EventHandler::allowDHTMLDrag(bool& flagDHTML, bool& flagUA) const } #endif // ENABLE(DRAG_SUPPORT) -<<<<<<< HEAD -#ifdef ANDROID_HITTEST_WITHSIZE -HitTestResult EventHandler::hitTestResultAtPoint(const IntPoint& point, bool allowShadowContent, bool ignoreClipping, HitTestScrollbars testScrollbars, HitTestRequest::HitTestRequestType hitType, const IntSize& pointPadding) -#else -HitTestResult EventHandler::hitTestResultAtPoint(const IntPoint& point, bool allowShadowContent, bool ignoreClipping, HitTestScrollbars testScrollbars, HitTestRequest::HitTestRequestType hitType) -#endif -{ -#ifdef ANDROID_HITTEST_WITHSIZE - HitTestResult result(point, pointPadding); -#else - HitTestResult result(point); -#endif -======= HitTestResult EventHandler::hitTestResultAtPoint(const IntPoint& point, bool allowShadowContent, bool ignoreClipping, HitTestScrollbars testScrollbars, HitTestRequest::HitTestRequestType hitType, const IntSize& padding) { HitTestResult result(point, padding); ->>>>>>> webkit.org at r64523 if (!m_frame->contentRenderer()) return result; if (ignoreClipping) @@ -907,15 +893,7 @@ HitTestResult EventHandler::hitTestResultAtPoint(const IntPoint& point, bool all FrameView* view = static_cast(widget); IntPoint widgetPoint(result.localPoint().x() + view->scrollX() - renderWidget->borderLeft() - renderWidget->paddingLeft(), result.localPoint().y() + view->scrollY() - renderWidget->borderTop() - renderWidget->paddingTop()); -<<<<<<< HEAD -#ifdef ANDROID_HITTEST_WITHSIZE - HitTestResult widgetHitTestResult(widgetPoint, pointPadding); -#else - HitTestResult widgetHitTestResult(widgetPoint); -#endif -======= HitTestResult widgetHitTestResult(widgetPoint, padding); ->>>>>>> webkit.org at r64523 frame->contentRenderer()->layer()->hitTest(HitTestRequest(hitType), widgetHitTestResult); result = widgetHitTestResult; -- cgit v1.1