RenderStyle::diff() is tricky for two reasons. First, there's nothing to enforce the requirement that "more work" diffs have to be detected before "less work" diffs (i.e. we have to always check for changes that result in StyleDifferenceLayout before changes that result in StyleDifferenceRepaint). Secondly, in some cases, even when we return, say, StyleDifferenceLayoutPositionedMovementOnly or StyleDifferenceRecompositeLayer, we also need to check for changes that require repaint, and that's not possible now.
Created attachment 202217 [details] Patch
Comment on attachment 202217 [details] Patch r=me, this is great.
http://trac.webkit.org/changeset/150348