diff options
Diffstat (limited to 'WebCore/platform/mac')
-rw-r--r-- | WebCore/platform/mac/ScrollViewMac.mm | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/WebCore/platform/mac/ScrollViewMac.mm b/WebCore/platform/mac/ScrollViewMac.mm index 7ef5dc4..93ec971 100644 --- a/WebCore/platform/mac/ScrollViewMac.mm +++ b/WebCore/platform/mac/ScrollViewMac.mm @@ -147,7 +147,8 @@ void ScrollView::platformSetScrollbarsSuppressed(bool repaintOnUnsuppress) void ScrollView::platformSetScrollPosition(const IntPoint& scrollPoint) { BEGIN_BLOCK_OBJC_EXCEPTIONS; - NSPoint tempPoint = { max(0, scrollPoint.x()), max(0, scrollPoint.y()) }; // Don't use NSMakePoint to work around 4213314. + NSPoint floatPoint = scrollPoint; + NSPoint tempPoint = { max(-[scrollView() scrollOrigin].x, floatPoint.x), max(-[scrollView() scrollOrigin].y, floatPoint.y) }; // Don't use NSMakePoint to work around 4213314. [documentView() scrollPoint:tempPoint]; END_BLOCK_OBJC_EXCEPTIONS; } @@ -202,4 +203,11 @@ bool ScrollView::platformIsOffscreen() const return ![platformWidget() window] || ![[platformWidget() window] isVisible]; } +void ScrollView::platformSetScrollOrigin(const IntPoint& origin, bool updatePosition) +{ + BEGIN_BLOCK_OBJC_EXCEPTIONS; + [scrollView() setScrollOrigin:origin updatePosition:updatePosition]; + END_BLOCK_OBJC_EXCEPTIONS; +} + } // namespace WebCore |