Title: [194155] trunk/Source/WebCore
- Revision
- 194155
- Author
- [email protected]
- Date
- 2015-12-16 10:08:57 -0800 (Wed, 16 Dec 2015)
Log Message
Legacy style scrollbars do not change color when you mouse over them if you
are scrolled
https://bugs.webkit.org/show_bug.cgi?id=152319
-and corresponding-
rdar://problem/23317668
Reviewed by Darin Adler.
The scrollbar’s frameRect is in window coordinates, so we need to compare a
point in window coordinates when we test this.
The call to convertFromContainingWindow does not return a point in view
coordinates, so we should not call the variable viewPoint. We do still need
to call it for subframes. convertFromContainingWindow doesn’t do anything for
the root ScrollView (for Mac WK2 at least).
* platform/ScrollView.cpp:
(WebCore::ScrollView::scrollbarAtPoint):
HitTestLocation is in contents coordinates. It needs to be converted to
window coordinates
* rendering/RenderView.cpp:
(WebCore::RenderView::hitTest):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (194154 => 194155)
--- trunk/Source/WebCore/ChangeLog 2015-12-16 18:04:37 UTC (rev 194154)
+++ trunk/Source/WebCore/ChangeLog 2015-12-16 18:08:57 UTC (rev 194155)
@@ -1,3 +1,28 @@
+2015-12-16 Beth Dakin <[email protected]>
+
+ Legacy style scrollbars do not change color when you mouse over them if you
+ are scrolled
+ https://bugs.webkit.org/show_bug.cgi?id=152319
+ -and corresponding-
+ rdar://problem/23317668
+
+ Reviewed by Darin Adler.
+
+ The scrollbar’s frameRect is in window coordinates, so we need to compare a
+ point in window coordinates when we test this.
+
+ The call to convertFromContainingWindow does not return a point in view
+ coordinates, so we should not call the variable viewPoint. We do still need
+ to call it for subframes. convertFromContainingWindow doesn’t do anything for
+ the root ScrollView (for Mac WK2 at least).
+ * platform/ScrollView.cpp:
+ (WebCore::ScrollView::scrollbarAtPoint):
+
+ HitTestLocation is in contents coordinates. It needs to be converted to
+ window coordinates
+ * rendering/RenderView.cpp:
+ (WebCore::RenderView::hitTest):
+
2015-12-08 Sergio Villar Senin <[email protected]>
Fix computation of min|max-content contribution of non-replaced blocks
Modified: trunk/Source/WebCore/platform/ScrollView.cpp (194154 => 194155)
--- trunk/Source/WebCore/platform/ScrollView.cpp 2015-12-16 18:04:37 UTC (rev 194154)
+++ trunk/Source/WebCore/platform/ScrollView.cpp 2015-12-16 18:08:57 UTC (rev 194155)
@@ -996,10 +996,12 @@
if (platformWidget())
return 0;
- IntPoint viewPoint = convertFromContainingWindow(windowPoint);
- if (m_horizontalScrollbar && m_horizontalScrollbar->shouldParticipateInHitTesting() && m_horizontalScrollbar->frameRect().contains(viewPoint))
+ // convertFromContainingWindow doesn't do what it sounds like it does. We need it here just to get this
+ // point into the right coordinates if this is the ScrollView of a sub-frame.
+ IntPoint convertedPoint = convertFromContainingWindow(windowPoint);
+ if (m_horizontalScrollbar && m_horizontalScrollbar->shouldParticipateInHitTesting() && m_horizontalScrollbar->frameRect().contains(convertedPoint))
return m_horizontalScrollbar.get();
- if (m_verticalScrollbar && m_verticalScrollbar->shouldParticipateInHitTesting() && m_verticalScrollbar->frameRect().contains(viewPoint))
+ if (m_verticalScrollbar && m_verticalScrollbar->shouldParticipateInHitTesting() && m_verticalScrollbar->frameRect().contains(convertedPoint))
return m_verticalScrollbar.get();
return 0;
}
Modified: trunk/Source/WebCore/rendering/RenderView.cpp (194154 => 194155)
--- trunk/Source/WebCore/rendering/RenderView.cpp 2015-12-16 18:04:37 UTC (rev 194154)
+++ trunk/Source/WebCore/rendering/RenderView.cpp 2015-12-16 18:08:57 UTC (rev 194155)
@@ -204,8 +204,8 @@
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.
- Scrollbar* frameScrollbar = frameView().scrollbarAtPoint(location.roundedPoint());
- if (frameScrollbar) {
+ IntPoint windowPoint = frameView().contentsToWindow(location.roundedPoint());
+ if (Scrollbar* frameScrollbar = frameView().scrollbarAtPoint(windowPoint)) {
result.setScrollbar(frameScrollbar);
return true;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes