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

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

Issue 1980103002: Include auto vertical scrollbar in intrinsicScrollbarLogicalWidth. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Restore list box height calculation, fix scrollbar width factor Created 4 years, 6 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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 continue; 319 continue;
320 320
321 LayoutUnit margin = marginWidthForChild(child); 321 LayoutUnit margin = marginWidthForChild(child);
322 minLogicalWidth += child->minPreferredLogicalWidth() + margin; 322 minLogicalWidth += child->minPreferredLogicalWidth() + margin;
323 maxLogicalWidth += child->maxPreferredLogicalWidth() + margin; 323 maxLogicalWidth += child->maxPreferredLogicalWidth() + margin;
324 } 324 }
325 } 325 }
326 326
327 maxLogicalWidth = std::max(minLogicalWidth, maxLogicalWidth); 327 maxLogicalWidth = std::max(minLogicalWidth, maxLogicalWidth);
328 328
329 LayoutUnit scrollbarWidth(intrinsicScrollbarLogicalWidth()); 329 LayoutUnit scrollbarWidth(scrollbarLogicalWidth());
330 maxLogicalWidth += scrollbarWidth; 330 maxLogicalWidth += scrollbarWidth;
331 minLogicalWidth += scrollbarWidth; 331 minLogicalWidth += scrollbarWidth;
332 } 332 }
333 333
334 void LayoutDeprecatedFlexibleBox::layoutBlock(bool relayoutChildren) 334 void LayoutDeprecatedFlexibleBox::layoutBlock(bool relayoutChildren)
335 { 335 {
336 ASSERT(needsLayout()); 336 ASSERT(needsLayout());
337 337
338 if (!relayoutChildren && simplifiedLayout()) 338 if (!relayoutChildren && simplifiedLayout())
339 return; 339 return;
(...skipping 772 matching lines...) Expand 10 before | Expand all | Expand 10 after
1112 if (minHeight.isFixed() || minHeight.isAuto()) { 1112 if (minHeight.isFixed() || minHeight.isAuto()) {
1113 LayoutUnit minHeight(child->style()->minHeight().value()); 1113 LayoutUnit minHeight(child->style()->minHeight().value());
1114 LayoutUnit height = contentHeightForChild(child); 1114 LayoutUnit height = contentHeightForChild(child);
1115 LayoutUnit allowedShrinkage = (minHeight - height).clampPositiveToZero() ; 1115 LayoutUnit allowedShrinkage = (minHeight - height).clampPositiveToZero() ;
1116 return allowedShrinkage; 1116 return allowedShrinkage;
1117 } 1117 }
1118 return LayoutUnit(); 1118 return LayoutUnit();
1119 } 1119 }
1120 1120
1121 } // namespace blink 1121 } // 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