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

Side by Side Diff: Source/WebCore/rendering/RenderGrid.cpp

Issue 13674002: Support intrinsic values for height, min-height and max-height (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: CSS table tests Created 7 years, 8 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) 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 } 310 }
311 311
312 ASSERT(trackLength.isMinContent() || trackLength.isMaxContent() || trackLeng th.isAuto()); 312 ASSERT(trackLength.isMinContent() || trackLength.isMaxContent() || trackLeng th.isAuto());
313 return infinity; 313 return infinity;
314 } 314 }
315 315
316 LayoutUnit RenderGrid::computeUsedBreadthOfSpecifiedLength(TrackSizingDirection direction, const Length& trackLength) const 316 LayoutUnit RenderGrid::computeUsedBreadthOfSpecifiedLength(TrackSizingDirection direction, const Length& trackLength) const
317 { 317 {
318 // FIXME: We still need to support calc() here (https://webkit.org/b/103761) . 318 // FIXME: We still need to support calc() here (https://webkit.org/b/103761) .
319 ASSERT(trackLength.isFixed() || trackLength.isPercent() || trackLength.isVie wportPercentage()); 319 ASSERT(trackLength.isFixed() || trackLength.isPercent() || trackLength.isVie wportPercentage());
320 return valueForLength(trackLength, direction == ForColumns ? logicalWidth() : computeContentLogicalHeight(style()->logicalHeight()), view()); 320 // FIXME: The -1 here should be replaced by whatever the intrinsic height of the grid is.
321 return valueForLength(trackLength, direction == ForColumns ? logicalWidth() : computeContentLogicalHeight(style()->logicalHeight(), -1), view());
321 } 322 }
322 323
323 const GridTrackSize& RenderGrid::gridTrackSize(TrackSizingDirection direction, s ize_t i) const 324 const GridTrackSize& RenderGrid::gridTrackSize(TrackSizingDirection direction, s ize_t i) const
324 { 325 {
325 const Vector<GridTrackSize>& trackStyles = (direction == ForColumns) ? style ()->gridColumns() : style()->gridRows(); 326 const Vector<GridTrackSize>& trackStyles = (direction == ForColumns) ? style ()->gridColumns() : style()->gridRows();
326 if (i >= trackStyles.size()) 327 if (i >= trackStyles.size())
327 return (direction == ForColumns) ? style()->gridAutoColumns() : style()- >gridAutoRows(); 328 return (direction == ForColumns) ? style()->gridAutoColumns() : style()- >gridAutoRows();
328 329
329 return trackStyles[i]; 330 return trackStyles[i];
330 } 331 }
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
832 if (isOutOfFlowPositioned()) 833 if (isOutOfFlowPositioned())
833 return "RenderGrid (positioned)"; 834 return "RenderGrid (positioned)";
834 if (isAnonymous()) 835 if (isAnonymous())
835 return "RenderGrid (generated)"; 836 return "RenderGrid (generated)";
836 if (isRelPositioned()) 837 if (isRelPositioned())
837 return "RenderGrid (relative positioned)"; 838 return "RenderGrid (relative positioned)";
838 return "RenderGrid"; 839 return "RenderGrid";
839 } 840 }
840 841
841 } // namespace WebCore 842 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/rendering/RenderFlexibleBox.cpp ('k') | Source/WebCore/rendering/RenderReplaced.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698