<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>122857</bug_id>
          
          <creation_ts>2013-10-15 12:59:55 -0700</creation_ts>
          <short_desc>Mask/background-repeat: round should round the number of tiles of an image to the nearest natural number greater than 0</short_desc>
          <delta_ts>2013-10-15 14:48:30 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Layout and Rendering</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>120668</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>BlinkMergeCandidate</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ryosuke Niwa">rniwa</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bdakin</cc>
    
    <cc>dino</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>thorton</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>940095</commentid>
    <comment_count>0</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2013-10-15 12:59:55 -0700</bug_when>
    <thetext>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-&gt;xPosition(), availableWidth, renderView, true);
     if (backgroundRepeatX == RoundFill &amp;&amp; positioningAreaSize.width() &gt; 0 &amp;&amp; fillTileSize.width() &gt; 0) {
-        int nrTiles = ceil((double)positioningAreaSize.width() /
-            fillTileSize.width());
+        long nrTiles = lroundf((float)positioningAreaSize.width() / fillTileSize.width());
 
         if (fillLayer-&gt;size().size.height().isAuto() &amp;&amp; backgroundRepeatY != RoundFill) {
             fillTileSize.setHeight(fillTileSize.height() * positioningAreaSize.width() / (nrTiles * fillTileSize.width()));
@@ -1076,8 +1075,7 @@
 
     LayoutUnit computedYPosition = minimumValueForLength(fillLayer-&gt;yPosition(), availableHeight, renderView, true);
     if (backgroundRepeatY == RoundFill &amp;&amp; positioningAreaSize.height() &gt; 0 &amp;&amp; fillTileSize.height() &gt; 0) {
-        int nrTiles = ceil((double)positioningAreaSize.height() /
-            fillTileSize.height());
+        long nrTiles = lroundf((float)positioningAreaSize.height() / fillTileSize.height());
 
         if (fillLayer-&gt;size().size.width().isAuto() &amp;&amp; backgroundRepeatX != RoundFill) {
             fillTileSize.setWidth(fillTileSize.width() * positioningAreaSize.height() / (nrTiles * fillTileSize.height()));
Powered by Gitiles</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>940134</commentid>
    <comment_count>1</comment_count>
    <who name="Dean Jackson">dino</who>
    <bug_when>2013-10-15 14:48:30 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 120668 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>