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

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:37 +09:00 committed by GitHub
parent e125569f87
commit ce4e05b85a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 11 deletions

View file

@ -35,7 +35,6 @@
#include "third_party/WebKit/public/web/WebSecurityPolicy.h"
#if defined(OS_MACOSX)
#include "base/mac/mac_util.h"
#include "base/strings/sys_string_conversions.h"
#endif
@ -158,15 +157,6 @@ void RendererClientBase::RenderThreadStarted() {
SetCurrentProcessExplicitAppUserModelID(app_id.c_str());
}
#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(

@ -1 +1 @@
Subproject commit 659aa83375805545402eff8b0746784bbf2d64c2
Subproject commit c2548454a768a671caae97b0e2d389f72aafdc97