DescriptionFix main thread top controls scrolling to mirror CC.
There's a couple of issues I found where our behavior on the main thread is
divergent from the compositor. The major one is that we don't anchor the
viewport when top controls change the viewport bounds. At the document extents,
the changing bounds can cause the viewport's scroll offset to be clamped causing
unwanted scrolling. I've added an anchoring in didUpdateTopControls that should
match CC's anchoring down to the sub-pixel level. This also required some
rearranging of operations in applyViewportDeltas.
Now that we anchor the top control resizes on main thread as well, we can't have
a separate calls to change the "shrinks_blink_layout_size" flag and resize the
Blink size so I've added an overload of resize() in WebWidget that does both at
the same time.
In addition, there were other minor issues that I found but weren't causing an
obvoius noticable effect. CC's MaxScrollOffset method |ceil|s the top controls
adjustment so I made the main thread do this too. CC's anchoring logic still
scrolled the outer viewport first. This was changed a while back in viewport.cc
so I changed it here too.
BUG=600507
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Committed: https://crrev.com/c63441cc9941c223e2f2d311085903c00da85938
Cr-Commit-Position: refs/heads/master@{#390085}
Patch Set 1 #Patch Set 2 : Whitespace #
Total comments: 18
Patch Set 3 : Rebase #Patch Set 4 : Addressed Majid's feedback #Patch Set 5 : Rebase #Patch Set 6 : Merged top controls change into resize() #Patch Set 7 : Cleaned up test for scrolling down but showing top controls #Patch Set 8 : Don't update top controls unless they actually changed #Patch Set 9 : Rebase #Patch Set 10 : Rebase #Patch Set 11 : Override top controls resize() in classes that override resize() #
Total comments: 5
Patch Set 12 : Fixed anchoring to check width too #
Total comments: 3
Patch Set 13 : aelias@ review: moved combined resize into WebView #
Total comments: 4
Patch Set 14 : sievers@ review #
Total comments: 3
Patch Set 15 : Let ResizeWebWidget decide whether to resize #
Total comments: 7
Patch Set 16 : Addressing sievers@'s comments #Patch Set 17 : Rebase #Patch Set 18 : Rebase #Patch Set 19 : Rebase #Patch Set 20 : Build fix after rebase #Messages
Total messages: 73 (29 generated)
|