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:
parent
e125569f87
commit
ce4e05b85a
2 changed files with 1 additions and 11 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue