summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/mac/ScrollViewMac.mm
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/platform/mac/ScrollViewMac.mm')
-rw-r--r--WebCore/platform/mac/ScrollViewMac.mm17
1 files changed, 6 insertions, 11 deletions
diff --git a/WebCore/platform/mac/ScrollViewMac.mm b/WebCore/platform/mac/ScrollViewMac.mm
index f31b301..7ef5dc4 100644
--- a/WebCore/platform/mac/ScrollViewMac.mm
+++ b/WebCore/platform/mac/ScrollViewMac.mm
@@ -57,8 +57,6 @@ NSView *ScrollView::documentView() const
return nil;
}
-#if !ENABLE(EXPERIMENTAL_SINGLE_VIEW_MODE)
-
void ScrollView::platformAddChild(Widget* child)
{
BEGIN_BLOCK_OBJC_EXCEPTIONS;
@@ -109,13 +107,12 @@ bool ScrollView::platformCanBlitOnScroll() const
IntRect ScrollView::platformVisibleContentRect(bool includeScrollbars) const
{
- BEGIN_BLOCK_OBJC_EXCEPTIONS;
- if (includeScrollbars) {
- if (NSView* documentView = this->documentView())
- return enclosingIntRect([documentView visibleRect]);
- }
- return enclosingIntRect([scrollView() documentVisibleRect]);
- END_BLOCK_OBJC_EXCEPTIONS;
+ BEGIN_BLOCK_OBJC_EXCEPTIONS;
+ IntRect result = enclosingIntRect([scrollView() documentVisibleRect]);
+ if (includeScrollbars)
+ result.setSize(IntSize([scrollView() frame].size));
+ return result;
+ END_BLOCK_OBJC_EXCEPTIONS;
return IntRect();
}
@@ -205,6 +202,4 @@ bool ScrollView::platformIsOffscreen() const
return ![platformWidget() window] || ![[platformWidget() window] isVisible];
}
-#endif // !ENABLE(EXPERIMENTAL_SINGLE_VIEW_MODE)
-
} // namespace WebCore