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

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

Issue 2404393003: Tie scroll anchoring adjustments to frame lifecycle instead of layout. (Closed)
Patch Set: Created 4 years, 2 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/DOMVisualViewport.cpp
diff --git a/third_party/WebKit/Source/core/frame/DOMVisualViewport.cpp b/third_party/WebKit/Source/core/frame/DOMVisualViewport.cpp
index 2e6ccba0270b3e88420e1c89819ea7bf76233bb6..591a0507c30c0520e441f01f008be7fcf45ed609 100644
--- a/third_party/WebKit/Source/core/frame/DOMVisualViewport.cpp
+++ b/third_party/WebKit/Source/core/frame/DOMVisualViewport.cpp
@@ -86,7 +86,7 @@ float DOMVisualViewport::pageX() {
if (!view)
return 0;
- frame->document()->updateStyleAndLayoutIgnorePendingStylesheets();
+ frame->document()->updateScrollPosition();
float viewportX = view->getScrollableArea()->scrollOffset().width();
return adjustScrollForAbsoluteZoom(viewportX, frame->pageZoomFactor());
}
@@ -100,7 +100,7 @@ float DOMVisualViewport::pageY() {
if (!view)
return 0;
- frame->document()->updateStyleAndLayoutIgnorePendingStylesheets();
+ frame->document()->updateScrollPosition();
float viewportY = view->getScrollableArea()->scrollOffset().height();
return adjustScrollForAbsoluteZoom(viewportY, frame->pageZoomFactor());
}

Powered by Google App Engine
This is Rietveld 408576698