DescriptionDevTools: [Console] fix certain case that forces console to shake
Currently, ViewportControl uses clientHeight of its main element to
estimate visible viewport height. This falls shortly under the following
scenario:
1. ViewportControl has its "stickToBottom" flag set to true and just
scrolled to bottom as its "refresh" method got executed. Note, that
this refresh has scheduled one more scroll as it "scrolls to bottom".
2. The "refresh" method call figured out that there's a necessity to
render one more element in the beginning of viewport, and this new
element happen to add a horizontal scroll to the console.
3. Another "refresh" method gets executed (it was scheduled in #1)
4. The method figures out that client height changed (due to added
horizontal scroller), thus first element not needed any more and
gets removed from viewport.
5. Goto #1.
This change migrates from using clientHeight to using offsetHeight
which doesn't change as horizontal scroller gets added or removed in
result of viewport rendering.
BUG=387465
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=178422
Patch Set 1 #
Messages
Total messages: 12 (0 generated)
|