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

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: Avoid overflow, since width is auto. Created 5 years, 5 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 1903 matching lines...) Expand 10 before | Expand all | Expand 10 after
1914 1914
1915 if (isOutOfFlowPositioned()) { 1915 if (isOutOfFlowPositioned()) {
1916 computePositionedLogicalWidth(computedValues); 1916 computePositionedLogicalWidth(computedValues);
1917 return; 1917 return;
1918 } 1918 }
1919 1919
1920 // The parent box is flexing us, so it has increased or decreased our 1920 // The parent box is flexing us, so it has increased or decreased our
1921 // width. Use the width from the style context. 1921 // width. Use the width from the style context.
1922 // FIXME: Account for writing-mode in flexible boxes. 1922 // FIXME: Account for writing-mode in flexible boxes.
1923 // https://bugs.webkit.org/show_bug.cgi?id=46418 1923 // https://bugs.webkit.org/show_bug.cgi?id=46418
1924 if (hasOverrideLogicalContentWidth() && parent()->isFlexibleBoxIncludingDepr ecated()) { 1924 if (hasOverrideLogicalContentWidth() && (parent()->isFlexibleBoxIncludingDep recated() || parent()->isLayoutGrid())) {
Manuel Rego 2015/07/13 12:40:07 This if here worries me as the code to manage "min
1925 computedValues.m_extent = overrideLogicalContentWidth() + borderAndPaddi ngLogicalWidth(); 1925 computedValues.m_extent = overrideLogicalContentWidth() + borderAndPaddi ngLogicalWidth();
1926 return; 1926 return;
1927 } 1927 }
1928 1928
1929 // FIXME: Account for writing-mode in flexible boxes. 1929 // FIXME: Account for writing-mode in flexible boxes.
1930 // https://bugs.webkit.org/show_bug.cgi?id=46418 1930 // https://bugs.webkit.org/show_bug.cgi?id=46418
1931 bool inVerticalBox = parent()->isDeprecatedFlexibleBox() && (parent()->style ()->boxOrient() == VERTICAL); 1931 bool inVerticalBox = parent()->isDeprecatedFlexibleBox() && (parent()->style ()->boxOrient() == VERTICAL);
1932 bool stretching = (parent()->style()->boxAlign() == BSTRETCH); 1932 bool stretching = (parent()->style()->boxAlign() == BSTRETCH);
1933 bool treatAsReplaced = shouldComputeSizeAsReplaced() && (!inVerticalBox || ! stretching); 1933 bool treatAsReplaced = shouldComputeSizeAsReplaced() && (!inVerticalBox || ! stretching);
1934 1934
(...skipping 2834 matching lines...) Expand 10 before | Expand all | Expand 10 after
4769 bool LayoutBox::canRenderBorderImage() const 4769 bool LayoutBox::canRenderBorderImage() const
4770 { 4770 {
4771 if (!style()->hasBorderDecoration()) 4771 if (!style()->hasBorderDecoration())
4772 return false; 4772 return false;
4773 4773
4774 StyleImage* borderImage = style()->borderImage().image(); 4774 StyleImage* borderImage = style()->borderImage().image();
4775 return borderImage && borderImage->canRender(*this, style()->effectiveZoom() ) && borderImage->isLoaded(); 4775 return borderImage && borderImage->canRender(*this, style()->effectiveZoom() ) && borderImage->isLoaded();
4776 } 4776 }
4777 4777
4778 } // namespace blink 4778 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698