mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
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:
@@ -36,7 +36,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
|
||||
|
||||
@@ -155,15 +154,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(
|
||||
|
||||
2
vendor/libchromiumcontent
vendored
2
vendor/libchromiumcontent
vendored
Submodule vendor/libchromiumcontent updated: 3c2f0be306...ee20cb494e
Reference in New Issue
Block a user