Changeset 194155 in webkit
- Timestamp:
- Dec 16, 2015 10:08:57 AM (8 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r194143 r194155 1 2015-12-16 Beth Dakin <bdakin@apple.com> 2 3 Legacy style scrollbars do not change color when you mouse over them if you 4 are scrolled 5 https://bugs.webkit.org/show_bug.cgi?id=152319 6 -and corresponding- 7 rdar://problem/23317668 8 9 Reviewed by Darin Adler. 10 11 The scrollbar’s frameRect is in window coordinates, so we need to compare a 12 point in window coordinates when we test this. 13 14 The call to convertFromContainingWindow does not return a point in view 15 coordinates, so we should not call the variable viewPoint. We do still need 16 to call it for subframes. convertFromContainingWindow doesn’t do anything for 17 the root ScrollView (for Mac WK2 at least). 18 * platform/ScrollView.cpp: 19 (WebCore::ScrollView::scrollbarAtPoint): 20 21 HitTestLocation is in contents coordinates. It needs to be converted to 22 window coordinates 23 * rendering/RenderView.cpp: 24 (WebCore::RenderView::hitTest): 25 1 26 2015-12-08 Sergio Villar Senin <svillar@igalia.com> 2 27 -
trunk/Source/WebCore/platform/ScrollView.cpp
r192140 r194155 997 997 return 0; 998 998 999 IntPoint viewPoint = convertFromContainingWindow(windowPoint); 1000 if (m_horizontalScrollbar && m_horizontalScrollbar->shouldParticipateInHitTesting() && m_horizontalScrollbar->frameRect().contains(viewPoint)) 999 // convertFromContainingWindow doesn't do what it sounds like it does. We need it here just to get this 1000 // point into the right coordinates if this is the ScrollView of a sub-frame. 1001 IntPoint convertedPoint = convertFromContainingWindow(windowPoint); 1002 if (m_horizontalScrollbar && m_horizontalScrollbar->shouldParticipateInHitTesting() && m_horizontalScrollbar->frameRect().contains(convertedPoint)) 1001 1003 return m_horizontalScrollbar.get(); 1002 if (m_verticalScrollbar && m_verticalScrollbar->shouldParticipateInHitTesting() && m_verticalScrollbar->frameRect().contains( viewPoint))1004 if (m_verticalScrollbar && m_verticalScrollbar->shouldParticipateInHitTesting() && m_verticalScrollbar->frameRect().contains(convertedPoint)) 1003 1005 return m_verticalScrollbar.get(); 1004 1006 return 0; -
trunk/Source/WebCore/rendering/RenderView.cpp
r192966 r194155 205 205 // ScrollView scrollbars are not the same as RenderLayer scrollbars tested by RenderLayer::hitTestOverflowControls, 206 206 // so we need to test ScrollView scrollbars separately here. 207 Scrollbar* frameScrollbar = frameView().scrollbarAtPoint(location.roundedPoint());208 if ( frameScrollbar) {207 IntPoint windowPoint = frameView().contentsToWindow(location.roundedPoint()); 208 if (Scrollbar* frameScrollbar = frameView().scrollbarAtPoint(windowPoint)) { 209 209 result.setScrollbar(frameScrollbar); 210 210 return true;
Note: See TracChangeset
for help on using the changeset viewer.