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

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

Issue 815833005: [css-grid] Handle min-content/max-content with orthogonal flows (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Comments and assertions to make the code clearer. 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 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2007 David Smith (catfish.man@gmail.com) 4 * (C) 2007 David Smith (catfish.man@gmail.com)
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
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 594 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 if (newLeft != box->logicalLeft()) 605 if (newLeft != box->logicalLeft())
606 layoutScope.setChildNeedsLayout(child); 606 layoutScope.setChildNeedsLayout(child);
607 } else if (hasStaticBlockPosition) { 607 } else if (hasStaticBlockPosition) {
608 LayoutUnit oldTop = box->logicalTop(); 608 LayoutUnit oldTop = box->logicalTop();
609 box->updateLogicalHeight(); 609 box->updateLogicalHeight();
610 if (box->logicalTop() != oldTop) 610 if (box->logicalTop() != oldTop)
611 layoutScope.setChildNeedsLayout(child); 611 layoutScope.setChildNeedsLayout(child);
612 } 612 }
613 } 613 }
614 614
615 LayoutUnit LayoutBlock::marginIntrinsicLogicalWidthForChild(LayoutBox& child) co nst 615 LayoutUnit LayoutBlock::marginIntrinsicLogicalWidthForChild(const LayoutBox& chi ld) const
616 { 616 {
617 // A margin has three types: fixed, percentage, and auto (variable). 617 // A margin has three types: fixed, percentage, and auto (variable).
618 // Auto and percentage margins become 0 when computing min/max width. 618 // Auto and percentage margins become 0 when computing min/max width.
619 // Fixed margins can be added in as is. 619 // Fixed margins can be added in as is.
620 Length marginLeft = child.style()->marginStartUsing(style()); 620 Length marginLeft = child.style()->marginStartUsing(style());
621 Length marginRight = child.style()->marginEndUsing(style()); 621 Length marginRight = child.style()->marginEndUsing(style());
622 LayoutUnit margin; 622 LayoutUnit margin;
623 if (marginLeft.isFixed()) 623 if (marginLeft.isFixed())
624 margin += marginLeft.value(); 624 margin += marginLeft.value();
625 if (marginRight.isFixed()) 625 if (marginRight.isFixed())
(...skipping 1215 matching lines...) Expand 10 before | Expand all | Expand 10 after
1841 for (TrackedLayoutBoxListHashSet::const_iterator it = positionedDescenda ntSet->begin(); it != end; ++it) { 1841 for (TrackedLayoutBoxListHashSet::const_iterator it = positionedDescenda ntSet->begin(); it != end; ++it) {
1842 LayoutBox* currBox = *it; 1842 LayoutBox* currBox = *it;
1843 ASSERT(!currBox->needsLayout()); 1843 ASSERT(!currBox->needsLayout());
1844 } 1844 }
1845 } 1845 }
1846 } 1846 }
1847 1847
1848 #endif 1848 #endif
1849 1849
1850 } // namespace blink 1850 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlock.h ('k') | third_party/WebKit/Source/core/layout/LayoutGrid.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698