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

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

Issue 13992003: Add support for parsing <grid-line> that includes a 'span' (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 | Annotate | Revision Log
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 755 matching lines...) Expand 10 before | Expand all | Expand 10 after
766 return resolvedPosition; 766 return resolvedPosition;
767 767
768 const size_t endOfTrack = (side == EndSide) ? gridColumnCount() - 1 : gr idRowCount() - 1; 768 const size_t endOfTrack = (side == EndSide) ? gridColumnCount() - 1 : gr idRowCount() - 1;
769 ASSERT(endOfTrack >= resolvedPosition); 769 ASSERT(endOfTrack >= resolvedPosition);
770 return endOfTrack - resolvedPosition; 770 return endOfTrack - resolvedPosition;
771 } 771 }
772 case AutoPosition: 772 case AutoPosition:
773 // 'auto' depends on the opposite position for resolution (e.g. grid-row : auto / 1). 773 // 'auto' depends on the opposite position for resolution (e.g. grid-row : auto / 1).
774 ASSERT_NOT_REACHED(); 774 ASSERT_NOT_REACHED();
775 return 0; 775 return 0;
776 case SpanPosition:
777 // FIXME: Handle span positions (crbug.com/229713).
778 ASSERT_NOT_REACHED();
779 return 0;
776 } 780 }
777 ASSERT_NOT_REACHED(); 781 ASSERT_NOT_REACHED();
778 return 0; 782 return 0;
779 } 783 }
780 784
781 LayoutUnit RenderGrid::gridAreaBreadthForChild(const RenderBox* child, TrackSizi ngDirection direction, const Vector<GridTrack>& tracks) const 785 LayoutUnit RenderGrid::gridAreaBreadthForChild(const RenderBox* child, TrackSizi ngDirection direction, const Vector<GridTrack>& tracks) const
782 { 786 {
783 const GridCoordinate& coordinate = cachedGridCoordinate(child); 787 const GridCoordinate& coordinate = cachedGridCoordinate(child);
784 const GridSpan& span = (direction == ForColumns) ? coordinate.columns : coor dinate.rows; 788 const GridSpan& span = (direction == ForColumns) ? coordinate.columns : coor dinate.rows;
785 LayoutUnit gridAreaBreadth = 0; 789 LayoutUnit gridAreaBreadth = 0;
(...skipping 25 matching lines...) Expand all
811 if (isOutOfFlowPositioned()) 815 if (isOutOfFlowPositioned())
812 return "RenderGrid (positioned)"; 816 return "RenderGrid (positioned)";
813 if (isAnonymous()) 817 if (isAnonymous())
814 return "RenderGrid (generated)"; 818 return "RenderGrid (generated)";
815 if (isRelPositioned()) 819 if (isRelPositioned())
816 return "RenderGrid (relative positioned)"; 820 return "RenderGrid (relative positioned)";
817 return "RenderGrid"; 821 return "RenderGrid";
818 } 822 }
819 823
820 } // namespace WebCore 824 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698