Skip to content

Commit ce4e05b

Browse files
author
Cheng Zhao
authored
fix: pass scrollBounce by command line flag (electron#13812)
Implement the scrollBounce option by reading the command line flag in `RenderThreadImpl::IsElasticOverscrollEnabled`, there is no more need to set NSScrollViewRubberbanding.
1 parent e125569 commit ce4e05b

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

atom/renderer/renderer_client_base.cc

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
#include "third_party/WebKit/public/web/WebSecurityPolicy.h"
3636

3737
#if defined(OS_MACOSX)
38-
#include "base/mac/mac_util.h"
3938
#include "base/strings/sys_string_conversions.h"
4039
#endif
4140

@@ -158,15 +157,6 @@ void RendererClientBase::RenderThreadStarted() {
158157
SetCurrentProcessExplicitAppUserModelID(app_id.c_str());
159158
}
160159
#endif
161-
162-
#if defined(OS_MACOSX)
163-
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
164-
bool scroll_bounce = command_line->HasSwitch(switches::kScrollBounce);
165-
CFPreferencesSetAppValue(CFSTR("NSScrollViewRubberbanding"),
166-
scroll_bounce ? kCFBooleanTrue : kCFBooleanFalse,
167-
kCFPreferencesCurrentApplication);
168-
CFPreferencesAppSynchronize(kCFPreferencesCurrentApplication);
169-
#endif
170160
}
171161

172162
void RendererClientBase::RenderFrameCreated(

0 commit comments

Comments
 (0)