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

Side by Side Diff: Source/core/rendering/RenderBox.cpp

Issue 613273002: [CSS Grid Layout] Stretch value for align and justify properties. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed some layout tests. Created 6 years, 1 month 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
« no previous file with comments | « Source/core/css/resolver/StyleAdjuster.cpp ('k') | Source/core/rendering/RenderFlexibleBox.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 2151 matching lines...) Expand 10 before | Expand all | Expand 10 after
2162 // https://bugs.webkit.org/show_bug.cgi?id=46418 2162 // https://bugs.webkit.org/show_bug.cgi?id=46418
2163 bool inHorizontalBox = parent()->isDeprecatedFlexibleBox() && parent()-> style()->boxOrient() == HORIZONTAL; 2163 bool inHorizontalBox = parent()->isDeprecatedFlexibleBox() && parent()-> style()->boxOrient() == HORIZONTAL;
2164 bool stretching = parent()->style()->boxAlign() == BSTRETCH; 2164 bool stretching = parent()->style()->boxAlign() == BSTRETCH;
2165 bool treatAsReplaced = shouldComputeSizeAsReplaced() && (!inHorizontalBo x || !stretching); 2165 bool treatAsReplaced = shouldComputeSizeAsReplaced() && (!inHorizontalBo x || !stretching);
2166 bool checkMinMaxHeight = false; 2166 bool checkMinMaxHeight = false;
2167 2167
2168 // The parent box is flexing us, so it has increased or decreased our he ight. We have to 2168 // The parent box is flexing us, so it has increased or decreased our he ight. We have to
2169 // grab our cached flexible height. 2169 // grab our cached flexible height.
2170 // FIXME: Account for block-flow in flexible boxes. 2170 // FIXME: Account for block-flow in flexible boxes.
2171 // https://bugs.webkit.org/show_bug.cgi?id=46418 2171 // https://bugs.webkit.org/show_bug.cgi?id=46418
2172 if (hasOverrideHeight() && parent()->isFlexibleBoxIncludingDeprecated()) 2172 if (hasOverrideHeight() && (parent()->isFlexibleBoxIncludingDeprecated() || parent()->isRenderGrid()))
2173 h = Length(overrideLogicalContentHeight(), Fixed); 2173 h = Length(overrideLogicalContentHeight(), Fixed);
2174 else if (treatAsReplaced) 2174 else if (treatAsReplaced)
2175 h = Length(computeReplacedLogicalHeight(), Fixed); 2175 h = Length(computeReplacedLogicalHeight(), Fixed);
2176 else { 2176 else {
2177 h = style()->logicalHeight(); 2177 h = style()->logicalHeight();
2178 checkMinMaxHeight = true; 2178 checkMinMaxHeight = true;
2179 } 2179 }
2180 2180
2181 // Block children of horizontal flexible boxes fill the height of the bo x. 2181 // Block children of horizontal flexible boxes fill the height of the bo x.
2182 // FIXME: Account for block-flow in flexible boxes. 2182 // FIXME: Account for block-flow in flexible boxes.
(...skipping 2252 matching lines...) Expand 10 before | Expand all | Expand 10 after
4435 4435
4436 setLogicalTop(oldLogicalTop); 4436 setLogicalTop(oldLogicalTop);
4437 setLogicalWidth(oldLogicalWidth); 4437 setLogicalWidth(oldLogicalWidth);
4438 setMarginLeft(oldMarginLeft); 4438 setMarginLeft(oldMarginLeft);
4439 setMarginRight(oldMarginRight); 4439 setMarginRight(oldMarginRight);
4440 4440
4441 return borderBox; 4441 return borderBox;
4442 } 4442 }
4443 4443
4444 } // namespace blink 4444 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/css/resolver/StyleAdjuster.cpp ('k') | Source/core/rendering/RenderFlexibleBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698