diff --git a/AppKit/CPClipView.j b/AppKit/CPClipView.j index a59f83f12..7cc52d2bc 100644 --- a/AppKit/CPClipView.j +++ b/AppKit/CPClipView.j @@ -230,6 +230,11 @@ return [self scrollToPoint:CGPointMake(bounds.origin.x - deltaX, bounds.origin.y - deltaY)]; } +- (CGRect)documentVisibleRect +{ + return [self convertRect:[self bounds] fromView:_documentView]; +} + @end diff --git a/AppKit/CPScrollView.j b/AppKit/CPScrollView.j index 439489982..3ea8593b9 100644 --- a/AppKit/CPScrollView.j +++ b/AppKit/CPScrollView.j @@ -1262,6 +1262,10 @@ Notifies the delegate when the scroll view has finished scrolling. [self reflectScrolledClipView:_contentView]; } +- (CGRect)documentVisibleRect +{ + return [_contentView documentVisibleRect]; +} #pragma mark - #pragma mark Overrides