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

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

Issue 1848033004: Initialize child framesets when they become part of the parent frameset grid. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/fast/frames/expand-grid-with-zero-size-child-frameset-crash-expected.txt ('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/LayoutFrameSet.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutFrameSet.cpp b/third_party/WebKit/Source/core/layout/LayoutFrameSet.cpp
index 426970e19eeabccc72492a1cc540ebfb0a601524..be3aa68e1c81eb1b2fbf8b213ba43ab9999d977e 100644
--- a/third_party/WebKit/Source/core/layout/LayoutFrameSet.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutFrameSet.cpp
@@ -418,8 +418,11 @@ void LayoutFrameSet::positionFrames()
child->setLocation(position);
size.setWidth(LayoutUnit(m_cols.m_sizes[c]));
- // has to be resized and itself resize its contents
- if (size != child->size()) {
+ // If we have a new size, we need to resize and layout the child. If the size is 0x0 we
+ // also need to lay out, since this may mean that we're dealing with a child frameset
+ // that wasn't previously initialized properly, because it was previously hidden, but
+ // no longer is, because rows * cols may have increased.
+ if (size != child->size() || size.isEmpty()) {
mstensho (USE GERRIT) 2016/04/01 12:21:47 This is the simplest fix that I can think of. A sa
child->setSize(size);
child->setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationReason::SizeChanged);
child->layout();
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/frames/expand-grid-with-zero-size-child-frameset-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698