Changeset 112936 in webkit
- Timestamp:
- Apr 2, 2012 2:00:08 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r112935 r112936 1 2012-04-02 Levi Weintraub <leviw@chromium.org> 2 3 Correct remaining LayoutUnit misuse in RenderReplaced and RenderFlexibleBox 4 https://bugs.webkit.org/show_bug.cgi?id=82899 5 6 Reviewed by Darin Adler. 7 8 Removing remaining LayoutUnit misuse and compiler errors that exist in RenderReplaced 9 and RenderFlexibleBox once LayoutUnit becomes sub-pixel. 10 11 No new tests. No change in behavior. 12 13 * rendering/RenderFlexibleBox.cpp: 14 (WebCore::RenderFlexibleBox::repositionLogicalHeightDependentFlexItems): Switching 15 a raw zero in a ternary operation to zeroLayoutUnit. 16 (WebCore::RenderFlexibleBox::applyStretchAlignmentToChild): Ditto for std::max. 17 * rendering/RenderReplaced.cpp: 18 (WebCore::RenderReplaced::paint): Adding missing pixel snapping before painting. 19 (WebCore::RenderReplaced::computeReplacedLogicalWidth): Like above, switching 20 a raw zero to zeroLayoutUnit. 21 (WebCore::RenderReplaced::computePreferredLogicalWidths): Ditto. 22 1 23 2012-04-02 Ken Buchanan <kenrb@chromium.org> 2 24 -
trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp
r112544 r112936 297 297 void RenderFlexibleBox::repositionLogicalHeightDependentFlexItems(FlexOrderIterator& iterator, WTF::Vector<LineContext>& lineContexts, LayoutUnit& oldClientAfterEdge) 298 298 { 299 LayoutUnit crossAxisStartEdge = lineContexts.isEmpty() ? 0: lineContexts[0].crossAxisOffset;299 LayoutUnit crossAxisStartEdge = lineContexts.isEmpty() ? zeroLayoutUnit : lineContexts[0].crossAxisOffset; 300 300 packFlexLines(iterator, lineContexts); 301 301 … … 1121 1121 // FIXME: Handle min-width and max-width. 1122 1122 LayoutUnit childWidth = lineCrossAxisExtent - crossAxisMarginExtentForChild(child); 1123 child->setOverrideWidth(std::max( 0, childWidth));1123 child->setOverrideWidth(std::max(zeroLayoutUnit, childWidth)); 1124 1124 child->setChildNeedsLayout(true); 1125 1125 child->layoutIfNeeded(); -
trunk/Source/WebCore/rendering/RenderReplaced.cpp
r112301 r112936 162 162 LayoutRect selectionPaintingRect = localSelectionRect(); 163 163 selectionPaintingRect.moveBy(adjustedPaintOffset); 164 paintInfo.context->fillRect( selectionPaintingRect, selectionBackgroundColor(), style()->colorSpace());164 paintInfo.context->fillRect(pixelSnappedIntRect(selectionPaintingRect), selectionBackgroundColor(), style()->colorSpace()); 165 165 } 166 166 } … … 361 361 LayoutUnit marginStart = minimumValueForLength(style()->marginStart(), logicalWidth); 362 362 LayoutUnit marginEnd = minimumValueForLength(style()->marginEnd(), logicalWidth); 363 logicalWidth = max( 0, logicalWidth - (marginStart + marginEnd + (width() - clientWidth())));363 logicalWidth = max(zeroLayoutUnit, logicalWidth - (marginStart + marginEnd + (width() - clientWidth()))); 364 364 if (isPercentageIntrinsicSize) 365 365 logicalWidth = roundToInt(logicalWidth * intrinsicSize.width() / 100); … … 426 426 427 427 if (style()->maxWidth().isFixed()) 428 m_maxPreferredLogicalWidth = min (m_maxPreferredLogicalWidth, style()->maxWidth().value() + (style()->boxSizing() == CONTENT_BOX ? borderAndPadding : zeroLayoutUnit));428 m_maxPreferredLogicalWidth = min<LayoutUnit>(m_maxPreferredLogicalWidth, style()->maxWidth().value() + (style()->boxSizing() == CONTENT_BOX ? borderAndPadding : zeroLayoutUnit)); 429 429 430 430 if (hasRelativeDimensions())
Note: See TracChangeset
for help on using the changeset viewer.