[Webkit-unassigned] [Bug 122857] New: Mask/background-repeat: round should round the number of tiles of an image to the nearest natural number greater than 0

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 15 13:01:11 PDT 2013


https://bugs.webkit.org/show_bug.cgi?id=122857

           Summary: Mask/background-repeat: round should round the number
                    of tiles of an image to the nearest natural number
                    greater than 0
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Keywords: BlinkMergeCandidate
          Severity: Normal
          Priority: P2
         Component: Layout and Rendering
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: rniwa at webkit.org
                CC: bdakin at apple.com, simon.fraser at apple.com,
                    dino at apple.com, thorton at apple.com


Consider merging https://chromium.googlesource.com/chromium/blink/+/ef18a9ac1bb234f9baf15833fd3e5bf58792e351

index aada216..f978c7a 100644
--- a/Source/core/rendering/RenderBoxModelObject.cpp
+++ b/Source/core/rendering/RenderBoxModelObject.cpp
@@ -1062,8 +1062,7 @@

     LayoutUnit computedXPosition = minimumValueForLength(fillLayer->xPosition(), availableWidth, renderView, true);
     if (backgroundRepeatX == RoundFill && positioningAreaSize.width() > 0 && fillTileSize.width() > 0) {
-        int nrTiles = ceil((double)positioningAreaSize.width() /
-            fillTileSize.width());
+        long nrTiles = lroundf((float)positioningAreaSize.width() / fillTileSize.width());

         if (fillLayer->size().size.height().isAuto() && backgroundRepeatY != RoundFill) {
             fillTileSize.setHeight(fillTileSize.height() * positioningAreaSize.width() / (nrTiles * fillTileSize.width()));
@@ -1076,8 +1075,7 @@

     LayoutUnit computedYPosition = minimumValueForLength(fillLayer->yPosition(), availableHeight, renderView, true);
     if (backgroundRepeatY == RoundFill && positioningAreaSize.height() > 0 && fillTileSize.height() > 0) {
-        int nrTiles = ceil((double)positioningAreaSize.height() /
-            fillTileSize.height());
+        long nrTiles = lroundf((float)positioningAreaSize.height() / fillTileSize.height());

         if (fillLayer->size().size.width().isAuto() && backgroundRepeatX != RoundFill) {
             fillTileSize.setWidth(fillTileSize.width() * positioningAreaSize.height() / (nrTiles * fillTileSize.height()));
Powered by Gitiles

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list