If box shadows are applied on top of a transparency layer, the result is very slow painting. An example is the page http://paste.chakra-project.org/3755/. The issue is that the ShadowBlur layer ends up being the entire size of box element, instead of just the size of the transparency layer. This happens because the clipping set on QPainter is much larger than the area QPainter is painting to. One way to avoid it, is to set an initial clipping to the area QPainter is painting to, so that later clipping (set by intersection), can not end up larger than the layer.
Created attachment 183958 [details] Patch
I can confirm that the patch helps the issue. Unfortunately, it's not ideal. Rendering the page provided changed from unusably slow to slow on my machine (i5).
Committed r140412: <http://trac.webkit.org/changeset/140412>
Created attachment 183976 [details] Patch Do not change clips used by QPainter, instead ensure clipBounds return a clip intersected with the window bounds
Comment on attachment 183976 [details] Patch Clearing flags on attachment: 183976 Committed r141413: <http://trac.webkit.org/changeset/141413>
All reviewed patches have been landed. Closing bug.