Changeset 95577 in webkit
- Timestamp:
- Sep 20, 2011, 3:46:19 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r95574 r95577 1 2011-09-18 Ojan Vafai <ojan@chromium.org> 2 3 change RenderFlexibleBox to act on logical coordinates 4 https://bugs.webkit.org/show_bug.cgi?id=68129 5 6 Reviewed by David Hyatt. 7 8 * css3/flexbox/resources/flexbox.js: 9 * css3/flexbox/writing-modes-expected.txt: Added. 10 * css3/flexbox/writing-modes.html: Added. 11 1 12 2011-09-20 Ryosuke Niwa <rniwa@webkit.org> 2 13 -
trunk/LayoutTests/css3/flexbox/resources/flexbox.js
r94250 r95577 15 15 } 16 16 17 var expectedHeight = node.getAttribute && node.getAttribute("data-expected-height"); 18 if (expectedHeight) { 19 if (node.offsetHeight != parseInt(expectedHeight)) 20 failures.push("Expected " + expectedHeight + " for height, but got " + node.offsetHeight + ". "); 21 } 22 17 23 var expectedOffset = node.getAttribute && node.getAttribute("data-offset-x"); 18 24 if (expectedOffset) { 19 25 if (node.offsetLeft != parseInt(expectedOffset)) 20 26 failures.push("Expected " + expectedOffset + " for offsetLeft, but got " + node.offsetLeft + ". "); 27 } 28 29 var expectedOffset = node.getAttribute && node.getAttribute("data-offset-y"); 30 if (expectedOffset) { 31 if (node.offsetTop != parseInt(expectedOffset)) 32 failures.push("Expected " + expectedOffset + " for offsetTop, but got " + node.offsetTop + ". "); 21 33 } 22 34 } -
trunk/Source/WebCore/ChangeLog
r95576 r95577 1 2011-09-18 Ojan Vafai <ojan@chromium.org> 2 3 change RenderFlexibleBox to act on logical coordinates 4 https://bugs.webkit.org/show_bug.cgi?id=68129 5 6 Reviewed by David Hyatt. 7 8 This makes RenderFlexibleBox respect direction and writing-mode. 9 We now properly support the default flex-flow value of "row". 10 11 Test: css3/flexbox/writing-modes.html 12 13 * rendering/RenderBlock.cpp: 14 (WebCore::RenderBlock::setLogicalLocationForChild): 15 * rendering/RenderBlock.h: 16 * rendering/RenderFlexibleBox.cpp: 17 (WebCore::RenderFlexibleBox::layoutBlock): 18 (WebCore::RenderFlexibleBox::logicalBorderWidthForChild): 19 (WebCore::RenderFlexibleBox::logicalPaddingWidthForChild): 20 (WebCore::RenderFlexibleBox::logicalScrollbarHeightForChild): 21 (WebCore::RenderFlexibleBox::marginStartStyleForChild): 22 (WebCore::RenderFlexibleBox::marginEndStyleForChild): 23 (WebCore::RenderFlexibleBox::preferredLogicalContentWidthForFlexItem): 24 (WebCore::RenderFlexibleBox::layoutInlineDirection): 25 (WebCore::RenderFlexibleBox::logicalPositiveFlexForChild): 26 (WebCore::RenderFlexibleBox::logicalNegativeFlexForChild): 27 (WebCore::RenderFlexibleBox::computePreferredLogicalWidth): 28 (WebCore::RenderFlexibleBox::runFreeSpaceAllocationAlgorithmInlineDirection): 29 (WebCore::RenderFlexibleBox::setLogicalOverrideSize): 30 (WebCore::RenderFlexibleBox::layoutAndPlaceChildrenInlineDirection): 31 * rendering/RenderFlexibleBox.h: 32 1 33 2011-09-20 Marshall Greenblatt <marshall@chromium.org> 2 34 -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r95574 r95577 1861 1861 } 1862 1862 1863 void RenderBlock::setLogicalLocationForChild(RenderBox* child, const LayoutPoint& location) 1864 { 1865 if (style()->isHorizontalWritingMode()) 1866 child->setLocation(location); 1867 else 1868 child->setLocation(location.transposedPoint()); 1869 } 1870 1863 1871 void RenderBlock::setLogicalLeftForChild(RenderBox* child, LayoutUnit logicalLeft, ApplyLayoutDeltaMode applyDelta) 1864 1872 { -
trunk/Source/WebCore/rendering/RenderBlock.h
r95264 r95577 210 210 LayoutUnit logicalTopForChild(RenderBox* child) { return isHorizontalWritingMode() ? child->y() : child->x(); } 211 211 LayoutUnit logicalLeftForChild(RenderBox* child) { return isHorizontalWritingMode() ? child->x() : child->y(); } 212 // FIXME: Supporting layout deltas. 213 void setLogicalLocationForChild(RenderBox* child, const LayoutPoint&); 212 214 void setLogicalLeftForChild(RenderBox* child, LayoutUnit logicalLeft, ApplyLayoutDeltaMode = DoNotApplyLayoutDelta); 213 215 void setLogicalTopForChild(RenderBox* child, LayoutUnit logicalTop, ApplyLayoutDeltaMode = DoNotApplyLayoutDelta); -
trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp
r94706 r95577 100 100 m_overflow.clear(); 101 101 102 // FIXME: Assume horizontal layout until flex-flow is added. 103 layoutHorizontalBlock(relayoutChildren); 102 layoutInlineDirection(relayoutChildren); 104 103 105 104 computeLogicalHeight(); … … 115 114 } 116 115 117 static LayoutUnit preferredFlexItemContentWidth(RenderBox* child) 118 { 119 // FIXME: Handle vertical writing modes with horizontal flexing. 120 if (child->style()->width().isAuto()) 121 return child->maxPreferredLogicalWidth() - child->borderLeft() - child->borderRight() - child->verticalScrollbarWidth() - child->paddingLeft() - child->paddingRight(); 122 return child->contentWidth(); 123 } 124 125 void RenderFlexibleBox::layoutHorizontalBlock(bool relayoutChildren) 126 { 127 LayoutUnit preferredSize; 116 LayoutUnit RenderFlexibleBox::logicalBorderWidthForChild(RenderBox* child) 117 { 118 if (isHorizontalWritingMode()) 119 return child->borderLeft() + child->borderRight(); 120 return child->borderTop() + child->borderBottom(); 121 } 122 123 LayoutUnit RenderFlexibleBox::logicalPaddingWidthForChild(RenderBox* child) 124 { 125 if (isHorizontalWritingMode()) 126 return child->paddingLeft() + child->paddingRight(); 127 return child->paddingTop() + child->paddingBottom(); 128 } 129 130 LayoutUnit RenderFlexibleBox::logicalScrollbarHeightForChild(RenderBox* child) 131 { 132 if (isHorizontalWritingMode()) 133 return child->horizontalScrollbarHeight(); 134 return child->verticalScrollbarWidth(); 135 } 136 137 Length RenderFlexibleBox::marginStartStyleForChild(RenderBox* child) 138 { 139 if (isHorizontalWritingMode()) 140 return style()->isLeftToRightDirection() ? child->style()->marginLeft() : child->style()->marginRight(); 141 return style()->isLeftToRightDirection() ? child->style()->marginTop() : child->style()->marginBottom(); 142 } 143 144 Length RenderFlexibleBox::marginEndStyleForChild(RenderBox* child) 145 { 146 if (isHorizontalWritingMode()) 147 return style()->isLeftToRightDirection() ? child->style()->marginRight() : child->style()->marginLeft(); 148 return style()->isLeftToRightDirection() ? child->style()->marginBottom() : child->style()->marginTop(); 149 } 150 151 LayoutUnit RenderFlexibleBox::preferredLogicalContentWidthForFlexItem(RenderBox* child) 152 { 153 Length width = isHorizontalWritingMode() ? child->style()->width() : child->style()->height(); 154 if (width.isAuto()) { 155 LayoutUnit logicalWidth = isHorizontalWritingMode() == child->isHorizontalWritingMode() ? child->maxPreferredLogicalWidth() : child->logicalHeight(); 156 return logicalWidth - logicalBorderWidthForChild(child) - logicalScrollbarHeightForChild(child) - logicalPaddingWidthForChild(child); 157 } 158 return isHorizontalWritingMode() ? child->contentWidth() : child->contentHeight(); 159 } 160 161 void RenderFlexibleBox::layoutInlineDirection(bool relayoutChildren) 162 { 163 LayoutUnit preferredLogicalWidth; 128 164 float totalPositiveFlexibility; 129 165 float totalNegativeFlexibility; 130 166 FlexibleBoxIterator iterator(this); 131 167 132 computePreferred SizeHorizontal(relayoutChildren, iterator, preferredSize, totalPositiveFlexibility, totalNegativeFlexibility);133 LayoutUnit availableFreeSpace = content Width() - preferredSize;168 computePreferredLogicalWidth(relayoutChildren, iterator, preferredLogicalWidth, totalPositiveFlexibility, totalNegativeFlexibility); 169 LayoutUnit availableFreeSpace = contentLogicalWidth() - preferredLogicalWidth; 134 170 135 171 InflexibleFlexItemSize inflexibleItems; 136 172 WTF::Vector<LayoutUnit> childSizes; 137 while (!runFreeSpaceAllocationAlgorithm Horizontal(availableFreeSpace, totalPositiveFlexibility, totalNegativeFlexibility, inflexibleItems, childSizes)) {173 while (!runFreeSpaceAllocationAlgorithmInlineDirection(availableFreeSpace, totalPositiveFlexibility, totalNegativeFlexibility, inflexibleItems, childSizes)) { 138 174 ASSERT(totalPositiveFlexibility >= 0 && totalNegativeFlexibility >= 0); 139 175 ASSERT(inflexibleItems.size() > 0); 140 176 } 141 177 142 layoutAndPlaceChildrenHorizontal(childSizes, availableFreeSpace, totalPositiveFlexibility); 143 144 // FIXME: Handle distribution of vertical space (third distribution round). 145 } 146 147 static LayoutUnit preferredSizeForMarginsAndPadding(Length length, LayoutUnit containerLength) 148 { 149 return length.calcMinValue(containerLength); 150 } 151 152 void RenderFlexibleBox::computePreferredSizeHorizontal(bool relayoutChildren, FlexibleBoxIterator& iterator, LayoutUnit& preferredSize, float& totalPositiveFlexibility, float& totalNegativeFlexibility) 153 { 154 preferredSize = 0; 178 layoutAndPlaceChildrenInlineDirection(childSizes, availableFreeSpace, totalPositiveFlexibility); 179 180 // FIXME: Handle distribution of cross-axis space (third distribution round). 181 } 182 183 float RenderFlexibleBox::logicalPositiveFlexForChild(RenderBox* child) 184 { 185 return isHorizontalWritingMode() ? child->style()->flexboxWidthPositiveFlex() : child->style()->flexboxHeightPositiveFlex(); 186 } 187 188 float RenderFlexibleBox::logicalNegativeFlexForChild(RenderBox* child) 189 { 190 return isHorizontalWritingMode() ? child->style()->flexboxWidthNegativeFlex() : child->style()->flexboxHeightNegativeFlex(); 191 } 192 193 void RenderFlexibleBox::computePreferredLogicalWidth(bool relayoutChildren, FlexibleBoxIterator& iterator, LayoutUnit& preferredLogicalWidth, float& totalPositiveFlexibility, float& totalNegativeFlexibility) 194 { 195 preferredLogicalWidth = 0; 155 196 totalPositiveFlexibility = totalNegativeFlexibility = 0; 156 197 157 // FIXME: Handle vertical writing modes with horizontal flexing.158 198 LayoutUnit flexboxAvailableLogicalWidth = availableLogicalWidth(); 159 199 for (RenderBox* child = iterator.first(); child; child = iterator.next()) { … … 165 205 child->layoutIfNeeded(); 166 206 167 preferredSize += preferredSizeForMarginsAndPadding(child->style()->marginLeft(), flexboxAvailableLogicalWidth); 168 preferredSize += preferredSizeForMarginsAndPadding(child->style()->marginRight(), flexboxAvailableLogicalWidth); 169 preferredSize += preferredSizeForMarginsAndPadding(child->style()->paddingLeft(), flexboxAvailableLogicalWidth); 170 preferredSize += preferredSizeForMarginsAndPadding(child->style()->paddingRight(), flexboxAvailableLogicalWidth); 171 172 if (child->style()->marginLeft().isAuto()) 207 if (isHorizontalWritingMode()) { 208 preferredLogicalWidth += child->style()->marginLeft().calcMinValue(flexboxAvailableLogicalWidth); 209 preferredLogicalWidth += child->style()->marginRight().calcMinValue(flexboxAvailableLogicalWidth); 210 preferredLogicalWidth += child->style()->paddingLeft().calcMinValue(flexboxAvailableLogicalWidth); 211 preferredLogicalWidth += child->style()->paddingRight().calcMinValue(flexboxAvailableLogicalWidth); 212 } else { 213 preferredLogicalWidth += child->style()->marginTop().calcMinValue(flexboxAvailableLogicalWidth); 214 preferredLogicalWidth += child->style()->marginBottom().calcMinValue(flexboxAvailableLogicalWidth); 215 preferredLogicalWidth += child->style()->paddingTop().calcMinValue(flexboxAvailableLogicalWidth); 216 preferredLogicalWidth += child->style()->paddingBottom().calcMinValue(flexboxAvailableLogicalWidth); 217 } 218 219 if (marginStartStyleForChild(child).isAuto()) 173 220 totalPositiveFlexibility += 1; 174 if ( child->style()->marginRight().isAuto())221 if (marginEndStyleForChild(child).isAuto()) 175 222 totalPositiveFlexibility += 1; 176 223 177 preferredSize += child->borderLeft() + child->borderRight(); 178 179 preferredSize += preferredFlexItemContentWidth(child); 180 181 totalPositiveFlexibility += child->style()->flexboxWidthPositiveFlex(); 182 totalNegativeFlexibility += child->style()->flexboxWidthNegativeFlex(); 224 preferredLogicalWidth += logicalBorderWidthForChild(child); 225 preferredLogicalWidth += preferredLogicalContentWidthForFlexItem(child); 226 227 totalPositiveFlexibility += logicalPositiveFlexForChild(child); 228 totalNegativeFlexibility += logicalNegativeFlexForChild(child); 183 229 } 184 230 } 185 231 186 232 // Returns true if we successfully ran the algorithm and sized the flex items. 187 bool RenderFlexibleBox::runFreeSpaceAllocationAlgorithm Horizontal(LayoutUnit& availableFreeSpace, float& totalPositiveFlexibility, float& totalNegativeFlexibility, InflexibleFlexItemSize& inflexibleItems, WTF::Vector<LayoutUnit>& childSizes)233 bool RenderFlexibleBox::runFreeSpaceAllocationAlgorithmInlineDirection(LayoutUnit& availableFreeSpace, float& totalPositiveFlexibility, float& totalNegativeFlexibility, InflexibleFlexItemSize& inflexibleItems, WTF::Vector<LayoutUnit>& childSizes) 188 234 { 189 235 FlexibleBoxIterator iterator(this); 190 236 childSizes.clear(); 191 237 192 // FIXME: Handle vertical writing modes with horizontal flexing.193 238 LayoutUnit flexboxAvailableLogicalWidth = availableLogicalWidth(); 194 239 for (RenderBox* child = iterator.first(); child; child = iterator.next()) { … … 197 242 childPreferredSize = inflexibleItems.get(child); 198 243 else { 199 childPreferredSize = preferred FlexItemContentWidth(child);244 childPreferredSize = preferredLogicalContentWidthForFlexItem(child); 200 245 if (availableFreeSpace > 0 && totalPositiveFlexibility > 0) { 201 childPreferredSize += lroundf(availableFreeSpace * child->style()->flexboxWidthPositiveFlex() / totalPositiveFlexibility);202 203 Length child MaxWidth = child->style()->maxWidth();204 if (!child MaxWidth.isUndefined() && childMaxWidth.isSpecified() && childPreferredSize > childMaxWidth.calcValue(flexboxAvailableLogicalWidth)) {205 childPreferredSize = child MaxWidth.calcValue(flexboxAvailableLogicalWidth);206 availableFreeSpace -= childPreferredSize - preferred FlexItemContentWidth(child);207 totalPositiveFlexibility -= child->style()->flexboxWidthPositiveFlex();246 childPreferredSize += lroundf(availableFreeSpace * logicalPositiveFlexForChild(child) / totalPositiveFlexibility); 247 248 Length childLogicalMaxWidth = isHorizontalWritingMode() ? child->style()->maxWidth() : child->style()->maxHeight(); 249 if (!childLogicalMaxWidth.isUndefined() && childLogicalMaxWidth.isSpecified() && childPreferredSize > childLogicalMaxWidth.calcValue(flexboxAvailableLogicalWidth)) { 250 childPreferredSize = childLogicalMaxWidth.calcValue(flexboxAvailableLogicalWidth); 251 availableFreeSpace -= childPreferredSize - preferredLogicalContentWidthForFlexItem(child); 252 totalPositiveFlexibility -= logicalPositiveFlexForChild(child); 208 253 209 254 inflexibleItems.set(child, childPreferredSize); … … 211 256 } 212 257 } else if (availableFreeSpace < 0 && totalNegativeFlexibility > 0) { 213 childPreferredSize += lroundf(availableFreeSpace * child->style()->flexboxWidthNegativeFlex() / totalNegativeFlexibility);214 215 Length child MinWidth = child->style()->minWidth();216 if (!child MinWidth.isUndefined() && childMinWidth.isSpecified() && childPreferredSize < childMinWidth.calcValue(flexboxAvailableLogicalWidth)) {217 childPreferredSize = child MinWidth.calcValue(flexboxAvailableLogicalWidth);218 availableFreeSpace += preferred FlexItemContentWidth(child) - childPreferredSize;219 totalNegativeFlexibility -= child->style()->flexboxWidthNegativeFlex();258 childPreferredSize += lroundf(availableFreeSpace * logicalNegativeFlexForChild(child) / totalNegativeFlexibility); 259 260 Length childLogicalMinWidth = isHorizontalWritingMode() ? child->style()->minWidth() : child->style()->minHeight(); 261 if (!childLogicalMinWidth.isUndefined() && childLogicalMinWidth.isSpecified() && childPreferredSize < childLogicalMinWidth.calcValue(flexboxAvailableLogicalWidth)) { 262 childPreferredSize = childLogicalMinWidth.calcValue(flexboxAvailableLogicalWidth); 263 availableFreeSpace += preferredLogicalContentWidthForFlexItem(child) - childPreferredSize; 264 totalNegativeFlexibility -= logicalNegativeFlexForChild(child); 220 265 221 266 inflexibleItems.set(child, childPreferredSize); … … 234 279 } 235 280 236 void RenderFlexibleBox::layoutAndPlaceChildrenHorizontal(const WTF::Vector<LayoutUnit>& childSizes, LayoutUnit availableFreeSpace, float totalPositiveFlexibility) 281 void RenderFlexibleBox::setLogicalOverrideSize(RenderBox* child, LayoutUnit childPreferredSize) 282 { 283 // FIXME: Rename setOverrideWidth/setOverrideHeight to setOverrideLogicalWidth/setOverrideLogicalHeight. 284 if (isHorizontalWritingMode()) 285 child->isHorizontalWritingMode() ? child->setOverrideWidth(childPreferredSize) : child->setOverrideHeight(childPreferredSize); 286 else 287 child->isHorizontalWritingMode() ? child->setOverrideHeight(childPreferredSize) : child->setOverrideWidth(childPreferredSize); 288 } 289 290 void RenderFlexibleBox::layoutAndPlaceChildrenInlineDirection(const WTF::Vector<LayoutUnit>& childSizes, LayoutUnit availableFreeSpace, float totalPositiveFlexibility) 237 291 { 238 292 FlexibleBoxIterator iterator(this); 239 // Now that we know the sizes, layout and position the flex items. 240 LayoutUnit xOffset = borderLeft() + paddingLeft(); 293 LayoutUnit startEdge = borderStart() + paddingStart(); 241 294 242 295 if (hasPackingSpace(availableFreeSpace, totalPositiveFlexibility)) { 243 296 if (style()->flexPack() == PackEnd) 244 xOffset+= availableFreeSpace;297 startEdge += availableFreeSpace; 245 298 else if (style()->flexPack() == PackCenter) 246 xOffset += availableFreeSpace / 2; 247 } 248 249 LayoutUnit yOffset = borderTop() + paddingTop(); 250 setHeight(0); 299 startEdge += availableFreeSpace / 2; 300 } 301 302 LayoutUnit logicalTop = borderBefore() + paddingBefore(); 303 LayoutUnit totalAvailableLogicalWidth = availableLogicalWidth(); 304 setLogicalHeight(0); 251 305 size_t i = 0; 252 306 for (RenderBox* child = iterator.first(); child; child = iterator.next(), ++i) { 253 LayoutUnit childPreferredSize = child->borderLeft() + child->paddingLeft() + childSizes[i] + child->paddingRight() + child->borderRight();254 // FIXME: Handle vertical writing modes with horizontal flexing.255 child->setOverrideWidth(childPreferredSize);307 // FIXME: Does this need to take the scrollbar width into account? 308 LayoutUnit childPreferredSize = childSizes[i] + logicalBorderWidthForChild(child) + logicalPaddingWidthForChild(child); 309 setLogicalOverrideSize(child, childPreferredSize); 256 310 child->setChildNeedsLayout(true); 257 311 child->layoutIfNeeded(); 258 312 259 setHeight(std::max(height(), borderTop() + paddingTop() + child->marginTop() + child->height() + child->marginBottom() + paddingBottom() + borderBottom() + horizontalScrollbarHeight())); 260 261 if (child->style()->marginLeft().isAuto()) 262 child->setMarginLeft(availableFreeSpace > 0 ? lroundf(availableFreeSpace / totalPositiveFlexibility) : 0); 263 if (child->style()->marginRight().isAuto()) 264 child->setMarginRight(availableFreeSpace > 0 ? lroundf(availableFreeSpace / totalPositiveFlexibility) : 0); 265 266 xOffset += child->marginLeft(); 267 child->setLocation(IntPoint(xOffset, yOffset)); 268 xOffset += child->width() + child->marginRight(); 313 setLogicalHeight(std::max(logicalHeight(), borderBefore() + paddingBefore() + marginBeforeForChild(child) + logicalHeightForChild(child) + marginAfterForChild(child) + paddingAfter() + borderAfter() + scrollbarLogicalHeight())); 314 315 if (marginStartStyleForChild(child).isAuto()) 316 setMarginStartForChild(child, availableFreeSpace > 0 ? lroundf(availableFreeSpace / totalPositiveFlexibility) : 0); 317 if (marginEndStyleForChild(child).isAuto()) 318 setMarginEndForChild(child, availableFreeSpace > 0 ? lroundf(availableFreeSpace / totalPositiveFlexibility) : 0); 319 320 startEdge += marginStartForChild(child); 321 322 LayoutUnit childLogicalWidth = logicalWidthForChild(child); 323 LayoutUnit logicalLeft = style()->isLeftToRightDirection() ? startEdge : totalAvailableLogicalWidth - startEdge - childLogicalWidth; 324 // FIXME: Do repaintDuringLayoutIfMoved. 325 // FIXME: Supporting layout deltas. 326 setLogicalLocationForChild(child, IntPoint(logicalLeft, logicalTop)); 327 startEdge += childLogicalWidth + marginEndForChild(child); 269 328 270 329 if (hasPackingSpace(availableFreeSpace, totalPositiveFlexibility) && style()->flexPack() == PackJustify && childSizes.size() > 1) 271 xOffset+= availableFreeSpace / (childSizes.size() - 1);330 startEdge += availableFreeSpace / (childSizes.size() - 1); 272 331 } 273 332 } -
trunk/Source/WebCore/rendering/RenderFlexibleBox.h
r94117 r95577 53 53 typedef WTF::HashMap<const RenderBox*, LayoutUnit> InflexibleFlexItemSize; 54 54 55 void layoutHorizontalBlock(bool relayoutChildren); 55 LayoutUnit logicalBorderWidthForChild(RenderBox* child); 56 LayoutUnit logicalPaddingWidthForChild(RenderBox* child); 57 LayoutUnit logicalScrollbarHeightForChild(RenderBox* child); 58 Length marginStartStyleForChild(RenderBox* child); 59 Length marginEndStyleForChild(RenderBox* child); 60 LayoutUnit preferredLogicalContentWidthForFlexItem(RenderBox* child); 56 61 57 void computePreferredSizeHorizontal(bool relayoutChildren, FlexibleBoxIterator&, LayoutUnit&, float& totalPositiveFlexibility, float& totalNegativeFlexibility); 58 bool runFreeSpaceAllocationAlgorithmHorizontal(LayoutUnit& availableFreeSpace, float& totalPositiveFlexibility, float& totalNegativeFlexibility, InflexibleFlexItemSize&, WTF::Vector<LayoutUnit>& childSizes); 59 void layoutAndPlaceChildrenHorizontal(const WTF::Vector<LayoutUnit>& childSizes, LayoutUnit availableFreeSpace, float totalPositiveFlexibility); 62 void layoutInlineDirection(bool relayoutChildren); 63 64 float logicalPositiveFlexForChild(RenderBox* child); 65 float logicalNegativeFlexForChild(RenderBox* child); 66 67 void computePreferredLogicalWidth(bool relayoutChildren, FlexibleBoxIterator&, LayoutUnit&, float& totalPositiveFlexibility, float& totalNegativeFlexibility); 68 bool runFreeSpaceAllocationAlgorithmInlineDirection(LayoutUnit& availableFreeSpace, float& totalPositiveFlexibility, float& totalNegativeFlexibility, InflexibleFlexItemSize&, WTF::Vector<LayoutUnit>& childSizes); 69 void setLogicalOverrideSize(RenderBox* child, LayoutUnit childPreferredSize); 70 void layoutAndPlaceChildrenInlineDirection(const WTF::Vector<LayoutUnit>& childSizes, LayoutUnit availableFreeSpace, float totalPositiveFlexibility); 60 71 }; 61 72
Note:
See TracChangeset
for help on using the changeset viewer.