commit | 45236fd563e9df53dc45579be1f3d0b4784885a2 | [log] [tgz] |
---|---|---|
author | David Bokan <bokan@chromium.org> | Wed Jan 23 23:16:33 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Wed Jan 23 23:16:33 2019 |
tree | 6e83ccbe60dc1591dcbde5a41a7eaad74387a7e2 | |
parent | 0246bba0cd7b7d6616e0aeac4a3f38464e9af232 [diff] |
Fix script-lifecycle violations with fragment anchors In https://crrev.com/dbd4eed1920a2aafbc87236db7efb98f108ba063 I moved around some fragment scrolling code to simplify and clean it up. As part of that, I made focusing and scrolling happen at the same time. Unfortunately, as noted in [1], this violates the lifecycle assumptions since focus() can synchronously execute an event handler - script is forbidden in the entire lifecycle, not just within layout. This CL undoes the loosening of the ScriptForbiddenScopes from the CL above. To do that, FragmentAnchor splits up the application of focus from scrolling and tries to apply focus at the time of FragmentAnchor creation (i.e. during parsing/navigation). If we can't apply it then (because rendering is blocked) it'll be applied at BeginFrame time, before rAF callbacks are executed. [1] https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/5BJSTl-FMGY Change-Id: If2c4c638f3f0faa7dab23e7e129c196357076fad Bug: 795381 Reviewed-on: https://chromium-review.googlesource.com/c/1408217 Reviewed-by: Stefan Zager <szager@chromium.org> Commit-Queue: David Bokan <bokan@chromium.org> Cr-Commit-Position: refs/heads/master@{#625402}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .