This is a small but important fix in our browser script that ensures that the 
`history.replaceState()` function is not called repeatedly during scrolling. 
The existing code makes sure the function is called no more often then every 
100 milliseconds, but that is still unnecessarily often and enough to make 
Firefox complain and degrade the scrolling performance on Chrome on Android. 

The new code does not call the function until after the user has stopped 
scrolling. This is what we want and fixes all the above mentioned problems. 

I have tested the new code thoroughly on Firefox and Chrome on Mac OS and 
Linux, Safari on Mac OS and  iOS as well as Chrome on Android.

-------------

Commit messages:
 - JDK-8286832: JavaDoc pages call browser history API too often

Changes: https://git.openjdk.java.net/jdk/pull/8751/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8751&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8286832
  Stats: 10 lines in 1 file changed: 4 ins; 4 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8751.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8751/head:pull/8751

PR: https://git.openjdk.java.net/jdk/pull/8751

Reply via email to