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

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: Patch rebased and applied the suggested changes. Created 4 years, 9 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 1145 matching lines...) Expand 10 before | Expand all | Expand 10 after
1156 if (newLeft != box->logicalLeft()) 1156 if (newLeft != box->logicalLeft())
1157 layoutScope.setChildNeedsLayout(child); 1157 layoutScope.setChildNeedsLayout(child);
1158 } else if (hasStaticBlockPosition) { 1158 } else if (hasStaticBlockPosition) {
1159 LayoutUnit oldTop = box->logicalTop(); 1159 LayoutUnit oldTop = box->logicalTop();
1160 box->updateLogicalHeight(); 1160 box->updateLogicalHeight();
1161 if (box->logicalTop() != oldTop) 1161 if (box->logicalTop() != oldTop)
1162 layoutScope.setChildNeedsLayout(child); 1162 layoutScope.setChildNeedsLayout(child);
1163 } 1163 }
1164 } 1164 }
1165 1165
1166 LayoutUnit LayoutBlock::marginIntrinsicLogicalWidthForChild(LayoutBox& child) co nst 1166 LayoutUnit LayoutBlock::marginIntrinsicLogicalWidthForChild(const LayoutBox& chi ld) const
svillar 2016/03/23 11:02:00 Why?
jfernandez 2016/04/01 16:39:56 Because we use this function from assumedRowsBread
1167 { 1167 {
1168 // A margin has three types: fixed, percentage, and auto (variable). 1168 // A margin has three types: fixed, percentage, and auto (variable).
1169 // Auto and percentage margins become 0 when computing min/max width. 1169 // Auto and percentage margins become 0 when computing min/max width.
1170 // Fixed margins can be added in as is. 1170 // Fixed margins can be added in as is.
1171 Length marginLeft = child.style()->marginStartUsing(style()); 1171 Length marginLeft = child.style()->marginStartUsing(style());
1172 Length marginRight = child.style()->marginEndUsing(style()); 1172 Length marginRight = child.style()->marginEndUsing(style());
1173 LayoutUnit margin; 1173 LayoutUnit margin;
1174 if (marginLeft.isFixed()) 1174 if (marginLeft.isFixed())
1175 margin += marginLeft.value(); 1175 margin += marginLeft.value();
1176 if (marginRight.isFixed()) 1176 if (marginRight.isFixed())
(...skipping 1681 matching lines...) Expand 10 before | Expand all | Expand 10 after
2858 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout Object* obj) const 2858 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout Object* obj) const
2859 { 2859 {
2860 showLayoutObject(); 2860 showLayoutObject();
2861 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box()) 2861 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box())
2862 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1); 2862 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1);
2863 } 2863 }
2864 2864
2865 #endif 2865 #endif
2866 2866
2867 } // namespace blink 2867 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698