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

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

Issue 2549353002: Implement PaintLayer::scrollsWithViewport for SPv2. (Closed)
Patch Set: none Created 4 years 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/layout/LayoutBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
index fc48cab3e05c766569f25454af712a7460b27e11..ed57b14281abc0817e7f64ea341d6833c4d2e6bb 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -673,10 +673,10 @@ void LayoutBox::scrollRectToVisible(const LayoutRect& rect,
}
}
- // If we are fixed-position and scroll with the viewport, it is useless to
+ // If we are fixed-position and stick to the viewport, it is useless to
// scroll the parent.
if (style()->position() == FixedPosition && hasLayer() &&
- layer()->scrollsWithViewport()) {
+ layer()->sticksToViewport()) {
return;
}
@@ -1022,12 +1022,14 @@ IntSize LayoutBox::calculateAutoscrollDirection(
}
LayoutBox* LayoutBox::findAutoscrollable(LayoutObject* layoutObject) {
+ layoutObject->frameView()->updateAllLifecyclePhasesExceptPaint();
+
while (
layoutObject &&
!(layoutObject->isBox() && toLayoutBox(layoutObject)->canAutoscroll())) {
// Do not start autoscroll when the node is inside a fixed-position element.
if (layoutObject->isBox() && toLayoutBox(layoutObject)->hasLayer() &&
- toLayoutBox(layoutObject)->layer()->scrollsWithViewport()) {
+ toLayoutBox(layoutObject)->layer()->sticksToViewport()) {
return nullptr;
}

Powered by Google App Engine
This is Rietveld 408576698