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

Unified Diff: third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp

Issue 1811753003: Set m_{width,height}AvailableToChildrenChanged when scrollbars appear (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: abspos Created 4 years, 9 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/css3/flexbox/overflow-auto-dynamic-changes-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/paint/PaintLayerScrollableArea.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
index 656b4effafa988901318f24c2df30272ccbf154b..b79cdb52ae4bc24963782bc7a981484cbaa5a080 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
@@ -682,6 +682,17 @@ bool PaintLayerScrollableArea::updateAfterLayout(SubtreeLayoutScope* delayedLayo
m_inOverflowRelayout = true;
if (delayedLayoutScope) {
delayedLayoutScope->setNeedsLayout(&box(), LayoutInvalidationReason::ScrollbarChanged);
+ // Since we can't pass true to layoutBlock to force relaying out the children, mark them explicitly.
+ // They do have to be laid out again because their available width has now changed.
+ for (LayoutObject* child = box().slowFirstChild(); child; child = child->nextSibling())
+ delayedLayoutScope->setNeedsLayout(child, LayoutInvalidationReason::ScrollbarChanged);
+ TrackedLayoutBoxListHashSet* positionedDescendants = box().isLayoutBlock() ? toLayoutBlock(box()).positionedObjects() : 0;
mstensho (USE GERRIT) 2016/03/17 21:23:36 0 -> nullptr
+ if (positionedDescendants) {
+ for (auto* positionedObject : *positionedDescendants) {
+ delayedLayoutScope->setNeedsLayout(positionedObject, LayoutInvalidationReason::ScrollbarChanged);
+ }
mstensho (USE GERRIT) 2016/03/17 21:23:36 Superfluous braces.
+ }
+
didMarkForDelayedLayout = true;
} else {
SubtreeLayoutScope layoutScope(box());
« no previous file with comments | « third_party/WebKit/LayoutTests/css3/flexbox/overflow-auto-dynamic-changes-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698