Changeset 111103 in webkit
- Timestamp:
- Mar 16, 2012 6:29:39 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r111098 r111103 1 2012-03-16 Tony Chang <tony@chromium.org> 2 3 Unreviewed, rolling out r111094. 4 http://trac.webkit.org/changeset/111094 5 https://bugs.webkit.org/show_bug.cgi?id=80882 6 7 broke test on chromium-win 8 9 * css3/flexbox/child-overflow-expected.html: 10 * css3/flexbox/child-overflow.html: 11 * css3/flexbox/flex-align-stretch-expected.txt: 12 * css3/flexbox/flex-align-stretch.html: 13 1 14 2012-03-16 Tom Sepez <tsepez@chromium.org> 2 15 -
trunk/LayoutTests/css3/flexbox/child-overflow-expected.html
r111094 r111103 5 5 .container { 6 6 display: inline-block; 7 margin-right: 30px; 8 width: 100px; 9 height: 100px; 10 border: 5px solid pink; 11 position: relative; 7 margin-right: 5px; 12 8 } 13 9 14 10 .container > div { 11 border: 5px solid pink; 15 12 overflow: auto; 13 height: 100px; 16 14 width: 100px; 17 height: 100px;18 15 } 19 16 … … 23 20 background: -webkit-radial-gradient(center, ellipse cover, rgba(30,87,153,1) 0%,rgba(89,148,202,1) 62%,rgba(95,154,207,0.7) 68%,rgba(125,185,232,0) 100%); 24 21 } 25 26 p {27 margin-bottom: 30px;28 }29 22 </style> 30 23 </head> 31 24 <body> 32 <p>Scrollbars should work in all the flexboxes. The first and third 33 columns should overflow the logical height. Each row should be aligned 34 to the same corner.</p> 25 <p>Scrollbars should work in all the flexboxes and each row should show four identical boxes.</p> 26 </body> 27 <script> 28 var origins = ['', 'bottomLeft', 'topRight', '']; 35 29 36 <div class="container bottomLeft"><div style="height: auto; position: absolute; bottom: 0"><div></div></div></div> 37 <div class="container bottomLeft"><div><div></div></div></div> 38 <div class="container bottomLeft"><div style="height: auto; position: absolute; bottom: 0"><div></div></div></div> 39 <div class="container bottomLeft"><div><div></div></div></div> 40 <br> 41 <div class="container topRight"><div style="width: auto; overflow-x: hidden; overflow-y: scroll; position: absolute; right: 0"><div></div></div></div> 42 <div class="container topRight"><div><div></div></div></div> 43 <div class="container topRight"><div style="width: auto; overflow-x: hidden; overflow-y: scroll; position: absolute; right: 0"><div></div></div></div> 44 <div class="container topRight"><div><div></div></div></div> 45 <br> 46 <div class="container"><div style="width: auto; overflow-x: hidden; overflow-y: scroll; position: absolute;"><div></div></div></div> 47 <div class="container"><div><div></div></div></div> 48 <div class="container"><div style="width: auto; overflow-x: hidden; overflow-y: scroll; position: absolute;"><div></div></div></div> 49 <div class="container"><div><div></div></div></div> 50 <br> 51 <div class="container"><div style="height: auto"><div></div></div></div> 52 <div class="container"><div><div></div></div></div> 53 <div class="container"><div style="height: auto"><div></div></div></div> 54 <div class="container"><div><div></div></div></div> 55 56 <script> 30 origins.forEach(function(origin) { 31 for (var i = 0; i < 4; ++i) { 32 var containerClass = 'container ' + origin; 33 document.body.innerHTML += 34 "<div class='" + containerClass + "'>" + 35 "<div><div></div></div>" + 36 "</div>"; 37 } 38 document.body.innerHTML += "<br>"; 39 }); 57 40 58 41 Array.prototype.forEach.call(document.querySelectorAll('.bottomLeft'), function(element) { -
trunk/LayoutTests/css3/flexbox/child-overflow.html
r111094 r111103 5 5 .container { 6 6 display: inline-block; 7 margin-right: 30px;7 margin-right: 5px; 8 8 } 9 9 … … 56 56 background: -webkit-radial-gradient(center, ellipse cover, rgba(30,87,153,1) 0%,rgba(89,148,202,1) 62%,rgba(95,154,207,0.7) 68%,rgba(125,185,232,0) 100%); 57 57 } 58 59 p {60 margin-bottom: 30px;61 }62 58 </style> 63 59 </head> 64 60 <body> 65 <p>Scrollbars should work in all the flexboxes. The first and third 66 columns should overflow the logical height. Each row should be aligned 67 to the same corner.</p> 61 <p>Scrollbars should work in all the flexboxes and each row should show four identical boxes.</p> 68 62 </body> 69 63 <script> 70 var writingModes = ['horizontal- bt', 'vertical-rl', 'vertical-lr', 'horizontal-tb'];64 var writingModes = ['horizontal-tb', 'horizontal-bt', 'vertical-rl', 'vertical-lr']; 71 65 var flexDirections = ['row', 'column', 'row-reverse', 'column-reverse']; 72 66 writingModes.forEach(function(writingMode) { … … 79 73 "<div style='width: -webkit-flex(0 1 auto); height: -webkit-flex(0 1 auto)'><div></div></div>" + 80 74 "</div>" + 81 "</div> 75 "</div>"; 82 76 }); 83 77 document.body.innerHTML += "<br>"; -
trunk/LayoutTests/css3/flexbox/flex-align-stretch-expected.txt
r111094 r111103 3 3 PASS 4 4 PASS 5 PASS6 PASS -
trunk/LayoutTests/css3/flexbox/flex-align-stretch.html
r111094 r111103 83 83 </div> 84 84 85 <!-- When overflowing the height, flex-align: stretch doesn't cause the flex item to get smaller. -->86 <div class="flexbox" style="height: 50px; width: 600px;">87 <div data-expected-height="60" style="background-color: yellow; width: 300px">88 <div data-expected-height="60" style="height: 60px; width: 10px; background-color: orange"></div>89 </div>90 </div>91 92 <!-- In the column case, the width of the flex item is constrained by the width of the flexbox, so flex-align: stretch doesn't change the width. -->93 <div class="flexbox" style="-webkit-flex-direction: column; width: 100px;">94 <div data-expected-width="100" data-expected-height="50" style="background-color: yellow;">95 <div data-expected-width="200" style="height: 50px; width: 200px; background-color: orange"></div>96 </div>97 </div>98 99 85 </html> -
trunk/Source/WebCore/ChangeLog
r111102 r111103 1 2012-03-16 Tony Chang <tony@chromium.org> 2 3 Unreviewed, rolling out r111094. 4 http://trac.webkit.org/changeset/111094 5 https://bugs.webkit.org/show_bug.cgi?id=80882 6 7 broke test on chromium-win 8 9 * rendering/RenderFlexibleBox.cpp: 10 (WebCore::RenderFlexibleBox::alignChildren): 11 * rendering/RenderFlexibleBox.h: 12 (RenderFlexibleBox): 13 1 14 2012-03-16 Anders Carlsson <andersca@apple.com> 2 15 -
trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp
r111094 r111103 975 975 break; 976 976 case AlignStretch: { 977 applyStretchAlignmentToChild(child, lineCrossAxisExtent); 977 if (!isColumnFlow() && child->style()->logicalHeight().isAuto()) { 978 LayoutUnit logicalHeightBefore = child->logicalHeight(); 979 LayoutUnit stretchedLogicalHeight = child->logicalHeight() + availableAlignmentSpaceForChild(lineCrossAxisExtent, child); 980 child->setLogicalHeight(stretchedLogicalHeight); 981 child->computeLogicalHeight(); 982 983 if (child->logicalHeight() != logicalHeightBefore) { 984 child->setOverrideHeight(child->logicalHeight()); 985 child->setLogicalHeight(0); 986 child->setChildNeedsLayout(true); 987 child->layoutIfNeeded(); 988 } 989 } else if (isColumnFlow() && child->style()->logicalWidth().isAuto() && isMultiline()) { 990 // FIXME: Handle min-width and max-width. 991 LayoutUnit childWidth = lineCrossAxisExtent - crossAxisMarginExtentForChild(child); 992 child->setOverrideWidth(std::max(0, childWidth)); 993 child->setChildNeedsLayout(true); 994 child->layoutIfNeeded(); 995 } 978 996 // Since wrap-reverse flips cross start and cross end, strech children should be aligned with the cross end. 979 997 if (style()->flexWrap() == FlexWrapReverse) … … 1012 1030 } 1013 1031 1014 void RenderFlexibleBox::applyStretchAlignmentToChild(RenderBox* child, LayoutUnit lineCrossAxisExtent)1015 {1016 if (!isColumnFlow() && child->style()->logicalHeight().isAuto()) {1017 LayoutUnit logicalHeightBefore = child->logicalHeight();1018 LayoutUnit stretchedLogicalHeight = child->logicalHeight() + availableAlignmentSpaceForChild(lineCrossAxisExtent, child);1019 if (stretchedLogicalHeight < logicalHeightBefore)1020 return;1021 1022 child->setLogicalHeight(stretchedLogicalHeight);1023 child->computeLogicalHeight();1024 1025 if (child->logicalHeight() != logicalHeightBefore) {1026 child->setOverrideHeight(child->logicalHeight());1027 child->setLogicalHeight(0);1028 child->setChildNeedsLayout(true);1029 child->layoutIfNeeded();1030 }1031 } else if (isColumnFlow() && child->style()->logicalWidth().isAuto() && isMultiline()) {1032 // FIXME: Handle min-width and max-width.1033 LayoutUnit childWidth = lineCrossAxisExtent - crossAxisMarginExtentForChild(child);1034 child->setOverrideWidth(std::max(0, childWidth));1035 child->setChildNeedsLayout(true);1036 child->layoutIfNeeded();1037 }1038 }1039 1040 1032 void RenderFlexibleBox::flipForRightToLeftColumn(FlexOrderIterator& iterator) 1041 1033 { -
trunk/Source/WebCore/rendering/RenderFlexibleBox.h
r111094 r111103 113 113 void layoutColumnReverse(const OrderedFlexItemList&, const WTF::Vector<LayoutUnit>& childSizes, LayoutUnit crossAxisOffset, LayoutUnit availableFreeSpace); 114 114 void alignChildren(const OrderedFlexItemList&, LayoutUnit lineCrossAxisExtent, LayoutUnit maxAscent); 115 void applyStretchAlignmentToChild(RenderBox*, LayoutUnit lineCrossAxisExtent);116 115 void flipForRightToLeftColumn(FlexOrderIterator&); 117 116 void flipForWrapReverse(FlexOrderIterator&, const WrapReverseContext&);
Note: See TracChangeset
for help on using the changeset viewer.