summaryrefslogtreecommitdiffstats
path: root/WebCore/page
diff options
context:
space:
mode:
authorGrace Kloba <klobag@google.com>2010-05-24 21:45:32 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-05-24 21:45:32 -0700
commita149172322a9067c14e8b474a53e63649aa17cad (patch)
tree19e2be990222e93b9fc75553b57e5abd9708f0b9 /WebCore/page
parent8b2ec69eaf97dd8a817342ca54044d74da6b4b19 (diff)
parent17dcead8ee9edfa8f75e7e2d2284ed3c6f4bd403 (diff)
downloadexternal_webkit-a149172322a9067c14e8b474a53e63649aa17cad.zip
external_webkit-a149172322a9067c14e8b474a53e63649aa17cad.tar.gz
external_webkit-a149172322a9067c14e8b474a53e63649aa17cad.tar.bz2
Merge "First draft to add a fat point to WebKit hit test."
Diffstat (limited to 'WebCore/page')
-rw-r--r--WebCore/page/EventHandler.cpp12
-rw-r--r--WebCore/page/EventHandler.h4
2 files changed, 16 insertions, 0 deletions
diff --git a/WebCore/page/EventHandler.cpp b/WebCore/page/EventHandler.cpp
index 8f63144..042f3d4 100644
--- a/WebCore/page/EventHandler.cpp
+++ b/WebCore/page/EventHandler.cpp
@@ -865,9 +865,17 @@ void EventHandler::allowDHTMLDrag(bool& flagDHTML, bool& flagUA) const
}
#endif // ENABLE(DRAG_SUPPORT)
+#ifdef ANDROID_HITTEST_WITHSIZE
+HitTestResult EventHandler::hitTestResultAtPoint(const IntPoint& point, bool allowShadowContent, bool ignoreClipping, HitTestScrollbars testScrollbars, const IntSize& pointPadding)
+#else
HitTestResult EventHandler::hitTestResultAtPoint(const IntPoint& point, bool allowShadowContent, bool ignoreClipping, HitTestScrollbars testScrollbars)
+#endif
{
+#ifdef ANDROID_HITTEST_WITHSIZE
+ HitTestResult result(point, pointPadding);
+#else
HitTestResult result(point);
+#endif
if (!m_frame->contentRenderer())
return result;
int hitType = HitTestRequest::ReadOnly | HitTestRequest::Active;
@@ -889,7 +897,11 @@ HitTestResult EventHandler::hitTestResultAtPoint(const IntPoint& point, bool all
FrameView* view = static_cast<FrameView*>(widget);
IntPoint widgetPoint(result.localPoint().x() + view->scrollX() - renderWidget->borderLeft() - renderWidget->paddingLeft(),
result.localPoint().y() + view->scrollY() - renderWidget->borderTop() - renderWidget->paddingTop());
+#ifdef ANDROID_HITTEST_WITHSIZE
+ HitTestResult widgetHitTestResult(widgetPoint, pointPadding);
+#else
HitTestResult widgetHitTestResult(widgetPoint);
+#endif
frame->contentRenderer()->layer()->hitTest(HitTestRequest(hitType), widgetHitTestResult);
result = widgetHitTestResult;
diff --git a/WebCore/page/EventHandler.h b/WebCore/page/EventHandler.h
index c83925c..39b165d 100644
--- a/WebCore/page/EventHandler.h
+++ b/WebCore/page/EventHandler.h
@@ -105,7 +105,11 @@ public:
void dispatchFakeMouseMoveEventSoonInQuad(const FloatQuad&);
+#ifdef ANDROID_HITTEST_WITHSIZE
+ HitTestResult hitTestResultAtPoint(const IntPoint&, bool allowShadowContent, bool ignoreClipping = false, HitTestScrollbars scrollbars = DontHitTestScrollbars, const IntSize& pointPadding = IntSize());
+#else
HitTestResult hitTestResultAtPoint(const IntPoint&, bool allowShadowContent, bool ignoreClipping = false, HitTestScrollbars scrollbars = DontHitTestScrollbars);
+#endif
bool mousePressed() const { return m_mousePressed; }
void setMousePressed(bool pressed) { m_mousePressed = pressed; }