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.
Created attachment 306442 [details]
Created attachment 306451 [details]
To be referenced by the test case
Created attachment 306452 [details]
Comment on attachment 306442 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=306442&action=review
> + Test: fast/images/async-image-background-image-repeated.html
This should go below the paragraph below.
> + // Comparing DedocingOptions with isAsynchronous() should not happen.
Created attachment 306584 [details]
Comment on attachment 306584 [details]
Clearing flags on attachment: 306584
Committed r215157: <http://trac.webkit.org/changeset/215157>
All reviewed patches have been landed. Closing bug.