haikuwebkit/LayoutTests/svg/repaint/remove-background-property-...

3 lines
83 B
HTML
Raw Permalink Normal View History

Dynamic background color changes do not update until a layout is forced https://bugs.webkit.org/show_bug.cgi?id=131623 Source/WebCore: Compute correct repaint rect for decorated RenderSVGRoots. The current implementation of clippedOverflowRectForRepaint() uses the generic repaint-rect calculations in SVGRenderSupport. Those in turn make use of repaintRectInLocalCoordinates(), which for RenderSVGRoot is the union of the painted children (w/ some expansion). If there're no children, or they do not fill the entire content box, then a repaint would not repaint the correct parts. Fix by calculating the union of the border-box and the SVG content when the SVG root is decorated (has background/border/etc.) Adapted from a Chromium patch by fs@opera.com https://src.chromium.org/viewvc/blink?revision=170890&view=revision Patch by Antoine Quint <graouts@apple.com> on 2015-10-09 Reviewed by Darin Adler. Tests: svg/repaint/add-background-property-on-root.html svg/repaint/add-border-property-on-root.html svg/repaint/add-outline-property-on-root.html svg/repaint/change-background-color.html svg/repaint/remove-background-property-on-root.html svg/repaint/remove-border-property-on-root.html svg/repaint/remove-outline-property-on-root.html * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::layout): (WebCore::RenderSVGRoot::styleDidChange): (WebCore::RenderSVGRoot::clippedOverflowRectForRepaint): LayoutTests: Add some new tests checking that dynamically updating the "background", "border" and "outline" CSS properties repaint correctly and rebase a few existing tests that yield the same rendered results but slightly different DRT output. Patch by Antoine Quint <graouts@apple.com> on 2015-10-09 Reviewed by Darin Adler. * platform/mac/fast/repaint/moving-shadow-on-container-expected.txt: * platform/mac/svg/custom/simple-text-double-shadow-expected.txt: * svg/css/composite-shadow-example-expected.txt: * svg/css/composite-shadow-with-opacity-expected.txt: * svg/repaint/add-background-property-on-root-expected.html: Added. * svg/repaint/add-background-property-on-root.html: Added. * svg/repaint/add-border-property-on-root-expected.html: Added. * svg/repaint/add-border-property-on-root.html: Added. * svg/repaint/add-outline-property-on-root-expected.html: Added. * svg/repaint/add-outline-property-on-root.html: Added. * svg/repaint/change-background-color-expected.html: Added. * svg/repaint/change-background-color.html: Added. * svg/repaint/remove-background-property-on-root-expected.html: Added. * svg/repaint/remove-background-property-on-root.html: Added. * svg/repaint/remove-border-property-on-root-expected.html: Added. * svg/repaint/remove-border-property-on-root.html: Added. * svg/repaint/remove-outline-property-on-root-expected.html: Added. * svg/repaint/remove-outline-property-on-root.html: Added. * svg/repaint/repaint-webkit-svg-shadow-expected.txt: Canonical link: https://commits.webkit.org/168112@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@190816 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-10-09 19:59:12 +00:00
<!DOCTYPE html>
<div style="width: 100px; height: 100px; background: green"></div>