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 701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
712 | 712 |
713 RenderGrid::GridSpan RenderGrid::resolveGridPositionsFromAutoPlacementPosition(c
onst RenderBox*, TrackSizingDirection, size_t initialPosition) const | 713 RenderGrid::GridSpan RenderGrid::resolveGridPositionsFromAutoPlacementPosition(c
onst RenderBox*, TrackSizingDirection, size_t initialPosition) const |
714 { | 714 { |
715 // FIXME: We don't support spanning with auto positions yet. Once we do, thi
s is wrong. Also we should make | 715 // FIXME: We don't support spanning with auto positions yet. Once we do, thi
s is wrong. Also we should make |
716 // sure the grid can accomodate the new item as we only grow 1 position in a
given direction. | 716 // sure the grid can accomodate the new item as we only grow 1 position in a
given direction. |
717 return GridSpan(initialPosition, initialPosition); | 717 return GridSpan(initialPosition, initialPosition); |
718 } | 718 } |
719 | 719 |
720 PassOwnPtr<RenderGrid::GridSpan> RenderGrid::resolveGridPositionsFromStyle(const
RenderBox* gridItem, TrackSizingDirection direction) const | 720 PassOwnPtr<RenderGrid::GridSpan> RenderGrid::resolveGridPositionsFromStyle(const
RenderBox* gridItem, TrackSizingDirection direction) const |
721 { | 721 { |
722 const GridPosition& initialPosition = (direction == ForColumns) ? gridItem->
style()->gridItemStart() : gridItem->style()->gridItemBefore(); | 722 const GridPosition& initialPosition = (direction == ForColumns) ? gridItem->
style()->gridStart() : gridItem->style()->gridBefore(); |
723 const GridPositionSide initialPositionSide = (direction == ForColumns) ? Sta
rtSide : BeforeSide; | 723 const GridPositionSide initialPositionSide = (direction == ForColumns) ? Sta
rtSide : BeforeSide; |
724 const GridPosition& finalPosition = (direction == ForColumns) ? gridItem->st
yle()->gridItemEnd() : gridItem->style()->gridItemAfter(); | 724 const GridPosition& finalPosition = (direction == ForColumns) ? gridItem->st
yle()->gridEnd() : gridItem->style()->gridAfter(); |
725 const GridPositionSide finalPositionSide = (direction == ForColumns) ? EndSi
de : AfterSide; | 725 const GridPositionSide finalPositionSide = (direction == ForColumns) ? EndSi
de : AfterSide; |
726 | 726 |
727 if (initialPosition.isAuto() && finalPosition.isAuto()) { | 727 if (initialPosition.isAuto() && finalPosition.isAuto()) { |
728 if (style()->gridAutoFlow() == AutoFlowNone) | 728 if (style()->gridAutoFlow() == AutoFlowNone) |
729 return adoptPtr(new GridSpan(0, 0)); | 729 return adoptPtr(new GridSpan(0, 0)); |
730 | 730 |
731 // We can't get our grid positions without running the auto placement al
gorithm. | 731 // We can't get our grid positions without running the auto placement al
gorithm. |
732 return nullptr; | 732 return nullptr; |
733 } | 733 } |
734 | 734 |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
823 if (isOutOfFlowPositioned()) | 823 if (isOutOfFlowPositioned()) |
824 return "RenderGrid (positioned)"; | 824 return "RenderGrid (positioned)"; |
825 if (isAnonymous()) | 825 if (isAnonymous()) |
826 return "RenderGrid (generated)"; | 826 return "RenderGrid (generated)"; |
827 if (isRelPositioned()) | 827 if (isRelPositioned()) |
828 return "RenderGrid (relative positioned)"; | 828 return "RenderGrid (relative positioned)"; |
829 return "RenderGrid"; | 829 return "RenderGrid"; |
830 } | 830 } |
831 | 831 |
832 } // namespace WebCore | 832 } // namespace WebCore |
OLD | NEW |