Changeset 114537 in webkit
- Timestamp:
- Apr 18, 2012 11:31:35 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r114535 r114537 1 2012-04-18 Emil A Eklund <eae@chromium.org> 2 3 Use explicit casts for size_t to unsigned conversion 4 https://bugs.webkit.org/show_bug.cgi?id=83602 5 6 Reviewed by Eric Seidel. 7 8 No new tests, no change in functinality. 9 10 Not all platforms have implicit casts from size_t to unsigned and we 11 can't add size_t versions of the operators to FractionalLayoutUnit for 12 all platforms as it would conflict with the unsigned versions of same. 13 14 Change support methods to take unsigned instead of size_t and use 15 explicit casts when multiplying or dividing a FractionalLayoutUnit with 16 a size_t and the other way around. 17 18 * rendering/RenderBlock.cpp: 19 (WebCore::RenderBlock::adjustForColumns): 20 * rendering/RenderFlexibleBox.cpp: 21 (WebCore::initialPackingOffset): 22 (WebCore::packingSpaceBetweenChildren): 23 (WebCore::initialLinePackingOffset): 24 (WebCore::linePackingSpaceBetweenChildren): 25 (WebCore::RenderFlexibleBox::packFlexLines): 26 * rendering/RenderFrameSet.cpp: 27 (WebCore::RenderFrameSet::layout): 28 1 29 2012-04-18 Pavel Feldman <pfeldman@chromium.org> 2 30 -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r114461 r114537 5177 5177 5178 5178 LayoutUnit logicalLeft = logicalLeftOffsetForContent(); 5179 size_tcolCount = columnCount(colInfo);5179 unsigned colCount = columnCount(colInfo); 5180 5180 LayoutUnit colLogicalWidth = colInfo->desiredColumnWidth(); 5181 5181 LayoutUnit colLogicalHeight = colInfo->columnHeight(); 5182 5182 5183 for ( size_ti = 0; i < colCount; ++i) {5183 for (unsigned i = 0; i < colCount; ++i) { 5184 5184 // Compute the edges for a given column in the block progression direction. 5185 5185 LayoutRect sliceRect = LayoutRect(logicalLeft, borderBefore() + paddingBefore() + i * colLogicalHeight, colLogicalWidth, colLogicalHeight); -
trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp
r113665 r114537 807 807 } 808 808 809 static LayoutUnit initialPackingOffset(LayoutUnit availableFreeSpace, EFlexPack flexPack, size_tnumberOfChildren)809 static LayoutUnit initialPackingOffset(LayoutUnit availableFreeSpace, EFlexPack flexPack, unsigned numberOfChildren) 810 810 { 811 811 if (flexPack == PackEnd) … … 822 822 } 823 823 824 static LayoutUnit packingSpaceBetweenChildren(LayoutUnit availableFreeSpace, EFlexPack flexPack, size_tnumberOfChildren)824 static LayoutUnit packingSpaceBetweenChildren(LayoutUnit availableFreeSpace, EFlexPack flexPack, unsigned numberOfChildren) 825 825 { 826 826 if (availableFreeSpace > 0 && numberOfChildren > 1) { … … 970 970 } 971 971 972 static LayoutUnit initialLinePackingOffset(LayoutUnit availableFreeSpace, EFlexLinePack linePack, size_tnumberOfLines)972 static LayoutUnit initialLinePackingOffset(LayoutUnit availableFreeSpace, EFlexLinePack linePack, unsigned numberOfLines) 973 973 { 974 974 if (linePack == LinePackEnd) … … 985 985 } 986 986 987 static LayoutUnit linePackingSpaceBetweenChildren(LayoutUnit availableFreeSpace, EFlexLinePack linePack, size_tnumberOfLines)987 static LayoutUnit linePackingSpaceBetweenChildren(LayoutUnit availableFreeSpace, EFlexLinePack linePack, unsigned numberOfLines) 988 988 { 989 989 if (availableFreeSpace > 0 && numberOfLines > 1) { … … 1007 1007 RenderBox* child = iterator.first(); 1008 1008 LayoutUnit lineOffset = initialLinePackingOffset(availableCrossAxisSpace, style()->flexLinePack(), lineContexts.size()); 1009 for ( size_tlineNumber = 0; lineNumber < lineContexts.size(); ++lineNumber) {1009 for (unsigned lineNumber = 0; lineNumber < lineContexts.size(); ++lineNumber) { 1010 1010 lineContexts[lineNumber].crossAxisOffset += lineOffset; 1011 1011 for (size_t childNumber = 0; childNumber < lineContexts[lineNumber].numberOfChildren; ++childNumber, child = iterator.next()) … … 1013 1013 1014 1014 if (style()->flexLinePack() == LinePackStretch && availableCrossAxisSpace > 0) 1015 lineContexts[lineNumber].crossAxisExtent += availableCrossAxisSpace / lineContexts.size();1015 lineContexts[lineNumber].crossAxisExtent += availableCrossAxisSpace / static_cast<unsigned>(lineContexts.size()); 1016 1016 1017 1017 lineOffset += linePackingSpaceBetweenChildren(availableCrossAxisSpace, style()->flexLinePack(), lineContexts.size()); -
trunk/Source/WebCore/rendering/RenderFrameSet.cpp
r114079 r114537 473 473 } 474 474 475 size_tcols = frameSet()->totalCols();476 size_trows = frameSet()->totalRows();475 unsigned cols = frameSet()->totalCols(); 476 unsigned rows = frameSet()->totalRows(); 477 477 478 478 if (m_rows.m_sizes.size() != rows || m_cols.m_sizes.size() != cols) {
Note: See TracChangeset
for help on using the changeset viewer.