summaryrefslogtreecommitdiffstats
path: root/WebCore/page
diff options
context:
space:
mode:
authorPatrick Scott <phanna@android.com>2010-08-02 08:09:31 -0400
committerPatrick Scott <phanna@android.com>2010-08-02 15:28:47 -0400
commitef1adcdfc805d4d13103f6f15cc5b4d96828a60f (patch)
treecf24fb4142aa8bd487b7f751c74aa4225967fa47 /WebCore/page
parent2e79b71868fcdcd0de7c6070e50662d8fa01e4ab (diff)
downloadexternal_webkit-ef1adcdfc805d4d13103f6f15cc5b4d96828a60f.zip
external_webkit-ef1adcdfc805d4d13103f6f15cc5b4d96828a60f.tar.gz
external_webkit-ef1adcdfc805d4d13103f6f15cc5b4d96828a60f.tar.bz2
Enable navigation in scrollable layers.
EventHandler: * Added IgnoreClipping in order to touch nodes that are clipped out. android_graphics: * Remember the absolute bounds of the node for invals. RenderBox: * Fix a compiler warning. RenderLayer: * Do not record the entire layer contents unless the scroll dimensions are larger than the client dimensions. * Change isSelfPaintingLayer to check for an overflow clip instead of the scrollable dimensions since it can be too early to check at this point. RenderLayerCompositor: * Same as RenderLayer for checking the overflow clip. WebViewCore: * Scroll the containing layer to the node bounds and offset the mouse position if scrolled. Once the mouse event is processed, restore the layer to 0,0. CacheBuilder: * The body position is no longer used. * Do not clip out nodes if the layer is scrollable. CachedFrame: * Add unadjustBounds to restore adjusted bounds to their original position (fixed position elements). * Call unadjustBounds when a node has been found. This new set of bounds is passed over to WebViewCore to handle clicks. * Reject empty node bounds. CachedLayer: * Document adjustBounds and add unadjustBounds. Add in the scroll position to the node bounds. CachedRoot: * Unadjust the mouse bounds. WebView: * Unadjust the mouse bounds and use the absolute bounds of the ring during inval. Bug: 1566791 Change-Id: Ia55f2cbb61869087176d3ff61882e40324614c6a
Diffstat (limited to 'WebCore/page')
-rw-r--r--WebCore/page/EventHandler.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/WebCore/page/EventHandler.cpp b/WebCore/page/EventHandler.cpp
index 89e9424..e2fab6e 100644
--- a/WebCore/page/EventHandler.cpp
+++ b/WebCore/page/EventHandler.cpp
@@ -1257,7 +1257,14 @@ bool EventHandler::handleMousePressEvent(const PlatformMouseEvent& mouseEvent)
}
m_mouseDownWasInSubframe = false;
+#if ENABLE(COMPOSITED_FIXED_ELEMENTS)
+ // Add IgnoreClipping because fixed position elements are moved only on the
+ // UI thread. Nodes in fixed position elements are clipped out by the view
+ // without IgnoreClipping.
+ HitTestRequest request(HitTestRequest::Active | HitTestRequest::IgnoreClipping);
+#else
HitTestRequest request(HitTestRequest::Active);
+#endif
// Save the document point we generate in case the window coordinate is invalidated by what happens
// when we dispatch the event.
IntPoint documentPoint = documentPointForWindowPoint(m_frame, mouseEvent.pos());
@@ -1575,7 +1582,14 @@ bool EventHandler::handleMouseReleaseEvent(const PlatformMouseEvent& mouseEvent)
return m_lastScrollbarUnderMouse->mouseUp();
}
+#if ENABLE(COMPOSITED_FIXED_ELEMENTS)
+ // Add IgnoreClipping because fixed position elements are moved only on the
+ // UI thread. Nodes in fixed position elements are clipped out by the view
+ // without IgnoreClipping.
+ HitTestRequest request(HitTestRequest::MouseUp | HitTestRequest::IgnoreClipping);
+#else
HitTestRequest request(HitTestRequest::MouseUp);
+#endif
MouseEventWithHitTestResults mev = prepareMouseEvent(request, mouseEvent);
Frame* subframe = m_capturingMouseEventsNode.get() ? subframeForTargetNode(m_capturingMouseEventsNode.get()) : subframeForHitTestResult(mev);
if (m_eventHandlerWillResetCapturingMouseEventsNode)