<html>
    <head>
      <base href="https://bugs.webkit.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - A synchronous DecodingOptions should be compatible with any asynchronous sizeForDrawing DecodingOptions"
   href="https://bugs.webkit.org/show_bug.cgi?id=170577">170577</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>A synchronous DecodingOptions should be compatible with any asynchronous sizeForDrawing DecodingOptions
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>WebKit Nightly Build
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Images
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>sabouhallawa&#64;apple.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>This prevents the following repaint infinite loop:

Suppose I have two elements 'x' and 'y' and 'y' is the parent of 'x'. Both 'x' and 'y' are using the image 'm' to draw their background. 'x' does not repeat the background while 'y' does.

1. 'x' draws its background.
2. 'm' is not decoded, so request async image decoding for 'm' since it is a large image.
3. 'm' finishes decoding, it repaints the rectangle of 'x'.
4. Repainting the rectangle of 'x' causes a repaint for 'y' as well.
5. To paint 'y', 'm' will be used to draw a pattern.
6. To draw a pattern of 'm', a synchronous decoded frame has to be obtained so the one that finished decoding is now deleted.
7. Now goto step 1

This loops will runs forever. To prevent this loop from happening, once a synchronous decoded frame is found, there is no need to decode it again. This decoded frame is suitable for any sizeForDrawing.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>