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 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
610 } | 610 } |
611 | 611 |
612 return trackSize; | 612 return trackSize; |
613 } | 613 } |
614 | 614 |
615 LayoutUnit LayoutGrid::logicalHeightForChild(LayoutBox& child, Vector<GridTrack> & columnTracks) | 615 LayoutUnit LayoutGrid::logicalHeightForChild(LayoutBox& child, Vector<GridTrack> & columnTracks) |
616 { | 616 { |
617 SubtreeLayoutScope layoutScope(child); | 617 SubtreeLayoutScope layoutScope(child); |
618 LayoutUnit oldOverrideContainingBlockContentLogicalWidth = child.hasOverride ContainingBlockLogicalWidth() ? child.overrideContainingBlockContentLogicalWidth () : LayoutUnit(); | 618 LayoutUnit oldOverrideContainingBlockContentLogicalWidth = child.hasOverride ContainingBlockLogicalWidth() ? child.overrideContainingBlockContentLogicalWidth () : LayoutUnit(); |
619 LayoutUnit overrideContainingBlockContentLogicalWidth = gridAreaBreadthForCh ild(child, ForColumns, columnTracks); | 619 LayoutUnit overrideContainingBlockContentLogicalWidth = gridAreaBreadthForCh ild(child, ForColumns, columnTracks); |
620 if (child.style()->logicalHeight().isPercent() || oldOverrideContainingBlock ContentLogicalWidth != overrideContainingBlockContentLogicalWidth) | 620 if (child.hasRelativeLogicalHeight() || oldOverrideContainingBlockContentLog icalWidth != overrideContainingBlockContentLogicalWidth) |
621 layoutScope.setNeedsLayout(&child); | 621 layoutScope.setNeedsLayout(&child); |
622 | 622 |
623 child.clearOverrideLogicalContentHeight(); | 623 child.clearOverrideLogicalContentHeight(); |
624 | 624 |
625 child.setOverrideContainingBlockContentLogicalWidth(overrideContainingBlockC ontentLogicalWidth); | 625 child.setOverrideContainingBlockContentLogicalWidth(overrideContainingBlockC ontentLogicalWidth); |
626 // If |child| has a percentage logical height, we shouldn't let it override its intrinsic height, which is | 626 // If |child| has a relative logical height, we shouldn't let it override it s intrinsic height, which is |
627 // what we are interested in here. Thus we need to set the override logical height to -1 (no possible resolution). | 627 // what we are interested in here. Thus we need to set the override logical height to -1 (no possible resolution). |
628 child.setOverrideContainingBlockContentLogicalHeight(-1); | 628 if (child.hasRelativeLogicalHeight()) |
629 child.setOverrideContainingBlockContentLogicalHeight(-1); | |
Manuel Rego
2015/03/05 06:31:07
Applied the same change to the new lines doing:
| |
629 child.layoutIfNeeded(); | 630 child.layoutIfNeeded(); |
630 return child.logicalHeight() + child.marginLogicalHeight(); | 631 return child.logicalHeight() + child.marginLogicalHeight(); |
631 } | 632 } |
632 | 633 |
633 LayoutUnit LayoutGrid::minContentForChild(LayoutBox& child, GridTrackSizingDirec tion direction, Vector<GridTrack>& columnTracks) | 634 LayoutUnit LayoutGrid::minContentForChild(LayoutBox& child, GridTrackSizingDirec tion direction, Vector<GridTrack>& columnTracks) |
634 { | 635 { |
635 bool hasOrthogonalWritingMode = child.isHorizontalWritingMode() != isHorizon talWritingMode(); | 636 bool hasOrthogonalWritingMode = child.isHorizontalWritingMode() != isHorizon talWritingMode(); |
636 // FIXME: Properly support orthogonal writing mode. | 637 // FIXME: Properly support orthogonal writing mode. |
637 if (hasOrthogonalWritingMode) | 638 if (hasOrthogonalWritingMode) |
638 return 0; | 639 return 0; |
(...skipping 1106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1745 if (isOutOfFlowPositioned()) | 1746 if (isOutOfFlowPositioned()) |
1746 return "LayoutGrid (positioned)"; | 1747 return "LayoutGrid (positioned)"; |
1747 if (isAnonymous()) | 1748 if (isAnonymous()) |
1748 return "LayoutGrid (generated)"; | 1749 return "LayoutGrid (generated)"; |
1749 if (isRelPositioned()) | 1750 if (isRelPositioned()) |
1750 return "LayoutGrid (relative positioned)"; | 1751 return "LayoutGrid (relative positioned)"; |
1751 return "LayoutGrid"; | 1752 return "LayoutGrid"; |
1752 } | 1753 } |
1753 | 1754 |
1754 } // namespace blink | 1755 } // namespace blink |
OLD | NEW |