electron / libchromiumcontent

Shared library build of Chromium’s Content module
MIT License
485 stars 183 forks source link

Add patch to make scrollBounce option work #613

Closed zcbenz closed 6 years ago

zcbenz commented 6 years ago

This patch makes the renderer process to use --scroll-bounce command line flag to enable rubber banding.

This is required to fix https://github.com/electron/electron/issues/13493.

Chromium does not provide a way for us to inject code just before renderer process is started, when Chromium reads system rubber banding setting. I tried to set NSScrollViewRubberbanding in a few places but they all have race conditions when creating multiple windows with different settings, see https://github.com/electron/electron/pull/13797 for an example.

This patch is the simplest solution (and probably the most decent one) that I can find, and it is very easy to maintain.