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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutDeprecatedFlexibleBox.cpp

Issue 1887933002: (CANCELED) Fix TextAutosizer not to scheduleRelayout() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: simplifiedLayout Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * This file is part of the layout object implementation for KHTML. 2 * This file is part of the layout object implementation for KHTML.
3 * 3 *
4 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 4 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
5 * (C) 1999 Antti Koivisto (koivisto@kde.org) 5 * (C) 1999 Antti Koivisto (koivisto@kde.org)
6 * Copyright (C) 2003 Apple Computer, Inc. 6 * Copyright (C) 2003 Apple Computer, Inc.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 214
215 LayoutUnit scrollbarWidth(intrinsicScrollbarLogicalWidth()); 215 LayoutUnit scrollbarWidth(intrinsicScrollbarLogicalWidth());
216 maxLogicalWidth += scrollbarWidth; 216 maxLogicalWidth += scrollbarWidth;
217 minLogicalWidth += scrollbarWidth; 217 minLogicalWidth += scrollbarWidth;
218 } 218 }
219 219
220 void LayoutDeprecatedFlexibleBox::layoutBlock(bool relayoutChildren) 220 void LayoutDeprecatedFlexibleBox::layoutBlock(bool relayoutChildren)
221 { 221 {
222 ASSERT(needsLayout()); 222 ASSERT(needsLayout());
223 223
224 if (!relayoutChildren && simplifiedLayout()) 224 SubtreeLayoutScope layouter(*this);
225
226 if (!relayoutChildren && simplifiedLayout(&layouter))
225 return; 227 return;
226 228
227 { 229 {
228 // LayoutState needs this deliberate scope to pop before paint invalidat ion. 230 // LayoutState needs this deliberate scope to pop before paint invalidat ion.
229 LayoutState state(*this, locationOffset()); 231 LayoutState state(*this, locationOffset());
230 232
231 LayoutSize previousSize = size(); 233 LayoutSize previousSize = size();
232 234
233 updateLogicalWidth(); 235 updateLogicalWidth();
234 updateLogicalHeight(); 236 updateLogicalHeight();
235 237
236 TextAutosizer::LayoutScope textAutosizerLayoutScope(this); 238 TextAutosizer::LayoutScope textAutosizerLayoutScope(this, &layouter);
237 239
238 if (previousSize != size() 240 if (previousSize != size()
239 || (parent()->isDeprecatedFlexibleBox() && parent()->style()->boxOri ent() == HORIZONTAL 241 || (parent()->isDeprecatedFlexibleBox() && parent()->style()->boxOri ent() == HORIZONTAL
240 && parent()->style()->boxAlign() == BSTRETCH)) 242 && parent()->style()->boxAlign() == BSTRETCH))
241 relayoutChildren = true; 243 relayoutChildren = true;
242 244
243 setHeight(LayoutUnit()); 245 setHeight(LayoutUnit());
244 246
245 m_stretchingChildren = false; 247 m_stretchingChildren = false;
246 248
(...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after
997 if (minHeight.isFixed() || minHeight.isAuto()) { 999 if (minHeight.isFixed() || minHeight.isAuto()) {
998 LayoutUnit minHeight(child->style()->minHeight().value()); 1000 LayoutUnit minHeight(child->style()->minHeight().value());
999 LayoutUnit height = contentHeightForChild(child); 1001 LayoutUnit height = contentHeightForChild(child);
1000 LayoutUnit allowedShrinkage = (minHeight - height).clampPositiveToZero() ; 1002 LayoutUnit allowedShrinkage = (minHeight - height).clampPositiveToZero() ;
1001 return allowedShrinkage; 1003 return allowedShrinkage;
1002 } 1004 }
1003 return LayoutUnit(); 1005 return LayoutUnit();
1004 } 1006 }
1005 1007
1006 } // namespace blink 1008 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698