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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBox.cpp

Issue 2488563003: Scroll sticky elements into view. (Closed)
Patch Set: Created 4 years, 1 month 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/scroll-behavior/scroll-into-view-sticky-expected.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/layout/LayoutBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
index 56800093787b87b15d1a160963068475c3f7b939..2fcb719cf2391cb6314855bb25ed5829f89577b8 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -673,9 +673,12 @@ void LayoutBox::scrollRectToVisible(const LayoutRect& rect,
}
}
- // If we are fixed-position, it is useless to scroll the parent.
- if (hasLayer() && layer()->scrollsWithViewport())
+ // If we are fixed-position and scroll with the viewport, it is useless to
+ // scroll the parent.
+ if (style()->position() == FixedPosition && hasLayer() &&
+ layer()->scrollsWithViewport()) {
return;
+ }
if (frame()->page()->autoscrollController().autoscrollInProgress())
parentBox = enclosingScrollableBox();
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/scroll-behavior/scroll-into-view-sticky-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698