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

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

Issue 1653673002: Even more explicit LayoutUnit conversion (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@moarConstructors
Patch Set: address comments Created 4 years, 10 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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 updateLogicalWidth(); 232 updateLogicalWidth();
233 updateLogicalHeight(); 233 updateLogicalHeight();
234 234
235 TextAutosizer::LayoutScope textAutosizerLayoutScope(this); 235 TextAutosizer::LayoutScope textAutosizerLayoutScope(this);
236 236
237 if (previousSize != size() 237 if (previousSize != size()
238 || (parent()->isDeprecatedFlexibleBox() && parent()->style()->boxOri ent() == HORIZONTAL 238 || (parent()->isDeprecatedFlexibleBox() && parent()->style()->boxOri ent() == HORIZONTAL
239 && parent()->style()->boxAlign() == BSTRETCH)) 239 && parent()->style()->boxAlign() == BSTRETCH))
240 relayoutChildren = true; 240 relayoutChildren = true;
241 241
242 setHeight(0); 242 setHeight(LayoutUnit());
243 243
244 m_stretchingChildren = false; 244 m_stretchingChildren = false;
245 245
246 if (isHorizontal()) 246 if (isHorizontal())
247 layoutHorizontalBox(relayoutChildren); 247 layoutHorizontalBox(relayoutChildren);
248 else 248 else
249 layoutVerticalBox(relayoutChildren); 249 layoutVerticalBox(relayoutChildren);
250 250
251 LayoutUnit oldClientAfterEdge = clientLogicalBottom(); 251 LayoutUnit oldClientAfterEdge = clientLogicalBottom();
252 updateLogicalHeight(); 252 updateLogicalHeight();
(...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after
996 if (minHeight.isFixed() || minHeight.isAuto()) { 996 if (minHeight.isFixed() || minHeight.isAuto()) {
997 LayoutUnit minHeight(child->style()->minHeight().value()); 997 LayoutUnit minHeight(child->style()->minHeight().value());
998 LayoutUnit height = contentHeightForChild(child); 998 LayoutUnit height = contentHeightForChild(child);
999 LayoutUnit allowedShrinkage = (minHeight - height).clampPositiveToZero() ; 999 LayoutUnit allowedShrinkage = (minHeight - height).clampPositiveToZero() ;
1000 return allowedShrinkage; 1000 return allowedShrinkage;
1001 } 1001 }
1002 return LayoutUnit(); 1002 return LayoutUnit();
1003 } 1003 }
1004 1004
1005 } // namespace blink 1005 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698