Always set NSScrollViewRubberbanding scroll bounce pref
This commit is contained in:
parent
e2a00e423c
commit
29c68182df
1 changed files with 7 additions and 9 deletions
|
@ -96,16 +96,14 @@ void RendererClientBase::RenderThreadStarted() {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(OS_MACOSX)
|
#if defined(OS_MACOSX)
|
||||||
// Disable rubber banding by default.
|
|
||||||
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
|
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
|
||||||
if (!command_line->HasSwitch(switches::kScrollBounce)) {
|
bool scroll_bounce = command_line->HasSwitch(switches::kScrollBounce);
|
||||||
base::ScopedCFTypeRef<CFStringRef> key(
|
base::ScopedCFTypeRef<CFStringRef> rubber_banding_key(
|
||||||
base::SysUTF8ToCFStringRef("NSScrollViewRubberbanding"));
|
base::SysUTF8ToCFStringRef("NSScrollViewRubberbanding"));
|
||||||
base::ScopedCFTypeRef<CFStringRef> value(
|
CFPreferencesSetAppValue(rubber_banding_key,
|
||||||
base::SysUTF8ToCFStringRef("false"));
|
scroll_bounce ? kCFBooleanTrue : kCFBooleanFalse,
|
||||||
CFPreferencesSetAppValue(key, value, kCFPreferencesCurrentApplication);
|
kCFPreferencesCurrentApplication);
|
||||||
CFPreferencesAppSynchronize(kCFPreferencesCurrentApplication);
|
CFPreferencesAppSynchronize(kCFPreferencesCurrentApplication);
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue