Changeset 124671 in webkit
- Timestamp:
- Aug 3, 2012 4:36:05 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r124668 r124671 1 2012-08-03 Julien Chaffraix <jchaffraix@webkit.org> 2 3 Implement computePreferredLogicalWidths on RenderGrid 4 https://bugs.webkit.org/show_bug.cgi?id=92908 5 6 Reviewed by Ojan Vafai. 7 8 * fast/css-grid-layout/place-cell-by-index-expected.txt: 9 Updated the expected file (everything passes now). 10 * fast/css-grid-layout/place-cell-by-index.html: 11 Removed some FIXMEs and added one about the expected offsets making 12 a wrong assumption. It's fine to keep this testing until we support 13 this part of the spec. 14 1 15 2012-08-03 Arnaud Renevier <a.renevier@sisa.samsung.com> 2 16 -
trunk/LayoutTests/fast/css-grid-layout/place-cell-by-index-expected.txt
r122747 r124671 3 3 PASS 4 4 PASS 5 FAIL: 6 Expected 110 for height, but got 15. 7 8 <div class="grid" style="-webkit-writing-mode: vertical-rl; margin-bottom: 60px;" data-expected-width="50" data-expected-height="110"> 9 <div id="a" data-offset-x="40" data-offset-y="0"></div> 10 <div id="b" data-offset-x="40" data-offset-y="50"></div> 11 <div id="c" data-offset-x="20" data-offset-y="0"></div> 12 <div id="d" data-offset-x="20" data-offset-y="50"></div> 13 </div> 14 FAIL: 15 Expected 110 for height, but got 15. 16 17 <div class="grid" style="-webkit-writing-mode: vertical-lr; margin-bottom: 60px;" data-expected-width="50" data-expected-height="110"> 18 <div id="a" data-offset-x="0" data-offset-y="0"></div> 19 <div id="b" data-offset-x="0" data-offset-y="50"></div> 20 <div id="c" data-offset-x="20" data-offset-y="0"></div> 21 <div id="d" data-offset-x="20" data-offset-y="50"></div> 22 </div> 5 PASS 6 PASS -
trunk/LayoutTests/fast/css-grid-layout/place-cell-by-index.html
r122747 r124671 50 50 <p>Test some simple grid layouts by positioning grid items by index.</p> 51 51 52 <!-- FIXME: The offsets assumes that grid-{column|row}-align are set to 'start', not 'stretch' (the default). Fix 53 them once we properly implement stretching / alignment. --> 52 54 <div style="position: relative"> 53 55 <div class="grid" data-expected-width="110" data-expected-height="50"> … … 69 71 70 72 <div style="position: relative"> 71 <!-- FIXME: The height of the grid is wrong because we need to implement computePreferredLogicalWidths(). -->72 73 <div class="grid" style="-webkit-writing-mode: vertical-rl; margin-bottom: 60px;" data-expected-width="50" data-expected-height="110"> 73 74 <div id="a" data-offset-x="40" data-offset-y="0"></div> … … 79 80 80 81 <div style="position: relative"> 81 <!-- FIXME: The height of the grid is wrong because we need to implement computePreferredLogicalWidths(). -->82 82 <div class="grid" style="-webkit-writing-mode: vertical-lr; margin-bottom: 60px;" data-expected-width="50" data-expected-height="110"> 83 83 <div id="a" data-offset-x="0" data-offset-y="0"></div> -
trunk/Source/WebCore/ChangeLog
r124668 r124671 1 2012-08-03 Julien Chaffraix <jchaffraix@webkit.org> 2 3 Implement computePreferredLogicalWidths on RenderGrid 4 https://bugs.webkit.org/show_bug.cgi?id=92908 5 6 Reviewed by Ojan Vafai. 7 8 This functions implements a primitive computePreferredLogicalWidths 9 so that we properly handle vertical writing modes. 10 11 Covered by fast/css-grid-layout/place-cell-by-index.html. 12 13 * rendering/RenderGrid.cpp: 14 (WebCore::RenderGrid::computePreferredLogicalWidths): 15 * rendering/RenderGrid.h: 16 Added computePreferredLogicalWidths. 17 1 18 2012-08-03 Arnaud Renevier <a.renevier@sisa.samsung.com> 2 19 -
trunk/Source/WebCore/rendering/RenderGrid.cpp
r124168 r124671 108 108 } 109 109 110 void RenderGrid::computePreferredLogicalWidths() 111 { 112 ASSERT(preferredLogicalWidthsDirty()); 113 114 m_minPreferredLogicalWidth = 0; 115 m_maxPreferredLogicalWidth = 0; 116 117 // FIXME: We don't take our own logical width into account. 118 119 const Vector<Length>& trackStyles = style()->gridColumns(); 120 121 for (size_t i = 0; i < trackStyles.size(); ++i) { 122 Length trackLength = trackStyles[i]; 123 if (!trackLength.isFixed()) { 124 notImplemented(); 125 continue; 126 } 127 128 m_minPreferredLogicalWidth += trackLength.intValue(); 129 m_maxPreferredLogicalWidth += trackLength.intValue(); 130 } 131 132 // FIXME: We should account for min / max logical width. 133 134 // FIXME: Include borders and paddings in inline direction. 135 136 setPreferredLogicalWidthsDirty(false); 137 } 138 110 139 void RenderGrid::computedUsedBreadthOfGridTracks(TrackSizingDirection direction, Vector<GridTrack>& tracks) 111 140 { -
trunk/Source/WebCore/rendering/RenderGrid.h
r122747 r124671 39 39 40 40 virtual void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) OVERRIDE; 41 virtual void computePreferredLogicalWidths() OVERRIDE; 41 42 42 43 virtual bool avoidsFloats() const OVERRIDE { return true; }
Note: See TracChangeset
for help on using the changeset viewer.