Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1819)

Unified Diff: Source/core/rendering/RenderView.cpp

Issue 527263002: Clean-up hit-testing of scrollbars (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix scrollbar-ticks-hittest test Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/rendering/RenderPart.cpp ('k') | Source/platform/scroll/ScrollView.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderView.cpp
diff --git a/Source/core/rendering/RenderView.cpp b/Source/core/rendering/RenderView.cpp
index 2beeea11ee7261838a72bb2cf995f77944d25141..85159d5e061fef2481fb31d3abcf4247863441ca 100644
--- a/Source/core/rendering/RenderView.cpp
+++ b/Source/core/rendering/RenderView.cpp
@@ -102,7 +102,15 @@ bool RenderView::hitTest(const HitTestRequest& request, const HitTestLocation& l
// Note that Document::updateLayout calls its parent's updateLayout.
// FIXME: It should be the caller's responsibility to ensure an up-to-date layout.
frameView()->updateLayoutAndStyleIfNeededRecursive();
- return layer()->hitTest(request, location, result);
+
+ bool hitLayer = layer()->hitTest(request, location, result);
+
+ // ScrollView scrollbars are not the same as RenderLayer scrollbars tested by RenderLayer::hitTestOverflowControls,
+ // so we need to test ScrollView scrollbars separately here.
+ if (Scrollbar* frameScrollbar = frameView()->scrollbarAtViewPoint(location.roundedPoint()))
+ result.setScrollbar(frameScrollbar);
+
+ return hitLayer;
}
void RenderView::computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit, LogicalExtentComputedValues& computedValues) const
« no previous file with comments | « Source/core/rendering/RenderPart.cpp ('k') | Source/platform/scroll/ScrollView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698