When viewing the page: http://www.apple.com/safari/features.html vertical resizes are taking a very long time (500ms+, sometimes multiple seconds) which causes the entire browser to seize up, the window to go white, etc. Instrumentation points to the time being spent in ScrollView::paint() and children. Layout time is very very short, it appears there's something horrible going on in the rasterizing code. This behavior appears on the Windows and Mac WebKit nightlies, Safari 4 beta on Windows and Mac, and in the Chromium port.
A similar thing occurs with full-screen zoom.
<rdar://problem/6618196>
Created attachment 27932 [details] Reduced testcase The critical bits are: *) background: -webkit-gradient *) lots of text on a fixed-width element *) resizing the window to smaller than the width of the text-containing element, forcing a clip. It appears to perform worse on OS X compared to Safari 4 beta on Windows or Chromium.
Created attachment 27941 [details] Another reduction A smaller reduction. The border is critical.
The problem seems to happen when Image::drawTiled() chooses to call GeneratedImage::drawPattern() instead of GeneratedImage::draw(), namely when the destination rect is not contained in the tile rect. GeneratedImage::drawPattern() proceeds to allocate a potentially huge image buffer, draw into it, create an image out of it (copying the data in the process), and then use that image as a pattern.
Created attachment 27996 [details] Intersect the destination rect passed to darwTiledImage() with the dirty rect
Comment on attachment 27996 [details] Intersect the destination rect passed to darwTiledImage() with the dirty rect Going to add a test case
Created attachment 27997 [details] Intersect the destination rect passed to darwTiledImage() with the dirty rect
Comment on attachment 27997 [details] Intersect the destination rect passed to darwTiledImage() with the dirty rect r-me
Fixed in <http://trac.webkit.org/changeset/41238>. See also bug 24178.
*** Bug 24956 has been marked as a duplicate of this bug. ***