Removing unnecessary DCHECK
This DCHECK is causing a small number of crashes, but I can't find a reason for it to exist. As far as I can tell, it shouldn't hurt anything if a ScrollBegan event comes through with 0 deltas. After removing it, I tried scrolling via mouse wheel, touchpad, and touch screen and all still worked fine. I also tried removing it and changing both scroll_update.data.scroll_update.delta_x and scroll_update.data.scroll_update.delta_y to 0 every time it entered that block, and scrolling appeared just fine to my eye. I moved the needs_update requirement to the if statement to avoid extra work being done if kPhaseBegan mouse wheel events come through with 0 deltas because I'm not sure how commonly that occurs. Bug: 1039911 Change-Id: I8e9590ef95dedd94830e6181322cd111e72b5b81 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1995702 Commit-Queue: Mario Bianucci <mabian@microsoft.com> Reviewed-by:David Bokan <bokan@chromium.org> Cr-Commit-Position: refs/heads/master@{#731829}
Showing
Please register or sign in to comment