haikuwebkit/LayoutTests/svg/repaint/svgsvgelement-repaint-child...

29 lines
786 B
HTML
Raw Permalink Normal View History

Prevent skipped repaints for children of inner SVG elements https://bugs.webkit.org/show_bug.cgi?id=108429 Reviewed by Eric Seidel. Source/WebCore: This patch fixes a bug caused by r108699 and r133786 where we would not repaint children of inner SVG elements because "m_didTransformToRootUpdate" was never reset on viewport containers. The stale m_didTransformToRootUpdate variable caused us to skip child repaints. I verified that the Robohornet SVG benchmark performance gains in r133786 are not regressed with this patch. Test: svg/repaint/svgsvgelement-repaint-children.html * rendering/svg/RenderSVGViewportContainer.cpp: (WebCore::RenderSVGViewportContainer::calcViewport): This can be removed because setNeedsTransformUpdate() will set m_needsTransformUpdate. (WebCore::RenderSVGViewportContainer::calculateLocalTransform): This change is straightforward and is similar to the equivalent assignment in RenderSVGTransformableContainer::calculateLocalTransform(). LayoutTests: Need to update expectations for a single file (just a 1px difference). * platform/chromium/TestExpectations: * platform/efl/TestExpectations: * platform/mac/TestExpectations: * platform/qt/TestExpectations: * platform/win/TestExpectations: * svg/repaint/svgsvgelement-repaint-children-expected.png: Added. * svg/repaint/svgsvgelement-repaint-children-expected.txt: Added. * svg/repaint/svgsvgelement-repaint-children.html: Added. Canonical link: https://commits.webkit.org/126907@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@141645 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-02-01 22:38:50 +00:00
<!DOCTYPE HTML>
<html>
<head>
<script src="../../fast/repaint/resources/repaint.js"></script>
</head>
<!-- Test for WK108429: All red should disappear, leaving just a green square. -->
<body onload="runRepaintTest()">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="400" height="400">
<svg>
<rect x="0" y="0" width="100" height="100" fill="green"/>
<path id="path" d="M0 0 L 100 0 L 100 100 L 0 100Z" fill="red"/>
</svg>
<script>
function repaintTest() {
if (window.testRunner)
testRunner.waitUntilDone();
setTimeout(function() {
var pathEl = document.getElementById('path');
pathEl.setAttribute('d', 'M0 0Z');
if (window.testRunner)
testRunner.notifyDone();
}, 1);
}
</script>
</svg>
</body>
</html>