-
simon.fraser@apple.com authored
https://bugs.webkit.org/show_bug.cgi?id=116319 Source/WebCore: Reviewed by Darin Adler. The optimization added in r102952 was incorrect in the case where a style change resulted in a positioned-movement-only layout but also required a repaint; it assumed that a composited layer did not need to be repainted for a a positioned-movement-only layout. Fix by making RenderObject::setNeedsLayoutForPositionedMovement() check whether the style change requires a repaint, and calling setLayerNeedsFullRepaint() in that situation. Test: compositing/repaint/positioned-movement.html * rendering/RenderLayer.h: RepaintStatus values do not need to be bit flags. * rendering/RenderObject.cpp: (WebCore::RenderObject::setStyle): Pass the old style to setNeedsPositionedMovementLayout(). (WebCore::RenderObject::styleDidChange): Ditto. * rendering/RenderObject.h: (WebCore::RenderObject::setNeedsPositionedMovementLayout): Now takes a const RenderStyle*. * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::diff): Remove a comment now that this bug is fixed. (WebCore::RenderStyle::diffRequiresRepaint): Public wrapper for changeRequiresRepaint(). That function never uses contextSensitiveProperties so we can safely ignore them. * rendering/style/RenderStyle.h: Expose a way to call changeRequiresRepaint(). LayoutTests: Reviewed by Darin Adler. Test that does a positioned-movement-only layout and dumps a layer tree with repaint rects. * compositing/repaint/positioned-movement-expected.txt: Added. * compositing/repaint/positioned-movement.html: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151622 268f45cc-cd09-0410-ab3c-d52691b4dbfc
bcd58946