Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Unified Diff: third_party/WebKit/Source/core/frame/VisualViewport.cpp

Issue 2835403002: Call ScrollableArea::ShowOverlayScrollbars for explicit scrolls only. (Closed)
Patch Set: fix VisualViewport Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/frame/VisualViewport.cpp
diff --git a/third_party/WebKit/Source/core/frame/VisualViewport.cpp b/third_party/WebKit/Source/core/frame/VisualViewport.cpp
index fd7477384c459eb4efef22a624703aca9a7bfa1b..69454fcaf3009ce66cbfc2d2cdb5bdd5fede8576 100644
--- a/third_party/WebKit/Source/core/frame/VisualViewport.cpp
+++ b/third_party/WebKit/Source/core/frame/VisualViewport.cpp
@@ -637,9 +637,13 @@ RefPtr<WebTaskRunner> VisualViewport::GetTimerTaskRunner() const {
void VisualViewport::UpdateScrollOffset(const ScrollOffset& position,
ScrollType scroll_type) {
- if (DidSetScaleOrLocation(scale_, FloatPoint(position)) &&
- scroll_type != kAnchoringScroll)
+ if (!DidSetScaleOrLocation(scale_, FloatPoint(position)))
+ return;
+ if (IsExplicitScrollType(scroll_type)) {
pdr. 2017/04/26 00:28:32 This will no longer call NotifyRootFrameViewport w
skobes 2017/04/26 01:28:57 Yes, I think it was a mistake to call it for kClam
NotifyRootFrameViewport();
+ if (scroll_type != kCompositorScroll && LayerForScrolling())
+ LayerForScrolling()->PlatformLayer()->ShowScrollbars();
+ }
}
GraphicsLayer* VisualViewport::LayerForContainer() const {

Powered by Google App Engine
This is Rietveld 408576698