Mac: Add disable-scroll-bounce command-line flag (issue #1597).

This commit is contained in:
Marshall Greenblatt
2015-04-08 15:16:17 +02:00
parent fe03339870
commit 328cf2ed1f
6 changed files with 27 additions and 41 deletions

View File

@@ -132,11 +132,4 @@ patches = [
'name': 'webkit_progresstracker_426510',
'path': '../third_party/WebKit/Source/core/loader/',
},
{
# Disable scollbar bounce and overlay on OS X.
# http://code.google.com/p/chromiumembedded/issues/detail?id=364
'name': 'spi_webcore_364',
'path': '../third_party/WebKit/Source/',
'condition': 'CEF_SPI_BUILD',
},
]

View File

@@ -1,34 +0,0 @@
diff --git core/frame/FrameView.cpp core/frame/FrameView.cpp
index b227b2a..3bc4180 100644
--- core/frame/FrameView.cpp
+++ core/frame/FrameView.cpp
@@ -144,8 +144,10 @@ FrameView::FrameView(LocalFrame* frame)
if (!m_frame->isMainFrame())
return;
+#if 0
ScrollableArea::setVerticalScrollElasticity(ScrollElasticityAllowed);
ScrollableArea::setHorizontalScrollElasticity(ScrollElasticityAllowed);
+#endif
}
PassRefPtrWillBeRawPtr<FrameView> FrameView::create(LocalFrame* frame)
diff --git platform/scroll/ScrollbarThemeMacCommon.mm platform/scroll/ScrollbarThemeMacCommon.mm
index 90abb7c..6bb16c6 100644
--- platform/scroll/ScrollbarThemeMacCommon.mm
+++ platform/scroll/ScrollbarThemeMacCommon.mm
@@ -354,10 +354,14 @@ NSScrollerStyle ScrollbarThemeMacCommon::recommendedScrollerStyle()
// static
bool ScrollbarThemeMacCommon::isOverlayAPIAvailable()
{
+#if 0
static bool apiAvailable =
[NSClassFromString(@"NSScrollerImp") respondsToSelector:@selector(scrollerImpWithStyle:controlSize:horizontal:replacingScrollerImp:)]
&& [NSClassFromString(@"NSScrollerImpPair") instancesRespondToSelector:@selector(scrollerStyle)];
return apiAvailable;
+#else
+ return false;
+#endif
}
} // namespace blink