fix: pass scrollBounce by command line flag (#13813)

Implement the scrollBounce option by reading the command line flag in
`RenderThreadImpl::IsElasticOverscrollEnabled`, there is no more need
to set NSScrollViewRubberbanding.
This commit is contained in:
Cheng Zhao 2018-07-26 18:38:48 +09:00 committed by GitHub
parent 95c69e660c
commit a880e0222f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 11 deletions

View file

@ -36,7 +36,6 @@
#include "third_party/WebKit/public/web/WebSecurityPolicy.h" #include "third_party/WebKit/public/web/WebSecurityPolicy.h"
#if defined(OS_MACOSX) #if defined(OS_MACOSX)
#include "base/mac/mac_util.h"
#include "base/strings/sys_string_conversions.h" #include "base/strings/sys_string_conversions.h"
#endif #endif
@ -155,15 +154,6 @@ void RendererClientBase::RenderThreadStarted() {
SetCurrentProcessExplicitAppUserModelID(app_id.c_str()); SetCurrentProcessExplicitAppUserModelID(app_id.c_str());
} }
#endif #endif
#if defined(OS_MACOSX)
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
bool scroll_bounce = command_line->HasSwitch(switches::kScrollBounce);
CFPreferencesSetAppValue(CFSTR("NSScrollViewRubberbanding"),
scroll_bounce ? kCFBooleanTrue : kCFBooleanFalse,
kCFPreferencesCurrentApplication);
CFPreferencesAppSynchronize(kCFPreferencesCurrentApplication);
#endif
} }
void RendererClientBase::RenderFrameCreated( void RendererClientBase::RenderFrameCreated(

@ -1 +1 @@
Subproject commit 3c2f0be306ea9b954b613facd7a05979fd5b2c46 Subproject commit ee20cb494edbdab937d4fe52b5cf2f916f3373e8