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

Side by Side Diff: Source/core/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: Fixed the change to match the specification 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
« no previous file with comments | « Source/core/css/StyleResolver.cpp ('k') | Source/core/rendering/style/GridPosition.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 777 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 // Per http://lists.w3.org/Archives/Public/www-style/2013Mar/0589.html, we clamp negative value to the first line. 788 // Per http://lists.w3.org/Archives/Public/www-style/2013Mar/0589.html, we clamp negative value to the first line.
789 if (endOfTrack < resolvedPosition) 789 if (endOfTrack < resolvedPosition)
790 return 0; 790 return 0;
791 791
792 return endOfTrack - resolvedPosition; 792 return endOfTrack - resolvedPosition;
793 } 793 }
794 case AutoPosition: 794 case AutoPosition:
795 // 'auto' depends on the opposite position for resolution (e.g. grid-row : auto / 1). 795 // 'auto' depends on the opposite position for resolution (e.g. grid-row : auto / 1).
796 ASSERT_NOT_REACHED(); 796 ASSERT_NOT_REACHED();
797 return 0; 797 return 0;
798 case SpanPosition:
799 // FIXME: Handle span positions (crbug.com/229713).
800 ASSERT_NOT_REACHED();
801 return 0;
798 } 802 }
799 ASSERT_NOT_REACHED(); 803 ASSERT_NOT_REACHED();
800 return 0; 804 return 0;
801 } 805 }
802 806
803 LayoutUnit RenderGrid::gridAreaBreadthForChild(const RenderBox* child, TrackSizi ngDirection direction, const Vector<GridTrack>& tracks) const 807 LayoutUnit RenderGrid::gridAreaBreadthForChild(const RenderBox* child, TrackSizi ngDirection direction, const Vector<GridTrack>& tracks) const
804 { 808 {
805 const GridCoordinate& coordinate = cachedGridCoordinate(child); 809 const GridCoordinate& coordinate = cachedGridCoordinate(child);
806 const GridSpan& span = (direction == ForColumns) ? coordinate.columns : coor dinate.rows; 810 const GridSpan& span = (direction == ForColumns) ? coordinate.columns : coor dinate.rows;
807 LayoutUnit gridAreaBreadth = 0; 811 LayoutUnit gridAreaBreadth = 0;
(...skipping 25 matching lines...) Expand all
833 if (isOutOfFlowPositioned()) 837 if (isOutOfFlowPositioned())
834 return "RenderGrid (positioned)"; 838 return "RenderGrid (positioned)";
835 if (isAnonymous()) 839 if (isAnonymous())
836 return "RenderGrid (generated)"; 840 return "RenderGrid (generated)";
837 if (isRelPositioned()) 841 if (isRelPositioned())
838 return "RenderGrid (relative positioned)"; 842 return "RenderGrid (relative positioned)";
839 return "RenderGrid"; 843 return "RenderGrid";
840 } 844 }
841 845
842 } // namespace WebCore 846 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/css/StyleResolver.cpp ('k') | Source/core/rendering/style/GridPosition.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698