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

Unified Diff: third_party/WebKit/Source/core/input/ScrollManager.cpp

Issue 2365793002: Fix scroll chaining for non-descendants of root scroller. (Closed)
Patch Set: Rebase and remove hack 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
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/scrolling/scroll-non-descendant-of-root-scroller.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/input/ScrollManager.cpp
diff --git a/third_party/WebKit/Source/core/input/ScrollManager.cpp b/third_party/WebKit/Source/core/input/ScrollManager.cpp
index c3a69467f399cc7b7e8f532415f8b6b2bd3e8a35..e9d505261154e50c01fa325a65bb1d0dc356828a 100644
--- a/third_party/WebKit/Source/core/input/ScrollManager.cpp
+++ b/third_party/WebKit/Source/core/input/ScrollManager.cpp
@@ -83,6 +83,7 @@ void ScrollManager::recomputeScrollChain(const Node& startNode,
DCHECK(startNode.layoutObject());
LayoutBox* curBox = startNode.layoutObject()->enclosingBox();
+ Element* documentElement = m_frame->document()->documentElement();
// Scrolling propagates along the containing block chain and ends at the
// RootScroller element. The RootScroller element will have a custom
@@ -98,13 +99,13 @@ void ScrollManager::recomputeScrollChain(const Node& startNode,
// In normal circumastances, the documentElement will be the root
// scroller but the documentElement itself isn't a containing block,
// that'll be the document node rather than the element.
- curElement = m_frame->document()->documentElement();
- DCHECK(!curElement || isEffectiveRootScroller(*curElement));
+ curElement = documentElement;
}
if (curElement) {
scrollChain.push_front(DOMNodeIds::idForNode(curElement));
- if (isEffectiveRootScroller(*curElement))
+ if (isEffectiveRootScroller(*curElement) ||
+ curElement->isSameNode(documentElement))
break;
}
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/scrolling/scroll-non-descendant-of-root-scroller.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698