Changeset 171891 in webkit
- Timestamp:
- Jul 31, 2014 3:32:40 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 15 edited
- 5 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r171886 r171891 1 2014-07-31 Beth Dakin <bdakin@apple.com> 2 3 Hit-testing broken in WebKit 1 views with AppKit's contentInsets 4 https://bugs.webkit.org/show_bug.cgi?id=135434 5 -and corresponding- 6 <rdar://problem/17850323> 7 8 Reviewed by Benjamin Poulain. 9 10 These hit-testing related contentInset tests will now work for mac on wk1 on 11 Yosemite and wk2. 12 13 * platform/mac-wk1/TestExpectations: 14 * platform/mac-wk2/tiled-drawing/content-inset-hit-testing-expected.txt: Removed. 15 * platform/mac-wk2/tiled-drawing/content-inset-hit-testing-in-frame-expected.txt: Removed. 16 * platform/mac-wk2/tiled-drawing/content-inset-hit-testing-in-frame.html: Removed. 17 * platform/mac-wk2/tiled-drawing/content-inset-hit-testing.html: Removed. 18 * platform/mac-wk2/tiled-drawing/resources/iframe-to-hit-test.html: Removed. 19 * platform/mac/fast/events/content-inset-hit-testing-expected.txt: Copied from platform/mac-wk2/tiled-drawing/content-inset-hit-testing-expected.txt. 20 * platform/mac/fast/events/content-inset-hit-testing-in-frame-expected.txt: Copied from platform/mac-wk2/tiled-drawing/content-inset-hit-testing-in-frame-expected.txt. 21 * platform/mac/fast/events/content-inset-hit-testing-in-frame.html: Copied from platform/mac-wk2/tiled-drawing/content-inset-hit-testing-in-frame.html. 22 * platform/mac/fast/events/content-inset-hit-testing.html: Copied from platform/mac-wk2/tiled-drawing/content-inset-hit-testing.html. 23 * platform/mac/fast/events/resources: Added. 24 * platform/mac/fast/events/resources/iframe-to-hit-test.html: Copied from platform/mac-wk2/tiled-drawing/resources/iframe-to-hit-test.html. 25 1 26 2014-07-31 Bear Travis <betravis@adobe.com> 2 27 -
trunk/LayoutTests/platform/mac-wk1/TestExpectations
r171344 r171891 48 48 plugins/snapshotting 49 49 50 # Mavericks and prior do not support contentInset 51 [ MountainLion Mavericks ] platform/mac/fast/events/content-inset-hit-testing.html [ Skip ] 52 [ MountainLion Mavericks ] platform/mac/fast/events/content-inset-hit-testing-in-frame.html [ Skip ] 53 50 54 ### END OF (2) Failures without bug reports 51 55 ######################################## -
trunk/Source/WebCore/ChangeLog
r171890 r171891 1 2014-07-31 Beth Dakin <bdakin@apple.com> 2 3 Hit-testing broken in WebKit 1 views with AppKit's contentInsets 4 https://bugs.webkit.org/show_bug.cgi?id=135434 5 -and corresponding- 6 <rdar://problem/17850323> 7 8 Reviewed by Benjamin Poulain. 9 10 AppKit's contentInsets are factored into scroll positions and mouse positions, but 11 in WebCore, we generally want all of those things to be factored out so that, for 12 example, the scroll position of a document pinned to the top is the same whether 13 or not there is a contentInset. So to fix hit-testing in WebKit 1 views with 14 contentInsets, this patch factors the inset out or into of all coordinate 15 conversion methods just like we do for the WebKit2 contentInset. 16 17 This patch also adds the ability to test WK1 platformContentInsets with 18 window.internals, and it re-names convertFromRenderer to 19 convertFromRendererToContainingView and also re-names convertToRenderer to 20 convertFromContainingViewToRenderer. 21 22 ScrollView::topContentInset() takes an optional parameter indicating whether the 23 caller wants the WebCore::Page contentInset or the platform content inset. It’s 24 necessary to distinguish between these cases because there is a lot of code that 25 only wants the WebCore::Page contentInset since that feature is actually 26 implemented in WebCore as opposed to being implemented at the platform level. 27 * WebCore.exp.in: 28 * page/FrameView.cpp: 29 (WebCore::FrameView::topContentInset): 30 31 For layout test purposes, set the platforTopContentInset here if there is a 32 platformWidget(). 33 (WebCore::FrameView::topContentInsetDidChange): 34 35 Re-named functions, also all coordinate conversion functions call 36 topContentInset(ManualOrPlatformContentInset) 37 (WebCore::FrameView::convertFromContainingViewToRenderer): 38 (WebCore::FrameView::convertToContainingView): 39 (WebCore::FrameView::convertFromContainingView): 40 (WebCore::FrameView::convertFromRenderer): Deleted. 41 (WebCore::FrameView::convertToRenderer): Deleted. 42 * page/FrameView.h: 43 * page/Page.cpp: 44 (WebCore::Page::setTopContentInset): 45 * platform/ScrollView.cpp: 46 (WebCore::ScrollView::documentScrollOffsetRelativeToViewOrigin): 47 (WebCore::ScrollView::documentScrollPositionRelativeToViewOrigin): 48 (WebCore::ScrollView::contentsToRootView): 49 (WebCore::ScrollView::rootViewToTotalContents): 50 (WebCore::ScrollView::contentsToWindow): 51 (WebCore::ScrollView::platformTopContentInset): 52 (WebCore::ScrollView::platformSetTopContentInset): 53 * platform/ScrollView.h: 54 (WebCore::ScrollView::topContentInset): 55 * platform/ios/ScrollViewIOS.mm: 56 (WebCore::ScrollView::platformTopContentInset): 57 (WebCore::ScrollView::platformSetTopContentInset): 58 59 Implement new platform inset-related functions using AppKit's implementation. 60 * platform/mac/ScrollViewMac.mm: 61 (WebCore::ScrollView::platformTopContentInset): 62 (WebCore::ScrollView::platformSetTopContentInset): 63 64 When we set the scroll position for the documentView, we have to factor the inset 65 back into the WebCore scroll position. 66 (WebCore::ScrollView::platformSetScrollPosition): 67 68 Re-named functions. 69 * rendering/RenderLayer.cpp: 70 (WebCore::RenderLayer::convertFromScrollbarToContainingView): 71 (WebCore::RenderLayer::convertFromContainingViewToScrollbar): 72 * rendering/RenderListBox.cpp: 73 (WebCore::RenderListBox::convertFromScrollbarToContainingView): 74 (WebCore::RenderListBox::convertFromContainingViewToScrollbar): 75 1 76 2014-07-31 Dean Jackson <dino@apple.com> 2 77 -
trunk/Source/WebCore/WebCore.exp.in
r171826 r171891 2018 2018 __ZNK7WebCore9FrameView13paintBehaviorEv 2019 2019 __ZNK7WebCore9FrameView14didFirstLayoutEv 2020 __ZNK7WebCore9FrameView15topContentInsetEv 2021 __ZNK7WebCore9FrameView17convertToRendererEPKNS_13RenderElementERKNS_7IntRectE 2022 __ZNK7WebCore9FrameView17convertToRendererEPKNS_13RenderElementERKNS_8IntPointE 2020 __ZNK7WebCore9FrameView15topContentInsetENS_10ScrollView19TopContentInsetTypeE 2023 2021 __ZNK7WebCore9FrameView19baseBackgroundColorEv 2024 __ZNK7WebCore9FrameView19convertFromRendererEPKNS_13RenderElementERKNS_7IntRectE2025 __ZNK7WebCore9FrameView19convertFromRendererEPKNS_13RenderElementERKNS_8IntPointE2026 2022 __ZNK7WebCore9FrameView20isSoftwareRenderableEv 2027 2023 __ZNK7WebCore9FrameView21maximumScrollPositionEv … … 2030 2026 __ZNK7WebCore9FrameView27windowClipRectForFrameOwnerEPKNS_21HTMLFrameOwnerElementEb 2031 2027 __ZNK7WebCore9FrameView28isEnclosedInCompositingLayerEv 2028 __ZNK7WebCore9FrameView35convertFromContainingViewToRendererEPKNS_13RenderElementERKNS_7IntRectE 2029 __ZNK7WebCore9FrameView35convertFromContainingViewToRendererEPKNS_13RenderElementERKNS_8IntPointE 2030 __ZNK7WebCore9FrameView35convertFromRendererToContainingViewEPKNS_13RenderElementERKNS_7IntRectE 2031 __ZNK7WebCore9FrameView35convertFromRendererToContainingViewEPKNS_13RenderElementERKNS_8IntPointE 2032 2032 __ZNK7WebCore9InlineBox10lineHeightEv 2033 2033 __ZNK7WebCore9InlineBox14caretMaxOffsetEv -
trunk/Source/WebCore/page/FrameView.cpp
r171886 r171891 931 931 } 932 932 933 float FrameView::topContentInset() const 934 { 933 float FrameView::topContentInset(TopContentInsetType contentInsetTypeToReturn) const 934 { 935 if (platformWidget() && contentInsetTypeToReturn == TopContentInsetType::WebCoreOrPlatformContentInset) 936 return platformTopContentInset(); 937 935 938 if (!frame().isMainFrame()) 936 939 return 0; … … 940 943 } 941 944 942 void FrameView::topContentInsetDidChange( )945 void FrameView::topContentInsetDidChange(float newTopContentInset) 943 946 { 944 947 RenderView* renderView = this->renderView(); 945 948 if (!renderView) 946 949 return; 950 951 if (platformWidget()) 952 platformSetTopContentInset(newTopContentInset); 947 953 948 954 layout(); … … 953 959 954 960 if (TiledBacking* tiledBacking = this->tiledBacking()) 955 tiledBacking->setTopContentInset( topContentInset());961 tiledBacking->setTopContentInset(newTopContentInset); 956 962 } 957 963 … … 3932 3938 } 3933 3939 3934 IntRect FrameView::convertFromRenderer (const RenderElement* renderer, const IntRect& rendererRect) const3940 IntRect FrameView::convertFromRendererToContainingView(const RenderElement* renderer, const IntRect& rendererRect) const 3935 3941 { 3936 3942 IntRect rect = pixelSnappedIntRect(enclosingLayoutRect(renderer->localToAbsoluteQuad(FloatRect(rendererRect)).boundingBox())); … … 3938 3944 // Convert from page ("absolute") to FrameView coordinates. 3939 3945 if (!delegatesScrolling()) 3940 rect.moveBy(-scrollPosition() + IntPoint(0, headerHeight() + topContentInset( )));3946 rect.moveBy(-scrollPosition() + IntPoint(0, headerHeight() + topContentInset(TopContentInsetType::WebCoreOrPlatformContentInset))); 3941 3947 3942 3948 return rect; 3943 3949 } 3944 3950 3945 IntRect FrameView::convert ToRenderer(const RenderElement* renderer, const IntRect& viewRect) const3951 IntRect FrameView::convertFromContainingViewToRenderer(const RenderElement* renderer, const IntRect& viewRect) const 3946 3952 { 3947 3953 IntRect rect = viewRect; … … 3957 3963 } 3958 3964 3959 IntPoint FrameView::convertFromRenderer (const RenderElement* renderer, const IntPoint& rendererPoint) const3965 IntPoint FrameView::convertFromRendererToContainingView(const RenderElement* renderer, const IntPoint& rendererPoint) const 3960 3966 { 3961 3967 IntPoint point = roundedIntPoint(renderer->localToAbsolute(rendererPoint, UseTransforms)); … … 3963 3969 // Convert from page ("absolute") to FrameView coordinates. 3964 3970 if (!delegatesScrolling()) 3965 point.moveBy(-scrollPosition() + IntPoint(0, headerHeight() + topContentInset( )));3971 point.moveBy(-scrollPosition() + IntPoint(0, headerHeight() + topContentInset(TopContentInsetType::WebCoreOrPlatformContentInset))); 3966 3972 return point; 3967 3973 } 3968 3974 3969 IntPoint FrameView::convert ToRenderer(const RenderElement* renderer, const IntPoint& viewPoint) const3975 IntPoint FrameView::convertFromContainingViewToRenderer(const RenderElement* renderer, const IntPoint& viewPoint) const 3970 3976 { 3971 3977 IntPoint point = viewPoint; … … 3992 3998 rect.move(renderer->borderLeft() + renderer->paddingLeft(), 3993 3999 renderer->borderTop() + renderer->paddingTop()); 3994 return parentView->convertFromRenderer (renderer, rect);4000 return parentView->convertFromRendererToContainingView(renderer, rect); 3995 4001 } 3996 4002 … … 4012 4018 return parentRect; 4013 4019 4014 IntRect rect = parentView->convert ToRenderer(renderer, parentRect);4020 IntRect rect = parentView->convertFromContainingViewToRenderer(renderer, parentRect); 4015 4021 // Subtract borders and padding 4016 4022 rect.move(-renderer->borderLeft() - renderer->paddingLeft(), … … 4041 4047 point.move(renderer->borderLeft() + renderer->paddingLeft(), 4042 4048 renderer->borderTop() + renderer->paddingTop()); 4043 return parentView->convertFromRenderer (renderer, point);4049 return parentView->convertFromRendererToContainingView(renderer, point); 4044 4050 } 4045 4051 … … 4061 4067 return parentPoint; 4062 4068 4063 IntPoint point = parentView->convert ToRenderer(renderer, parentPoint);4069 IntPoint point = parentView->convertFromContainingViewToRenderer(renderer, parentPoint); 4064 4070 // Subtract borders and padding 4065 4071 point.move(-renderer->borderLeft() - renderer->paddingLeft(), -
trunk/Source/WebCore/page/FrameView.h
r171336 r171891 388 388 389 389 // Methods to convert points and rects between the coordinate space of the renderer, and this view. 390 IntRect convertFromRenderer (const RenderElement*, const IntRect&) const;391 IntRect convert ToRenderer(const RenderElement*, const IntRect&) const;392 IntPoint convertFromRenderer (const RenderElement*, const IntPoint&) const;393 IntPoint convert ToRenderer(const RenderElement*, const IntPoint&) const;390 IntRect convertFromRendererToContainingView(const RenderElement*, const IntRect&) const; 391 IntRect convertFromContainingViewToRenderer(const RenderElement*, const IntRect&) const; 392 IntPoint convertFromRendererToContainingView(const RenderElement*, const IntPoint&) const; 393 IntPoint convertFromContainingViewToRenderer(const RenderElement*, const IntPoint&) const; 394 394 395 395 bool isFrameViewScrollCorner(RenderScrollbarPart* scrollCorner) const { return m_scrollCorner == scrollCorner; } … … 466 466 void setFooterHeight(int); 467 467 468 virtual float topContentInset( ) const override;469 void topContentInsetDidChange( );468 virtual float topContentInset(TopContentInsetType = TopContentInsetType::WebCoreContentInset) const override; 469 void topContentInsetDidChange(float newTopContentInset); 470 470 471 471 virtual void willStartLiveResize() override; -
trunk/Source/WebCore/page/Page.cpp
r171661 r171891 807 807 808 808 if (FrameView* view = mainFrame().view()) 809 view->topContentInsetDidChange( );809 view->topContentInsetDidChange(m_topContentInset); 810 810 } 811 811 -
trunk/Source/WebCore/platform/ScrollView.cpp
r170558 r171891 411 411 IntSize ScrollView::documentScrollOffsetRelativeToViewOrigin() const 412 412 { 413 return scrollOffset() - IntSize(0, headerHeight() + topContentInset( ));413 return scrollOffset() - IntSize(0, headerHeight() + topContentInset(TopContentInsetType::WebCoreOrPlatformContentInset)); 414 414 } 415 415 … … 417 417 { 418 418 IntPoint scrollPosition = this->scrollPosition(); 419 return IntPoint(scrollPosition.x(), scrollPosition.y() - headerHeight() - topContentInset( ));419 return IntPoint(scrollPosition.x(), scrollPosition.y() - headerHeight() - topContentInset(TopContentInsetType::WebCoreOrPlatformContentInset)); 420 420 } 421 421 … … 831 831 return convertToRootView(contentsPoint); 832 832 833 IntPoint viewPoint = contentsPoint + IntSize(0, headerHeight() + topContentInset( )) - scrollOffset();833 IntPoint viewPoint = contentsPoint + IntSize(0, headerHeight() + topContentInset(TopContentInsetType::WebCoreOrPlatformContentInset)) - scrollOffset(); 834 834 return convertToRootView(viewPoint); 835 835 } … … 851 851 852 852 IntRect viewRect = contentsRect; 853 viewRect.move(-scrollOffset() + IntSize(0, headerHeight() + topContentInset( )));853 viewRect.move(-scrollOffset() + IntSize(0, headerHeight() + topContentInset(TopContentInsetType::WebCoreOrPlatformContentInset))); 854 854 return convertToRootView(viewRect); 855 855 } … … 861 861 862 862 IntPoint viewPoint = convertFromRootView(rootViewPoint); 863 return viewPoint + scrollOffset() - IntSize(0, topContentInset( ));863 return viewPoint + scrollOffset() - IntSize(0, topContentInset(TopContentInsetType::WebCoreOrPlatformContentInset)); 864 864 } 865 865 … … 878 878 return convertToContainingWindow(contentsPoint); 879 879 880 IntPoint viewPoint = contentsPoint + IntSize(0, headerHeight() + topContentInset( )) - scrollOffset();880 IntPoint viewPoint = contentsPoint + IntSize(0, headerHeight() + topContentInset(TopContentInsetType::WebCoreOrPlatformContentInset)) - scrollOffset(); 881 881 return convertToContainingWindow(viewPoint); 882 882 } … … 898 898 899 899 IntRect viewRect = contentsRect; 900 viewRect.move(-scrollOffset() + IntSize(0, headerHeight() + topContentInset( )));900 viewRect.move(-scrollOffset() + IntSize(0, headerHeight() + topContentInset(TopContentInsetType::WebCoreOrPlatformContentInset))); 901 901 return convertToContainingWindow(viewRect); 902 902 } … … 1516 1516 } 1517 1517 1518 float ScrollView::platformTopContentInset() const 1519 { 1520 return 0; 1521 } 1522 1523 void ScrollView::platformSetTopContentInset(float) 1524 { 1525 } 1526 1518 1527 IntSize ScrollView::platformVisibleContentSize(bool) const 1519 1528 { -
trunk/Source/WebCore/platform/ScrollView.h
r170773 r171891 157 157 bool canBlitOnScroll() const; 158 158 159 virtual float topContentInset() const { return 0; } 159 // There are at least three types of contentInset. Usually we just care about WebCoreContentInset, which is the inset 160 // that is set on a Page that requires WebCore to move its layers to accomodate the inset. However, there are platform 161 // concepts that are similar on both iOS and Mac when there is a platformWidget(). Sometimes we need the Mac platform value 162 // for topContentInset, so when the TopContentInsetType is WebCoreOrPlatformContentInset, platformTopContentInset() 163 // will be returned instead of the value set on Page. 164 enum class TopContentInsetType { WebCoreContentInset, WebCoreOrPlatformContentInset }; 165 virtual float topContentInset(TopContentInsetType = TopContentInsetType::WebCoreContentInset) const { return 0; } 160 166 161 167 // The visible content rect has a location that is the scrolled offset of the document. The width and height are the unobscured viewport … … 408 414 // Called to update the scrollbars to accurately reflect the state of the view. 409 415 void updateScrollbars(const IntSize& desiredOffset); 416 417 float platformTopContentInset() const; 418 void platformSetTopContentInset(float); 410 419 411 420 private: -
trunk/Source/WebCore/platform/ios/ScrollViewIOS.mm
r170773 r171891 162 162 } 163 163 164 float ScrollView::platformTopContentInset(float) const 165 { 166 return 0; 167 } 168 169 void ScrollView::platformSetTopContentInset() 170 { 171 } 172 164 173 IntRect ScrollView::platformVisibleContentRect(bool includeScrollbars) const 165 174 { -
trunk/Source/WebCore/platform/mac/ScrollViewMac.mm
r171615 r171891 109 109 } 110 110 111 float ScrollView::platformTopContentInset() const 112 { 113 BEGIN_BLOCK_OBJC_EXCEPTIONS; 114 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000 115 return scrollView().contentInsets.top; 116 #endif 117 END_BLOCK_OBJC_EXCEPTIONS; 118 119 return 0; 120 } 121 122 void ScrollView::platformSetTopContentInset(float topContentInset) 123 { 124 BEGIN_BLOCK_OBJC_EXCEPTIONS; 125 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000 126 if (topContentInset) 127 scrollView().automaticallyAdjustsContentInsets = NO; 128 else 129 scrollView().automaticallyAdjustsContentInsets = YES; 130 131 NSEdgeInsets contentInsets = scrollView().contentInsets; 132 contentInsets.top = topContentInset; 133 scrollView().contentInsets = contentInsets; 134 #else 135 UNUSED_PARAM(topContentInset); 136 #endif 137 END_BLOCK_OBJC_EXCEPTIONS; 138 } 139 111 140 IntRect ScrollView::platformVisibleContentRect(bool includeScrollbars) const 112 141 { … … 161 190 NSPoint floatPoint = scrollPoint; 162 191 NSPoint tempPoint = { std::max(-[scrollView() scrollOrigin].x, floatPoint.x), std::max(-[scrollView() scrollOrigin].y, floatPoint.y) }; // Don't use NSMakePoint to work around 4213314. 192 193 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000 194 // AppKit has the inset factored into all of its scroll positions. In WebCore, we use positions that ignore 195 // the insets so that they are equivalent whether or not there is an inset. 196 tempPoint.x = tempPoint.x - scrollView().contentInsets.left; 197 tempPoint.y = tempPoint.y - scrollView().contentInsets.top; 198 #endif 199 163 200 [documentView() scrollPoint:tempPoint]; 164 201 END_BLOCK_OBJC_EXCEPTIONS; -
trunk/Source/WebCore/rendering/RenderLayer.cpp
r171745 r171891 2731 2731 rect.move(scrollbarOffset(scrollbar)); 2732 2732 2733 return renderer().view().frameView().convertFromRenderer (&renderer(), rect);2733 return renderer().view().frameView().convertFromRendererToContainingView(&renderer(), rect); 2734 2734 } 2735 2735 2736 2736 IntRect RenderLayer::convertFromContainingViewToScrollbar(const Scrollbar* scrollbar, const IntRect& parentRect) const 2737 2737 { 2738 IntRect rect = renderer().view().frameView().convert ToRenderer(&renderer(), parentRect);2738 IntRect rect = renderer().view().frameView().convertFromContainingViewToRenderer(&renderer(), parentRect); 2739 2739 rect.move(-scrollbarOffset(scrollbar)); 2740 2740 return rect; … … 2745 2745 IntPoint point = scrollbarPoint; 2746 2746 point.move(scrollbarOffset(scrollbar)); 2747 return renderer().view().frameView().convertFromRenderer (&renderer(), point);2747 return renderer().view().frameView().convertFromRendererToContainingView(&renderer(), point); 2748 2748 } 2749 2749 2750 2750 IntPoint RenderLayer::convertFromContainingViewToScrollbar(const Scrollbar* scrollbar, const IntPoint& parentPoint) const 2751 2751 { 2752 IntPoint point = renderer().view().frameView().convert ToRenderer(&renderer(), parentPoint);2752 IntPoint point = renderer().view().frameView().convertFromContainingViewToRenderer(&renderer(), parentPoint); 2753 2753 point.move(-scrollbarOffset(scrollbar)); 2754 2754 return point; -
trunk/Source/WebCore/rendering/RenderListBox.cpp
r170972 r171891 726 726 int scrollbarTop = borderTop(); 727 727 rect.move(scrollbarLeft, scrollbarTop); 728 return view().frameView().convertFromRenderer (this, rect);728 return view().frameView().convertFromRendererToContainingView(this, rect); 729 729 } 730 730 731 731 IntRect RenderListBox::convertFromContainingViewToScrollbar(const Scrollbar* scrollbar, const IntRect& parentRect) const 732 732 { 733 IntRect rect = view().frameView().convert ToRenderer(this, parentRect);733 IntRect rect = view().frameView().convertFromContainingViewToRenderer(this, parentRect); 734 734 int scrollbarLeft = width() - borderRight() - scrollbar->width(); 735 735 int scrollbarTop = borderTop(); … … 744 744 int scrollbarTop = borderTop(); 745 745 point.move(scrollbarLeft, scrollbarTop); 746 return view().frameView().convertFromRenderer (this, point);746 return view().frameView().convertFromRendererToContainingView(this, point); 747 747 } 748 748 749 749 IntPoint RenderListBox::convertFromContainingViewToScrollbar(const Scrollbar* scrollbar, const IntPoint& parentPoint) const 750 750 { 751 IntPoint point = view().frameView().convert ToRenderer(this, parentPoint);751 IntPoint point = view().frameView().convertFromContainingViewToRenderer(this, parentPoint); 752 752 int scrollbarLeft = width() - borderRight() - scrollbar->width(); 753 753 int scrollbarTop = borderTop(); -
trunk/Source/WebKit2/ChangeLog
r171887 r171891 1 2014-07-31 Beth Dakin <bdakin@apple.com> 2 3 Hit-testing broken in WebKit 1 views with AppKit's contentInsets 4 https://bugs.webkit.org/show_bug.cgi?id=135434 5 -and corresponding- 6 <rdar://problem/17850323> 7 8 Reviewed by Benjamin Poulain. 9 10 Re-named functions. 11 * WebProcess/Plugins/PDF/PDFPlugin.mm: 12 (WebKit::PDFPlugin::convertFromScrollbarToContainingView): 13 (WebKit::PDFPlugin::convertFromContainingViewToScrollbar): 14 1 15 2014-07-31 Oliver Hunt <oliver@apple.com> 2 16 -
trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm
r170972 r171891 680 680 rect.move(scrollbar->location() - pluginView()->location()); 681 681 682 return pluginView()->frame()->view()->convertFromRenderer (pluginView()->renderer(), rect);682 return pluginView()->frame()->view()->convertFromRendererToContainingView(pluginView()->renderer(), rect); 683 683 } 684 684 685 685 IntRect PDFPlugin::convertFromContainingViewToScrollbar(const Scrollbar* scrollbar, const IntRect& parentRect) const 686 686 { 687 IntRect rect = pluginView()->frame()->view()->convert ToRenderer(pluginView()->renderer(), parentRect);687 IntRect rect = pluginView()->frame()->view()->convertFromContainingViewToRenderer(pluginView()->renderer(), parentRect); 688 688 rect.move(pluginView()->location() - scrollbar->location()); 689 689 … … 696 696 point.move(scrollbar->location() - pluginView()->location()); 697 697 698 return pluginView()->frame()->view()->convertFromRenderer (pluginView()->renderer(), point);698 return pluginView()->frame()->view()->convertFromRendererToContainingView(pluginView()->renderer(), point); 699 699 } 700 700 701 701 IntPoint PDFPlugin::convertFromContainingViewToScrollbar(const Scrollbar* scrollbar, const IntPoint& parentPoint) const 702 702 { 703 IntPoint point = pluginView()->frame()->view()->convert ToRenderer(pluginView()->renderer(), parentPoint);703 IntPoint point = pluginView()->frame()->view()->convertFromContainingViewToRenderer(pluginView()->renderer(), parentPoint); 704 704 point.move(pluginView()->location() - scrollbar->location()); 705 705
Note: See TracChangeset
for help on using the changeset viewer.