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

Unified Diff: Source/core/input/EventHandler.cpp

Issue 1148003010: Force layout for main thread scrolling. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase. Created 5 years, 6 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
« no previous file with comments | « LayoutTests/fast/scroll-behavior/overflow-scroll-triggers-layout-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/input/EventHandler.cpp
diff --git a/Source/core/input/EventHandler.cpp b/Source/core/input/EventHandler.cpp
index 0e66ca528a2bee45a5deb23ea97efac88841b081..19698b6bf5a0b587896378adc6a5058273c8515d 100644
--- a/Source/core/input/EventHandler.cpp
+++ b/Source/core/input/EventHandler.cpp
@@ -561,6 +561,8 @@ ScrollResultOneDimensional EventHandler::scroll(ScrollDirection direction, Scrol
if (!node || !node->layoutObject())
return ScrollResultOneDimensional(false, delta);
+ m_frame->document()->updateLayoutIgnorePendingStylesheets();
+
LayoutBox* curBox = node->layoutObject()->enclosingBox();
while (curBox && !curBox->isLayoutView()) {
ScrollDirectionPhysical physicalDirection = toPhysicalDirection(
@@ -590,6 +592,9 @@ void EventHandler::customizedScroll(const Node& startNode, ScrollState& scrollSt
if (scrollState.fullyConsumed())
return;
+ if (scrollState.deltaX() || scrollState.deltaY())
+ m_frame->document()->updateLayoutIgnorePendingStylesheets();
+
if (m_currentScrollChain.isEmpty())
recomputeScrollChain(*m_frame, startNode, m_currentScrollChain);
scrollState.setScrollChain(m_currentScrollChain);
« no previous file with comments | « LayoutTests/fast/scroll-behavior/overflow-scroll-triggers-layout-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698