Title: [148188] trunk/Source/WebCore
- Revision
- 148188
- Author
- [email protected]
- Date
- 2013-04-11 02:17:33 -0700 (Thu, 11 Apr 2013)
Log Message
HitTestRequest::AllowFrameScrollbars does not test main frame scrollbar
https://bugs.webkit.org/show_bug.cgi?id=112563
Reviewed by Antonio Gomes.
Move the frame scrollbar testing from RenderPart to RenderView, so that it is
tested by all frame and not just child frames. At the same time remove the
main frame test from the one current callsite using the option.
Tested by fast/events/touch/gesture/gesture-scrollbar.html.
* page/EventHandler.cpp:
(WebCore::EventHandler::handleGestureEvent):
* rendering/RenderPart.cpp:
(WebCore::RenderPart::nodeAtPoint):
* rendering/RenderView.cpp:
(WebCore::RenderView::hitTest):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (148187 => 148188)
--- trunk/Source/WebCore/ChangeLog 2013-04-11 09:09:07 UTC (rev 148187)
+++ trunk/Source/WebCore/ChangeLog 2013-04-11 09:17:33 UTC (rev 148188)
@@ -1,3 +1,23 @@
+2013-04-11 Allan Sandfeld Jensen <[email protected]>
+
+ HitTestRequest::AllowFrameScrollbars does not test main frame scrollbar
+ https://bugs.webkit.org/show_bug.cgi?id=112563
+
+ Reviewed by Antonio Gomes.
+
+ Move the frame scrollbar testing from RenderPart to RenderView, so that it is
+ tested by all frame and not just child frames. At the same time remove the
+ main frame test from the one current callsite using the option.
+
+ Tested by fast/events/touch/gesture/gesture-scrollbar.html.
+
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::handleGestureEvent):
+ * rendering/RenderPart.cpp:
+ (WebCore::RenderPart::nodeAtPoint):
+ * rendering/RenderView.cpp:
+ (WebCore::RenderView::hitTest):
+
2013-04-11 Rune Lillesveen <[email protected]>
Incorrect evaluation of resolution media queries
Modified: trunk/Source/WebCore/page/EventHandler.cpp (148187 => 148188)
--- trunk/Source/WebCore/page/EventHandler.cpp 2013-04-11 09:09:07 UTC (rev 148187)
+++ trunk/Source/WebCore/page/EventHandler.cpp 2013-04-11 09:17:33 UTC (rev 148188)
@@ -2548,10 +2548,6 @@
IntPoint hitTestPoint = m_frame->view()->windowToContents(adjustedPoint);
HitTestResult result = hitTestResultAtPoint(hitTestPoint, hitType | HitTestRequest::AllowFrameScrollbars);
eventTarget = result.targetNode();
- if (!scrollbar) {
- FrameView* view = m_frame->view();
- scrollbar = view ? view->scrollbarAtPoint(gestureEvent.position()) : 0;
- }
if (!scrollbar)
scrollbar = result.scrollbar();
}
Modified: trunk/Source/WebCore/rendering/RenderPart.cpp (148187 => 148188)
--- trunk/Source/WebCore/rendering/RenderPart.cpp 2013-04-11 09:09:07 UTC (rev 148187)
+++ trunk/Source/WebCore/rendering/RenderPart.cpp 2013-04-11 09:17:33 UTC (rev 148188)
@@ -134,15 +134,6 @@
if (isInsideChildFrame)
return true;
-
- if (request.allowsFrameScrollbars()) {
- // ScrollView scrollbars are not the same as RenderLayer scrollbars tested by RenderLayer::hitTestOverflowControls,
- // so we need to test ScrollView scrollbars separately here.
- // FIXME: Consider if this test could be done unconditionally.
- Scrollbar* frameScrollbar = childFrameView->scrollbarAtPoint(newHitTestLocation.roundedPoint());
- if (frameScrollbar)
- result.setScrollbar(frameScrollbar);
- }
}
return RenderWidget::nodeAtPoint(request, result, locationInContainer, accumulatedOffset, action);
Modified: trunk/Source/WebCore/rendering/RenderView.cpp (148187 => 148188)
--- trunk/Source/WebCore/rendering/RenderView.cpp 2013-04-11 09:09:07 UTC (rev 148187)
+++ trunk/Source/WebCore/rendering/RenderView.cpp 2013-04-11 09:17:33 UTC (rev 148188)
@@ -91,7 +91,21 @@
bool RenderView::hitTest(const HitTestRequest& request, const HitTestLocation& location, HitTestResult& result)
{
- return layer()->hitTest(request, location, result);
+ if (layer()->hitTest(request, location, result))
+ return true;
+
+ // FIXME: Consider if this test should be done unconditionally.
+ if (request.allowsFrameScrollbars() && m_frameView) {
+ // ScrollView scrollbars are not the same as RenderLayer scrollbars tested by RenderLayer::hitTestOverflowControls,
+ // so we need to test ScrollView scrollbars separately here.
+ Scrollbar* frameScrollbar = m_frameView->scrollbarAtPoint(location.roundedPoint());
+ if (frameScrollbar) {
+ result.setScrollbar(frameScrollbar);
+ return true;
+ }
+ }
+
+ return false;
}
void RenderView::computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit, LogicalExtentComputedValues& computedValues) const
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes