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

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: Added specific layout test. Created 6 years, 2 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) 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 2224 matching lines...) Expand 10 before | Expand all | Expand 10 after
2235 // https://bugs.webkit.org/show_bug.cgi?id=46418 2235 // https://bugs.webkit.org/show_bug.cgi?id=46418
2236 bool inHorizontalBox = parent()->isDeprecatedFlexibleBox() && parent()-> style()->boxOrient() == HORIZONTAL; 2236 bool inHorizontalBox = parent()->isDeprecatedFlexibleBox() && parent()-> style()->boxOrient() == HORIZONTAL;
2237 bool stretching = parent()->style()->boxAlign() == BSTRETCH; 2237 bool stretching = parent()->style()->boxAlign() == BSTRETCH;
2238 bool treatAsReplaced = shouldComputeSizeAsReplaced() && (!inHorizontalBo x || !stretching); 2238 bool treatAsReplaced = shouldComputeSizeAsReplaced() && (!inHorizontalBo x || !stretching);
2239 bool checkMinMaxHeight = false; 2239 bool checkMinMaxHeight = false;
2240 2240
2241 // The parent box is flexing us, so it has increased or decreased our he ight. We have to 2241 // The parent box is flexing us, so it has increased or decreased our he ight. We have to
2242 // grab our cached flexible height. 2242 // grab our cached flexible height.
2243 // FIXME: Account for block-flow in flexible boxes. 2243 // FIXME: Account for block-flow in flexible boxes.
2244 // https://bugs.webkit.org/show_bug.cgi?id=46418 2244 // https://bugs.webkit.org/show_bug.cgi?id=46418
2245 if (hasOverrideHeight() && parent()->isFlexibleBoxIncludingDeprecated()) 2245 if (hasOverrideHeight() && (parent()->isFlexibleBoxIncludingDeprecated() || parent()->isRenderGrid()))
2246 h = Length(overrideLogicalContentHeight(), Fixed); 2246 h = Length(overrideLogicalContentHeight(), Fixed);
2247 else if (treatAsReplaced) 2247 else if (treatAsReplaced)
2248 h = Length(computeReplacedLogicalHeight(), Fixed); 2248 h = Length(computeReplacedLogicalHeight(), Fixed);
2249 else { 2249 else {
2250 h = style()->logicalHeight(); 2250 h = style()->logicalHeight();
2251 checkMinMaxHeight = true; 2251 checkMinMaxHeight = true;
2252 } 2252 }
2253 2253
2254 // Block children of horizontal flexible boxes fill the height of the bo x. 2254 // Block children of horizontal flexible boxes fill the height of the bo x.
2255 // FIXME: Account for block-flow in flexible boxes. 2255 // FIXME: Account for block-flow in flexible boxes.
(...skipping 2272 matching lines...) Expand 10 before | Expand all | Expand 10 after
4528 ASSERT(style()->hasBackground() || style()->hasBoxDecorations()); 4528 ASSERT(style()->hasBackground() || style()->hasBoxDecorations());
4529 4529
4530 if (m_rareData && m_rareData->m_previousBorderBoxSize.width() != -1) 4530 if (m_rareData && m_rareData->m_previousBorderBoxSize.width() != -1)
4531 return m_rareData->m_previousBorderBoxSize; 4531 return m_rareData->m_previousBorderBoxSize;
4532 4532
4533 // We didn't save the old border box size because it was the same as the siz e of oldBounds. 4533 // We didn't save the old border box size because it was the same as the siz e of oldBounds.
4534 return previousBoundsSize; 4534 return previousBoundsSize;
4535 } 4535 }
4536 4536
4537 } // namespace blink 4537 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698