The attached testcase shows a problem repainting a relatively positioned element with a transform when innerText changes.
Created attachment 26688 [details] Testcase
Created attachment 26689 [details] Another testcase -- same issue?
This is a LayoutState issue. Towards the end of RenderBlock::layoutBlock(), after we've popped the layout state, we're doing a repaintRectangle(). The current element has a transform, so we'd normally have disabled the layout state, but we after the pop, so we think it's ok to use the LayoutState in the repaint.
This seems to be an issue with LayoutState and transforms. This change fixes it but maybe we can do something more subtle. diff --git a/WebCore/rendering/RenderObject.cpp b/WebCore/rendering/RenderObject.cpp index 48d6d57..3e7b2de 100644 --- a/WebCore/rendering/RenderObject.cpp +++ b/WebCore/rendering/RenderObject.cpp @@ -1170,7 +1170,15 @@ void RenderObject::repaintRectangle(const IntRect& r, bool immediate) dirtyRect.move(view->layoutDelta()); RenderBoxModelObject* repaintContainer = containerForRepaint(); + + if (hasTransform()) + view->disableLayoutState(); + computeRectForRepaint(repaintContainer, dirtyRect); + + if (hasTransform()) + view->enableLayoutState(); + repaintUsingContainer(repaintContainer ? repaintContainer : view, dirtyRect, immediate); }
Created attachment 29219 [details] Patch, testcase, changelog This patch fixes both testcases in this bug.
http://trac.webkit.org/changeset/42197