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

Side by Side Diff: Source/core/layout/LayoutBox.cpp

Issue 1228983003: [CSS Grid Layout] Do not stretch always grid items with auto width (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Applied suggested changes. Created 5 years, 4 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 1916 matching lines...) Expand 10 before | Expand all | Expand 10 after
1927 1927
1928 if (isOutOfFlowPositioned()) { 1928 if (isOutOfFlowPositioned()) {
1929 computePositionedLogicalWidth(computedValues); 1929 computePositionedLogicalWidth(computedValues);
1930 return; 1930 return;
1931 } 1931 }
1932 1932
1933 // The parent box is flexing us, so it has increased or decreased our 1933 // The parent box is flexing us, so it has increased or decreased our
1934 // width. Use the width from the style context. 1934 // width. Use the width from the style context.
1935 // FIXME: Account for writing-mode in flexible boxes. 1935 // FIXME: Account for writing-mode in flexible boxes.
1936 // https://bugs.webkit.org/show_bug.cgi?id=46418 1936 // https://bugs.webkit.org/show_bug.cgi?id=46418
1937 if (hasOverrideLogicalContentWidth() && parent()->isFlexibleBoxIncludingDepr ecated()) { 1937 if (hasOverrideLogicalContentWidth() && (parent()->isFlexibleBoxIncludingDep recated() || parent()->isLayoutGrid())) {
1938 computedValues.m_extent = overrideLogicalContentWidth() + borderAndPaddi ngLogicalWidth(); 1938 computedValues.m_extent = overrideLogicalContentWidth() + borderAndPaddi ngLogicalWidth();
1939 return; 1939 return;
1940 } 1940 }
1941 1941
1942 // FIXME: Account for writing-mode in flexible boxes. 1942 // FIXME: Account for writing-mode in flexible boxes.
1943 // https://bugs.webkit.org/show_bug.cgi?id=46418 1943 // https://bugs.webkit.org/show_bug.cgi?id=46418
1944 bool inVerticalBox = parent()->isDeprecatedFlexibleBox() && (parent()->style ()->boxOrient() == VERTICAL); 1944 bool inVerticalBox = parent()->isDeprecatedFlexibleBox() && (parent()->style ()->boxOrient() == VERTICAL);
1945 bool stretching = (parent()->style()->boxAlign() == BSTRETCH); 1945 bool stretching = (parent()->style()->boxAlign() == BSTRETCH);
1946 bool treatAsReplaced = shouldComputeSizeAsReplaced() && (!inVerticalBox || ! stretching); 1946 bool treatAsReplaced = shouldComputeSizeAsReplaced() && (!inVerticalBox || ! stretching);
1947 1947
(...skipping 2838 matching lines...) Expand 10 before | Expand all | Expand 10 after
4786 StyleImage* borderImage = style()->borderImage().image(); 4786 StyleImage* borderImage = style()->borderImage().image();
4787 return borderImage && borderImage->canRender(*this, style()->effectiveZoom() ) && borderImage->isLoaded(); 4787 return borderImage && borderImage->canRender(*this, style()->effectiveZoom() ) && borderImage->isLoaded();
4788 } 4788 }
4789 4789
4790 ShapeOutsideInfo* LayoutBox::shapeOutsideInfo() const 4790 ShapeOutsideInfo* LayoutBox::shapeOutsideInfo() const
4791 { 4791 {
4792 return ShapeOutsideInfo::isEnabledFor(*this) ? ShapeOutsideInfo::info(*this) : nullptr; 4792 return ShapeOutsideInfo::isEnabledFor(*this) ? ShapeOutsideInfo::info(*this) : nullptr;
4793 } 4793 }
4794 4794
4795 } // namespace blink 4795 } // namespace blink
OLDNEW
« no previous file with comments | « LayoutTests/fast/css-grid-layout/relayout-justify-self-changed-expected.txt ('k') | Source/core/layout/LayoutGrid.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698