OLD | NEW |
---|---|
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 852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
863 // the grid breadth to account for 'box-sizing'. | 863 // the grid breadth to account for 'box-sizing'. |
864 LayoutUnit oldOverrideContainingBlockContentLogicalWidth = child->hasOve rrideContainingBlockLogicalWidth() ? child->overrideContainingBlockContentLogica lWidth() : LayoutUnit(); | 864 LayoutUnit oldOverrideContainingBlockContentLogicalWidth = child->hasOve rrideContainingBlockLogicalWidth() ? child->overrideContainingBlockContentLogica lWidth() : LayoutUnit(); |
865 LayoutUnit oldOverrideContainingBlockContentLogicalHeight = child->hasOv errideContainingBlockLogicalHeight() ? child->overrideContainingBlockContentLogi calHeight() : LayoutUnit(); | 865 LayoutUnit oldOverrideContainingBlockContentLogicalHeight = child->hasOv errideContainingBlockLogicalHeight() ? child->overrideContainingBlockContentLogi calHeight() : LayoutUnit(); |
866 | 866 |
867 // FIXME: For children in a content sized track, we clear the overrideCo ntainingBlockContentLogicalHeight | 867 // FIXME: For children in a content sized track, we clear the overrideCo ntainingBlockContentLogicalHeight |
868 // in minContentForChild / maxContentForChild which means that we will a lways relayout the child. | 868 // in minContentForChild / maxContentForChild which means that we will a lways relayout the child. |
869 LayoutUnit overrideContainingBlockContentLogicalWidth = gridAreaBreadthF orChild(child, ForColumns, columnTracks); | 869 LayoutUnit overrideContainingBlockContentLogicalWidth = gridAreaBreadthF orChild(child, ForColumns, columnTracks); |
870 LayoutUnit overrideContainingBlockContentLogicalHeight = gridAreaBreadth ForChild(child, ForRows, rowTracks); | 870 LayoutUnit overrideContainingBlockContentLogicalHeight = gridAreaBreadth ForChild(child, ForRows, rowTracks); |
871 | 871 |
872 SubtreeLayoutScope layoutScope(child); | 872 SubtreeLayoutScope layoutScope(child); |
873 if (oldOverrideContainingBlockContentLogicalWidth != overrideContainingB lockContentLogicalWidth || oldOverrideContainingBlockContentLogicalHeight != ove rrideContainingBlockContentLogicalHeight) | 873 if (oldOverrideContainingBlockContentLogicalWidth != overrideContainingB lockContentLogicalWidth || (child->hasRelativeLogicalHeight() && oldOverrideCont ainingBlockContentLogicalHeight != overrideContainingBlockContentLogicalHeight)) |
Julien - ping for review
2013/09/11 00:06:05
I went ahead and switched to RenderBox::hasRelativ
| |
874 layoutScope.setNeedsLayout(child); | 874 layoutScope.setNeedsLayout(child); |
875 | 875 |
876 child->setOverrideContainingBlockContentLogicalWidth(overrideContainingB lockContentLogicalWidth); | 876 child->setOverrideContainingBlockContentLogicalWidth(overrideContainingB lockContentLogicalWidth); |
877 child->setOverrideContainingBlockContentLogicalHeight(overrideContaining BlockContentLogicalHeight); | 877 child->setOverrideContainingBlockContentLogicalHeight(overrideContaining BlockContentLogicalHeight); |
878 | 878 |
879 LayoutRect oldChildRect = child->frameRect(); | 879 LayoutRect oldChildRect = child->frameRect(); |
880 | 880 |
881 // FIXME: Grid items should stretch to fill their cells. Once we | 881 // FIXME: Grid items should stretch to fill their cells. Once we |
882 // implement grid-{column,row}-align, we can also shrink to fit. For | 882 // implement grid-{column,row}-align, we can also shrink to fit. For |
883 // now, just size as if we were a regular child. | 883 // now, just size as if we were a regular child. |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1152 if (isOutOfFlowPositioned()) | 1152 if (isOutOfFlowPositioned()) |
1153 return "RenderGrid (positioned)"; | 1153 return "RenderGrid (positioned)"; |
1154 if (isAnonymous()) | 1154 if (isAnonymous()) |
1155 return "RenderGrid (generated)"; | 1155 return "RenderGrid (generated)"; |
1156 if (isRelPositioned()) | 1156 if (isRelPositioned()) |
1157 return "RenderGrid (relative positioned)"; | 1157 return "RenderGrid (relative positioned)"; |
1158 return "RenderGrid"; | 1158 return "RenderGrid"; |
1159 } | 1159 } |
1160 | 1160 |
1161 } // namespace WebCore | 1161 } // namespace WebCore |
OLD | NEW |