Changeset 167637 in webkit
- Timestamp:
- Apr 21, 2014 5:15:35 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r167632 r167637 1 2014-04-21 Zalan Bujtas <zalan@apple.com> 2 3 REGRESSION (r166784): Gradient at background of iCloud login page doesn’t go all the way to the bottom 4 https://bugs.webkit.org/show_bug.cgi?id=131924 5 6 Computing tile dimension for contain/cover requires higher precision than what LayoutUnit has. Switching to floats. 7 8 Reviewed by Simon Fraser. 9 10 * fast/backgrounds/hidpi-background-image-contain-cover-scale-needs-more-precision-expected.html: Added. 11 * fast/backgrounds/hidpi-background-image-contain-cover-scale-needs-more-precision.html: Added. 12 1 13 2014-04-21 Eric Carlson <eric.carlson@apple.com> 2 14 -
trunk/Source/WebCore/ChangeLog
r167636 r167637 1 2014-04-21 Zalan Bujtas <zalan@apple.com> 2 3 REGRESSION (r166784): Gradient at background of iCloud login page doesn’t go all the way to the bottom 4 https://bugs.webkit.org/show_bug.cgi?id=131924 5 6 Computing tile dimension for contain/cover requires higher precision than what LayoutUnit has. Switching to floats. 7 8 Reviewed by Simon Fraser. 9 10 Test: fast/backgrounds/hidpi-background-image-contain-cover-scale-needs-more-precision.html 11 12 * rendering/RenderBoxModelObject.cpp: 13 (WebCore::RenderBoxModelObject::calculateFillTileSize): 14 1 15 2014-04-21 Dean Jackson <dino@apple.com> 2 16 -
trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp
r167351 r167637 978 978 case Contain: 979 979 case Cover: { 980 float horizontalScaleFactor = imageIntrinsicSize.width() ? (positioningAreaSize.width() / imageIntrinsicSize.width()).toFloat() : 1; 981 float verticalScaleFactor = imageIntrinsicSize.height() ? (positioningAreaSize.height() / imageIntrinsicSize.height()).toFloat() : 1; 980 // Scale computation needs higher precision than what LayoutUnit can offer. 981 FloatSize localImageIntrinsicSize = imageIntrinsicSize; 982 FloatSize localPositioningAreaSize = positioningAreaSize; 983 984 float horizontalScaleFactor = localImageIntrinsicSize.width() ? (localPositioningAreaSize.width() / localImageIntrinsicSize.width()) : 1; 985 float verticalScaleFactor = localImageIntrinsicSize.height() ? (localPositioningAreaSize.height() / localImageIntrinsicSize.height()) : 1; 982 986 float scaleFactor = type == Contain ? std::min(horizontalScaleFactor, verticalScaleFactor) : std::max(horizontalScaleFactor, verticalScaleFactor); 983 987 float deviceScaleFactor = document().deviceScaleFactor(); 984 return LayoutSize(std::max<LayoutUnit>(1 / deviceScaleFactor, imageIntrinsicSize.width() * scaleFactor),985 std::max<LayoutUnit>(1 / deviceScaleFactor, imageIntrinsicSize.height() * scaleFactor));988 return LayoutSize(std::max<LayoutUnit>(1 / deviceScaleFactor, localImageIntrinsicSize.width() * scaleFactor), 989 std::max<LayoutUnit>(1 / deviceScaleFactor, localImageIntrinsicSize.height() * scaleFactor)); 986 990 } 987 991 }
Note: See TracChangeset
for help on using the changeset viewer.