To reproduce, open the attached test case. If the window size is not an integer multiple of the native size of the background image (so it is scaled), you will notice the background image jiggling as it is undergoes repeated partial repaints (a 50%-height band moves down and up across the image, forcing repainting). The problem goes away if in BitmapImage::draw() in ImageCG.cpp, shouldUseSubimage is forced to false.
<rdar://problem/7009243>
Created attachment 31897 [details] Test case
Created attachment 31898 [details] Test case Fixed typo
Created attachment 31907 [details] Patch Since the subimage is always pixel-aligned in the source image’s coordinate space, it can encompass more than the desired source rect. subimageRect is the actual source rect for the subimage. The adjusted destination rect is… adjusted in order to get the desired mapping. However, there is a problem: this results in drawing outside the desired destination rect. This can be seen in fast/backgrounds/size/backgroundSize15.html . Clipping to destRect solved this, but creates subpixel gaps when the context is transformed, such as in fast/borders/border-image-rotate-transform.html. I am not sure how to resolve this problem.
I broke this in <http://trac.webkit.org/changeset/41238> by making this code path paint only a portion of the image.
*** Bug 27307 has been marked as a duplicate of this bug. ***
Created attachment 32900 [details] Patch Updated the previous patch. Added clipping to the destination rect—drawPattern already does that, so we already have subpixel gaps in that case.
Fixed in <http://trac.webkit.org/projects/webkit/changeset/46002>.