haikuwebkit/LayoutTests/svg/custom/marker-child-changes-css.svg

25 lines
1.1 KiB
XML
Raw Permalink Normal View History

Switch svg/custom tests to repaint harness https://bugs.webkit.org/show_bug.cgi?id=78115 Reviewed by Andreas Kling. Make all tests that exercise repainting use the fast/repaint/resources/repaint.js harness. * platform/chromium/test_expectations.txt: * platform/mac/svg/custom/absolute-sized-content-with-resources-expected.png: * platform/mac/svg/custom/absolute-sized-content-with-resources-expected.txt: * platform/mac/svg/custom/animate-path-discrete-expected.png: * platform/mac/svg/custom/animate-path-morphing-expected.png: * platform/mac/svg/custom/animate-target-id-changed-expected.png: * platform/mac/svg/custom/animate-target-removed-from-document-expected.png: * platform/mac/svg/custom/circle-move-invalidation-expected.png: * platform/mac/svg/custom/clip-path-child-changes-expected.png: * platform/mac/svg/custom/clip-path-href-changes-expected.png: * platform/mac/svg/custom/clip-path-id-changes-expected.png: * platform/mac/svg/custom/clip-path-units-changes-expected.png: * platform/mac/svg/custom/deep-dynamic-updates-expected.png: * platform/mac/svg/custom/fill-opacity-update-expected.png: * platform/mac/svg/custom/foreignObject-crash-on-hover-expected.png: * platform/mac/svg/custom/foreignObject-crash-on-hover-expected.txt: * platform/mac/svg/custom/gradient-add-stops-expected.png: * platform/mac/svg/custom/gradient-stop-style-change-expected.png: * platform/mac/svg/custom/hit-test-unclosed-subpaths-expected.png: * platform/mac/svg/custom/hit-test-unclosed-subpaths-expected.txt: * platform/mac/svg/custom/hit-test-with-br-expected.png: * platform/mac/svg/custom/js-late-clipPath-and-object-creation-expected.png: * platform/mac/svg/custom/js-late-clipPath-creation-expected.png: * platform/mac/svg/custom/js-late-gradient-and-object-creation-expected.png: * platform/mac/svg/custom/js-late-gradient-creation-expected.png: * platform/mac/svg/custom/js-late-marker-and-object-creation-expected.png: * platform/mac/svg/custom/js-late-marker-creation-expected.png: * platform/mac/svg/custom/js-late-mask-and-object-creation-expected.png: * platform/mac/svg/custom/js-late-mask-creation-expected.png: * platform/mac/svg/custom/js-late-pattern-and-object-creation-expected.png: * platform/mac/svg/custom/js-late-pattern-creation-expected.png: * platform/mac/svg/custom/js-repaint-rect-on-path-with-stroke-expected.png: * platform/mac/svg/custom/js-update-bounce-expected.png: * platform/mac/svg/custom/js-update-bounce-expected.txt: * platform/mac/svg/custom/js-update-container-expected.png: * platform/mac/svg/custom/js-update-container2-expected.png: * platform/mac/svg/custom/js-update-gradient-expected.png: * platform/mac/svg/custom/js-update-image-expected.png: * platform/mac/svg/custom/js-update-path-changes-expected.png: * platform/mac/svg/custom/js-update-path-removal-expected.png: * platform/mac/svg/custom/js-update-pattern-child-expected.png: * platform/mac/svg/custom/js-update-pattern-expected.png: * platform/mac/svg/custom/js-update-polygon-changes-expected.png: * platform/mac/svg/custom/js-update-polygon-removal-expected.png: * platform/mac/svg/custom/js-update-stop-expected.png: * platform/mac/svg/custom/js-update-stop-linked-gradient-expected.png: * platform/mac/svg/custom/js-update-stop-linked-gradient-expected.txt: * platform/mac/svg/custom/js-update-style-expected.png: * platform/mac/svg/custom/js-update-style-expected.txt: * platform/mac/svg/custom/js-update-transform-addition-expected.png: * platform/mac/svg/custom/js-update-transform-changes-expected.png: * platform/mac/svg/custom/marker-child-changes-css-expected.png: * platform/mac/svg/custom/marker-child-changes-expected.png: * platform/mac/svg/custom/marker-strokeWidth-changes-expected.png: * platform/mac/svg/custom/marker-viewBox-changes-expected.png: * platform/mac/svg/custom/mask-child-changes-expected.png: * platform/mac/svg/custom/mask-invalidation-expected.png: * platform/mac/svg/custom/mask-invalidation-expected.txt: * platform/mac/svg/custom/object-sizing-no-width-height-change-content-box-size-expected.png: * platform/mac/svg/custom/prevent-default-expected.png: * platform/mac/svg/custom/relative-sized-content-expected.png: * platform/mac/svg/custom/relative-sized-content-with-resources-expected.png: * platform/mac/svg/custom/relative-sized-content-with-resources-expected.txt: * platform/mac/svg/custom/relative-sized-deep-shadow-tree-content-expected.png: * platform/mac/svg/custom/relative-sized-image-expected.png: * platform/mac/svg/custom/relative-sized-inner-svg-expected.png: * platform/mac/svg/custom/relative-sized-shadow-tree-content-expected.png: * platform/mac/svg/custom/relative-sized-shadow-tree-content-with-symbol-expected.png: * platform/mac/svg/custom/relative-sized-use-on-symbol-expected.png: * platform/mac/svg/custom/relative-sized-use-without-attributes-on-symbol-expected.png: * platform/mac/svg/custom/repaint-moving-svg-and-div-expected.png: * platform/mac/svg/custom/repaint-on-image-bounds-change-expected.png: * platform/mac/svg/custom/resource-client-removal-expected.png: * platform/mac/svg/custom/resource-invalidate-on-target-update-expected.png: * platform/mac/svg/custom/scroll-hit-test-expected.png: * platform/mac/svg/custom/scrolling-embedded-svg-file-image-repaint-problem-expected.png: * platform/mac/svg/custom/stroke-opacity-update-expected.png: * platform/mac/svg/custom/svg-absolute-children-expected.png: * platform/mac/svg/custom/text-dom-removal-expected.png: * platform/mac/svg/custom/text-repaint-including-stroke-expected.png: * platform/mac/svg/custom/text-repaint-including-stroke-expected.txt: * platform/mac/svg/custom/text-xy-updates-SVGList-expected.png: * platform/mac/svg/custom/use-clipped-hit-expected.png: * platform/mac/svg/custom/use-clipped-hit-expected.txt: * platform/mac/svg/custom/use-detach-expected.png: * platform/mac/svg/custom/use-disappears-after-style-update-expected.png: * platform/mac/svg/custom/use-elementInstance-event-target-expected.png: * platform/mac/svg/custom/use-elementInstance-methods-expected.png: * platform/mac/svg/custom/use-event-handler-on-referenced-element-expected.png: * platform/mac/svg/custom/use-event-handler-on-use-element-expected.png: * platform/mac/svg/custom/use-inherit-style-expected.png: * platform/mac/svg/custom/use-instanceRoot-as-event-target-expected.png: Removed. * platform/mac/svg/custom/use-instanceRoot-event-bubbling-expected.png: * platform/mac/svg/custom/use-instanceRoot-event-listeners-expected.png: * platform/mac/svg/custom/use-setAttribute-crash-expected.png: * svg/custom/absolute-sized-content-with-resources.xhtml: * svg/custom/animate-path-discrete.svg: * svg/custom/animate-path-morphing.svg: * svg/custom/animate-target-id-changed.svg: * svg/custom/animate-target-removed-from-document.svg: * svg/custom/circle-move-invalidation.svg: * svg/custom/clip-path-child-changes.svg: * svg/custom/clip-path-href-changes.svg: * svg/custom/clip-path-id-changes.svg: * svg/custom/clip-path-units-changes.svg: * svg/custom/deep-dynamic-updates.svg: * svg/custom/fill-opacity-update.svg: * svg/custom/foreignObject-crash-on-hover.xml: * svg/custom/gradient-add-stops.svg: * svg/custom/gradient-stop-style-change.svg: * svg/custom/hit-test-path-stroke.svg: * svg/custom/hit-test-path.svg: * svg/custom/hit-test-unclosed-subpaths.svg: * svg/custom/hit-test-with-br.xhtml: * svg/custom/js-late-clipPath-and-object-creation.svg: * svg/custom/js-late-clipPath-creation.svg: * svg/custom/js-late-gradient-and-object-creation.svg: * svg/custom/js-late-gradient-creation.svg: * svg/custom/js-late-marker-and-object-creation.svg: * svg/custom/js-late-marker-creation.svg: * svg/custom/js-late-mask-and-object-creation.svg: * svg/custom/js-late-mask-creation.svg: * svg/custom/js-late-pattern-and-object-creation.svg: * svg/custom/js-late-pattern-creation.svg: * svg/custom/js-repaint-rect-on-path-with-stroke.svg: * svg/custom/js-update-bounce.svg: * svg/custom/js-update-container.svg: * svg/custom/js-update-container2.svg: * svg/custom/js-update-gradient.svg: * svg/custom/js-update-image.svg: * svg/custom/js-update-path-changes.svg: * svg/custom/js-update-path-removal.svg: * svg/custom/js-update-pattern-child.svg: * svg/custom/js-update-pattern.svg: * svg/custom/js-update-polygon-changes.svg: * svg/custom/js-update-polygon-removal.svg: * svg/custom/js-update-stop-linked-gradient.svg: * svg/custom/js-update-stop.svg: * svg/custom/js-update-style.svg: * svg/custom/js-update-transform-addition.svg: * svg/custom/js-update-transform-changes.svg: * svg/custom/linking-a-03-b-all.svg: * svg/custom/linking-a-03-b-preserveAspectRatio.svg: * svg/custom/linking-a-03-b-transform.svg: * svg/custom/linking-a-03-b-viewBox-transform.svg: * svg/custom/linking-a-03-b-viewBox.svg: * svg/custom/linking-a-03-b-viewTarget.svg: * svg/custom/linking-a-03-b-zoomAndPan.svg: * svg/custom/marker-child-changes-css.svg: * svg/custom/marker-child-changes.svg: * svg/custom/marker-strokeWidth-changes.svg: * svg/custom/marker-viewBox-changes.svg: * svg/custom/mask-child-changes.svg: * svg/custom/mask-invalidation.svg: * svg/custom/object-sizing-no-width-height-change-content-box-size.xhtml: * svg/custom/pending-resource-after-removal-expected.png: * svg/custom/pending-resource-after-removal.xhtml: * svg/custom/pending-resource-leak-2.svg: * svg/custom/pending-resource-leak-3.svg: * svg/custom/prevent-default.svg: * svg/custom/relative-sized-content-with-resources.xhtml: * svg/custom/relative-sized-content.xhtml: * svg/custom/relative-sized-deep-shadow-tree-content.xhtml: * svg/custom/relative-sized-image.xhtml: * svg/custom/relative-sized-inner-svg.xhtml: * svg/custom/relative-sized-shadow-tree-content-with-symbol.xhtml: * svg/custom/relative-sized-shadow-tree-content.xhtml: * svg/custom/relative-sized-use-on-symbol.xhtml: * svg/custom/relative-sized-use-without-attributes-on-symbol.xhtml: * svg/custom/repaint-moving-svg-and-div.xhtml: * svg/custom/repaint-on-constant-size-change.svg: * svg/custom/repaint-on-image-bounds-change.svg: * svg/custom/repaint-shadow.svg: * svg/custom/repaint-stroke-width-changes.svg: * svg/custom/resource-client-removal.svg: * svg/custom/resource-invalidate-on-target-update.svg: * svg/custom/resources/use-instanceRoot-event-bubbling.js: (repaintTest): * svg/custom/resources/use-instanceRoot-event-listeners.js: (repaintTest): * svg/custom/scroll-hit-test.xhtml: * svg/custom/scroll-to-anchor-in-symbol.svg: * svg/custom/scrolling-embedded-svg-file-image-repaint-problem.html: * svg/custom/stroke-opacity-update.svg: * svg/custom/svg-absolute-children.svg: * svg/custom/svg-disallowed-in-dashboard-object.html: * svg/custom/svg-fonts-in-html-linebreaks.html: * svg/custom/text-dom-removal.svg: * svg/custom/text-repaint-including-stroke.svg: * svg/custom/text-xy-updates-SVGList.xhtml: * svg/custom/use-animation-in-fill.html: * svg/custom/use-clipped-hit.svg: * svg/custom/use-crash-in-non-wellformed-document.svg: * svg/custom/use-crash-when-href-change.svg: * svg/custom/use-detach.svg: * svg/custom/use-disappears-after-style-update.svg: * svg/custom/use-elementInstance-event-target.svg: * svg/custom/use-elementInstance-methods.svg: * svg/custom/use-event-handler-on-referenced-element.svg: * svg/custom/use-event-handler-on-use-element.svg: * svg/custom/use-inherit-style.svg: * svg/custom/use-instanceRoot-as-event-target.xhtml: * svg/custom/use-instanceRoot-event-bubbling.xhtml: * svg/custom/use-instanceRoot-event-listeners.xhtml: * svg/custom/use-multiple-on-nested-disallowed-font.html: * svg/custom/use-setAttribute-crash.svg: Canonical link: https://commits.webkit.org/95114@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@107207 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-02-09 11:21:42 +00:00
<svg width="800" height="600" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" onload="runRepaintTest()">
<script xlink:href="../../fast/repaint/resources/repaint.js"/>
2010-07-16 Nikolas Zimmermann <nzimmermann@rim.com> Reviewed by Dirk Schulze. relative positioning does not work for radialGradient after window resize https://bugs.webkit.org/show_bug.cgi?id=41249 Redesign the way resources are invalidated. No longer utilize the DOM tree, specifically SVGStyledElement::svgAttributeChanged(), to invalidate all resources in the ancestor chain (including itself) when any attribute changes. rect.setAttribute("foo", "bar") should never invalidate the resources. Also the old approach didn't work correctly if the root layout changed (eg. window size change) - we failed to invalidate the resources, thus leading to wrong renderings. Instead of calling setNeedsLayout(true) from the SVG*Element classes, call RenderSVGResource::markForLayoutAndParentResourceInvalidation(), which does the same thing and invalidates all resources in the ancestor chain (removing the cached results from the HashMaps). This only happens from the various svgAttributeChanged() methods, if we know which attribute changed, and what action has to be taken. All SVG renderers now invalidate their own resources on layout() if the layout changed (selfNeedsLayout()=true). The resources will be recreated and cached during the following paint() call. Tests: svg/custom/marker-child-changes-css.svg svg/custom/relative-sized-content-with-resources.xhtml * rendering/RenderForeignObject.cpp: (WebCore::RenderForeignObject::layout): If our layout changed, invalidate our resources, by calling RenderSVGResource::invalidateAllResourcesOfRenderer(). * rendering/RenderPath.cpp: (WebCore::RenderPath::layout): Ditto. * rendering/RenderSVGContainer.cpp: (WebCore::RenderSVGContainer::layout): Ditto. * rendering/RenderSVGImage.cpp: (WebCore::RenderSVGImage::layout): Ditto. * rendering/RenderSVGModelObject.cpp: (WebCore::RenderSVGModelObject::styleDidChange): Added, to invalidate resources on CSS changes, covered by new svg/custom/marker-child-changes-css.svg test. * rendering/RenderSVGModelObject.h: * rendering/RenderSVGResource.cpp: (WebCore::RenderSVGResource::markForLayoutAndResourceInvalidation): Add new "needsBoundaries" parameter, calling setNeedsBoundaries() on the target render object, simplifying all RenderSVGResource* code. (WebCore::RenderSVGResource::markForLayoutAndParentResourceInvalidation): New static method used from DOM tree to invalidate all cached resources in the ancestor chain for a render object. Also marks the renderer for layout, if needed. * rendering/RenderSVGResource.h: * rendering/RenderSVGResourceClipper.cpp: Simplify code, remove no longer needed hacks, as invalidation is now carried out by render tree. (WebCore::RenderSVGResourceClipper::RenderSVGResourceClipper): Add m_invalidationBlocked hack, to avoid invalidations, while we're mutating the render styles (which is a hack!). (WebCore::RenderSVGResourceClipper::invalidateClients): Don't do anything if m_invalidationBlocked=true. (WebCore::RenderSVGResourceClipper::invalidateClient): Ditto. (WebCore::RenderSVGResourceClipper::createClipData): Set m_invalidationBlocked before mutating render styles, as they are restored immediately after creating the clip image. (WebCore::RenderSVGResourceClipper::resourceBoundingBox): Remove no longer needed hack to initialize ClipperData earlier than applyResource() would do. * rendering/RenderSVGResourceClipper.h: * rendering/RenderSVGResourceFilter.cpp: (WebCore::RenderSVGResourceFilter::invalidateClients): Simplify code using markForLayoutAndResourceInvalidation. (WebCore::RenderSVGResourceFilter::invalidateClient): Remove wrong assertion. * rendering/RenderSVGResourceGradient.cpp: (WebCore::RenderSVGResourceGradient::invalidateClients): Simplify code using markForLayoutAndResourceInvalidation. (WebCore::RenderSVGResourceGradient::invalidateClient): Remove wrong assertion. * rendering/RenderSVGResourceMarker.cpp: (WebCore::RenderSVGResourceMarker::invalidateClients): Simplify code using markForLayoutAndResourceInvalidation. (WebCore::RenderSVGResourceMarker::invalidateClient): Remove wrong assertion. * rendering/RenderSVGResourceMasker.cpp: (WebCore::RenderSVGResourceMasker::invalidateClients): Simplify code using markForLayoutAndResourceInvalidation. (WebCore::RenderSVGResourceMasker::invalidateClient): Remove wrong assertion. (WebCore::RenderSVGResourceMasker::resourceBoundingBox): Remove no longer needed hack to initializer MaskerData earlier than applyResource() would do. * rendering/RenderSVGResourcePattern.cpp: (WebCore::RenderSVGResourcePattern::invalidateClients): Simplify code using markForLayoutAndResourceInvalidation. (WebCore::RenderSVGResourcePattern::invalidateClient): Remove wrong assertion. * rendering/RenderSVGText.cpp: (WebCore::RenderSVGText::layout): If our layout changed, invalidate our resources, by calling RenderSVGResource::invalidateAllResourcesOfRenderer(). * svg/SVGAnimateMotionElement.cpp: (WebCore::SVGAnimateMotionElement::applyResultsToTarget): Call RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer) instead of renderer->setNeedsLayout(true). * svg/SVGAnimateTransformElement.cpp: (WebCore::SVGAnimateTransformElement::applyResultsToTarget): Ditto. * svg/SVGCircleElement.cpp: (WebCore::SVGCircleElement::svgAttributeChanged): Ditto. * svg/SVGEllipseElement.cpp: (WebCore::SVGEllipseElement::svgAttributeChanged): Ditto. * svg/SVGFEImageElement.cpp: (WebCore::SVGFEImageElement::notifyFinished): Ditto. * svg/SVGForeignObjectElement.cpp: (WebCore::SVGForeignObjectElement::svgAttributeChanged): Ditto. * svg/SVGGElement.cpp: (WebCore::SVGGElement::svgAttributeChanged): Ditto. * svg/SVGImageElement.cpp: (WebCore::SVGImageElement::svgAttributeChanged): Ditto. * svg/SVGLineElement.cpp: (WebCore::SVGLineElement::svgAttributeChanged): Ditto. * svg/SVGPathElement.cpp: (WebCore::SVGPathElement::svgAttributeChanged): Ditto. * svg/SVGPolyElement.cpp: (WebCore::SVGPolyElement::svgAttributeChanged): Ditto. * svg/SVGRectElement.cpp: (WebCore::SVGRectElement::svgAttributeChanged): Ditto. * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::setCurrentScale): Ditto. (WebCore::SVGSVGElement::svgAttributeChanged): Ditto. (WebCore::SVGSVGElement::inheritViewAttributes): Ditto. * svg/SVGStopElement.cpp: (WebCore::SVGStopElement::SVGStopElement): Changed m_offset initialization from 0.0f to 0. (WebCore::SVGStopElement::svgAttributeChanged): Add missing implementation, calling RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer) on offsetAttr changes. * svg/SVGStopElement.h: * svg/SVGStyledElement.cpp: (WebCore::SVGStyledElement::svgAttributeChanged): Don't call invalidateResourceInAncestorChain() on every attribute change, do it in all classes inheriting from us, for specific attributes. Also stop calling RenderSVGResource::invalidateAllResourcesOfRenderer(), all handled in the render tree now. (WebCore::SVGStyledElement::invalidateResourceClients): Early exit, if document is still parsing. * svg/SVGStyledElement.h: * svg/SVGTRefElement.cpp: (WebCore::SVGTRefElement::svgAttributeChanged): Call RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer) instead of renderer->setNeedsLayout(true). * svg/SVGTextElement.cpp: (WebCore::SVGTextElement::svgAttributeChanged): Ditto. * svg/SVGTextPathElement.cpp: (WebCore::SVGTextPathElement::svgAttributeChanged): Ditto. * svg/SVGTextPositioningElement.cpp: (WebCore::SVGTextPositioningElement::svgAttributeChanged): Ditto. * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::svgAttributeChanged): Ditto. (WebCore::SVGUseElement::updateContainerSizes): Ditto. (WebCore::SVGUseElement::updateContainerOffsets): Ditto. 2010-07-16 Nikolas Zimmermann <nzimmermann@rim.com> Reviewed by Dirk Schulze. relative positioning does not work for radialGradient after window resize https://bugs.webkit.org/show_bug.cgi?id=41249 * platform/mac/svg/custom/marker-child-changes-css-expected.checksum: Added. * platform/mac/svg/custom/marker-child-changes-css-expected.png: Added. * platform/mac/svg/custom/marker-child-changes-css-expected.txt: Added. * platform/mac/svg/custom/relative-sized-content-with-resources-expected.checksum: Added. * platform/mac/svg/custom/relative-sized-content-with-resources-expected.png: Added. * platform/mac/svg/custom/relative-sized-content-with-resources-expected.txt: Added. * svg/custom/marker-child-changes-css.svg: Added. * svg/custom/relative-sized-content-with-resources.xhtml: Added. Canonical link: https://commits.webkit.org/54371@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@63531 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-07-16 08:26:24 +00:00
<defs>
<marker id="markerStart" viewBox="0 0 10 10" markerWidth="2" markerHeight="2" refX="5" refY="5" markerUnits="strokeWidth">
<rect id="rect" width="10" height="10" fill="none" stroke="none"/>
</marker>
<marker id="markerMiddle" viewBox="0 0 10 10" markerWidth="2" markerHeight="2" refX="5" refY="5" markerUnits="strokeWidth">
<circle cx="5" cy="5" r="5" fill="green" stroke="none"/>
</marker>
<marker id="markerEnd" viewBox="0 0 10 10" markerWidth="2" markerHeight="2" refX="5" refY="5" markerUnits="strokeWidth">
<path d="M 5 0 L 10 10 L 0 10 Z" fill="blue" stroke="none"/>
</marker>
</defs>
<script>
Switch svg/custom tests to repaint harness https://bugs.webkit.org/show_bug.cgi?id=78115 Reviewed by Andreas Kling. Make all tests that exercise repainting use the fast/repaint/resources/repaint.js harness. * platform/chromium/test_expectations.txt: * platform/mac/svg/custom/absolute-sized-content-with-resources-expected.png: * platform/mac/svg/custom/absolute-sized-content-with-resources-expected.txt: * platform/mac/svg/custom/animate-path-discrete-expected.png: * platform/mac/svg/custom/animate-path-morphing-expected.png: * platform/mac/svg/custom/animate-target-id-changed-expected.png: * platform/mac/svg/custom/animate-target-removed-from-document-expected.png: * platform/mac/svg/custom/circle-move-invalidation-expected.png: * platform/mac/svg/custom/clip-path-child-changes-expected.png: * platform/mac/svg/custom/clip-path-href-changes-expected.png: * platform/mac/svg/custom/clip-path-id-changes-expected.png: * platform/mac/svg/custom/clip-path-units-changes-expected.png: * platform/mac/svg/custom/deep-dynamic-updates-expected.png: * platform/mac/svg/custom/fill-opacity-update-expected.png: * platform/mac/svg/custom/foreignObject-crash-on-hover-expected.png: * platform/mac/svg/custom/foreignObject-crash-on-hover-expected.txt: * platform/mac/svg/custom/gradient-add-stops-expected.png: * platform/mac/svg/custom/gradient-stop-style-change-expected.png: * platform/mac/svg/custom/hit-test-unclosed-subpaths-expected.png: * platform/mac/svg/custom/hit-test-unclosed-subpaths-expected.txt: * platform/mac/svg/custom/hit-test-with-br-expected.png: * platform/mac/svg/custom/js-late-clipPath-and-object-creation-expected.png: * platform/mac/svg/custom/js-late-clipPath-creation-expected.png: * platform/mac/svg/custom/js-late-gradient-and-object-creation-expected.png: * platform/mac/svg/custom/js-late-gradient-creation-expected.png: * platform/mac/svg/custom/js-late-marker-and-object-creation-expected.png: * platform/mac/svg/custom/js-late-marker-creation-expected.png: * platform/mac/svg/custom/js-late-mask-and-object-creation-expected.png: * platform/mac/svg/custom/js-late-mask-creation-expected.png: * platform/mac/svg/custom/js-late-pattern-and-object-creation-expected.png: * platform/mac/svg/custom/js-late-pattern-creation-expected.png: * platform/mac/svg/custom/js-repaint-rect-on-path-with-stroke-expected.png: * platform/mac/svg/custom/js-update-bounce-expected.png: * platform/mac/svg/custom/js-update-bounce-expected.txt: * platform/mac/svg/custom/js-update-container-expected.png: * platform/mac/svg/custom/js-update-container2-expected.png: * platform/mac/svg/custom/js-update-gradient-expected.png: * platform/mac/svg/custom/js-update-image-expected.png: * platform/mac/svg/custom/js-update-path-changes-expected.png: * platform/mac/svg/custom/js-update-path-removal-expected.png: * platform/mac/svg/custom/js-update-pattern-child-expected.png: * platform/mac/svg/custom/js-update-pattern-expected.png: * platform/mac/svg/custom/js-update-polygon-changes-expected.png: * platform/mac/svg/custom/js-update-polygon-removal-expected.png: * platform/mac/svg/custom/js-update-stop-expected.png: * platform/mac/svg/custom/js-update-stop-linked-gradient-expected.png: * platform/mac/svg/custom/js-update-stop-linked-gradient-expected.txt: * platform/mac/svg/custom/js-update-style-expected.png: * platform/mac/svg/custom/js-update-style-expected.txt: * platform/mac/svg/custom/js-update-transform-addition-expected.png: * platform/mac/svg/custom/js-update-transform-changes-expected.png: * platform/mac/svg/custom/marker-child-changes-css-expected.png: * platform/mac/svg/custom/marker-child-changes-expected.png: * platform/mac/svg/custom/marker-strokeWidth-changes-expected.png: * platform/mac/svg/custom/marker-viewBox-changes-expected.png: * platform/mac/svg/custom/mask-child-changes-expected.png: * platform/mac/svg/custom/mask-invalidation-expected.png: * platform/mac/svg/custom/mask-invalidation-expected.txt: * platform/mac/svg/custom/object-sizing-no-width-height-change-content-box-size-expected.png: * platform/mac/svg/custom/prevent-default-expected.png: * platform/mac/svg/custom/relative-sized-content-expected.png: * platform/mac/svg/custom/relative-sized-content-with-resources-expected.png: * platform/mac/svg/custom/relative-sized-content-with-resources-expected.txt: * platform/mac/svg/custom/relative-sized-deep-shadow-tree-content-expected.png: * platform/mac/svg/custom/relative-sized-image-expected.png: * platform/mac/svg/custom/relative-sized-inner-svg-expected.png: * platform/mac/svg/custom/relative-sized-shadow-tree-content-expected.png: * platform/mac/svg/custom/relative-sized-shadow-tree-content-with-symbol-expected.png: * platform/mac/svg/custom/relative-sized-use-on-symbol-expected.png: * platform/mac/svg/custom/relative-sized-use-without-attributes-on-symbol-expected.png: * platform/mac/svg/custom/repaint-moving-svg-and-div-expected.png: * platform/mac/svg/custom/repaint-on-image-bounds-change-expected.png: * platform/mac/svg/custom/resource-client-removal-expected.png: * platform/mac/svg/custom/resource-invalidate-on-target-update-expected.png: * platform/mac/svg/custom/scroll-hit-test-expected.png: * platform/mac/svg/custom/scrolling-embedded-svg-file-image-repaint-problem-expected.png: * platform/mac/svg/custom/stroke-opacity-update-expected.png: * platform/mac/svg/custom/svg-absolute-children-expected.png: * platform/mac/svg/custom/text-dom-removal-expected.png: * platform/mac/svg/custom/text-repaint-including-stroke-expected.png: * platform/mac/svg/custom/text-repaint-including-stroke-expected.txt: * platform/mac/svg/custom/text-xy-updates-SVGList-expected.png: * platform/mac/svg/custom/use-clipped-hit-expected.png: * platform/mac/svg/custom/use-clipped-hit-expected.txt: * platform/mac/svg/custom/use-detach-expected.png: * platform/mac/svg/custom/use-disappears-after-style-update-expected.png: * platform/mac/svg/custom/use-elementInstance-event-target-expected.png: * platform/mac/svg/custom/use-elementInstance-methods-expected.png: * platform/mac/svg/custom/use-event-handler-on-referenced-element-expected.png: * platform/mac/svg/custom/use-event-handler-on-use-element-expected.png: * platform/mac/svg/custom/use-inherit-style-expected.png: * platform/mac/svg/custom/use-instanceRoot-as-event-target-expected.png: Removed. * platform/mac/svg/custom/use-instanceRoot-event-bubbling-expected.png: * platform/mac/svg/custom/use-instanceRoot-event-listeners-expected.png: * platform/mac/svg/custom/use-setAttribute-crash-expected.png: * svg/custom/absolute-sized-content-with-resources.xhtml: * svg/custom/animate-path-discrete.svg: * svg/custom/animate-path-morphing.svg: * svg/custom/animate-target-id-changed.svg: * svg/custom/animate-target-removed-from-document.svg: * svg/custom/circle-move-invalidation.svg: * svg/custom/clip-path-child-changes.svg: * svg/custom/clip-path-href-changes.svg: * svg/custom/clip-path-id-changes.svg: * svg/custom/clip-path-units-changes.svg: * svg/custom/deep-dynamic-updates.svg: * svg/custom/fill-opacity-update.svg: * svg/custom/foreignObject-crash-on-hover.xml: * svg/custom/gradient-add-stops.svg: * svg/custom/gradient-stop-style-change.svg: * svg/custom/hit-test-path-stroke.svg: * svg/custom/hit-test-path.svg: * svg/custom/hit-test-unclosed-subpaths.svg: * svg/custom/hit-test-with-br.xhtml: * svg/custom/js-late-clipPath-and-object-creation.svg: * svg/custom/js-late-clipPath-creation.svg: * svg/custom/js-late-gradient-and-object-creation.svg: * svg/custom/js-late-gradient-creation.svg: * svg/custom/js-late-marker-and-object-creation.svg: * svg/custom/js-late-marker-creation.svg: * svg/custom/js-late-mask-and-object-creation.svg: * svg/custom/js-late-mask-creation.svg: * svg/custom/js-late-pattern-and-object-creation.svg: * svg/custom/js-late-pattern-creation.svg: * svg/custom/js-repaint-rect-on-path-with-stroke.svg: * svg/custom/js-update-bounce.svg: * svg/custom/js-update-container.svg: * svg/custom/js-update-container2.svg: * svg/custom/js-update-gradient.svg: * svg/custom/js-update-image.svg: * svg/custom/js-update-path-changes.svg: * svg/custom/js-update-path-removal.svg: * svg/custom/js-update-pattern-child.svg: * svg/custom/js-update-pattern.svg: * svg/custom/js-update-polygon-changes.svg: * svg/custom/js-update-polygon-removal.svg: * svg/custom/js-update-stop-linked-gradient.svg: * svg/custom/js-update-stop.svg: * svg/custom/js-update-style.svg: * svg/custom/js-update-transform-addition.svg: * svg/custom/js-update-transform-changes.svg: * svg/custom/linking-a-03-b-all.svg: * svg/custom/linking-a-03-b-preserveAspectRatio.svg: * svg/custom/linking-a-03-b-transform.svg: * svg/custom/linking-a-03-b-viewBox-transform.svg: * svg/custom/linking-a-03-b-viewBox.svg: * svg/custom/linking-a-03-b-viewTarget.svg: * svg/custom/linking-a-03-b-zoomAndPan.svg: * svg/custom/marker-child-changes-css.svg: * svg/custom/marker-child-changes.svg: * svg/custom/marker-strokeWidth-changes.svg: * svg/custom/marker-viewBox-changes.svg: * svg/custom/mask-child-changes.svg: * svg/custom/mask-invalidation.svg: * svg/custom/object-sizing-no-width-height-change-content-box-size.xhtml: * svg/custom/pending-resource-after-removal-expected.png: * svg/custom/pending-resource-after-removal.xhtml: * svg/custom/pending-resource-leak-2.svg: * svg/custom/pending-resource-leak-3.svg: * svg/custom/prevent-default.svg: * svg/custom/relative-sized-content-with-resources.xhtml: * svg/custom/relative-sized-content.xhtml: * svg/custom/relative-sized-deep-shadow-tree-content.xhtml: * svg/custom/relative-sized-image.xhtml: * svg/custom/relative-sized-inner-svg.xhtml: * svg/custom/relative-sized-shadow-tree-content-with-symbol.xhtml: * svg/custom/relative-sized-shadow-tree-content.xhtml: * svg/custom/relative-sized-use-on-symbol.xhtml: * svg/custom/relative-sized-use-without-attributes-on-symbol.xhtml: * svg/custom/repaint-moving-svg-and-div.xhtml: * svg/custom/repaint-on-constant-size-change.svg: * svg/custom/repaint-on-image-bounds-change.svg: * svg/custom/repaint-shadow.svg: * svg/custom/repaint-stroke-width-changes.svg: * svg/custom/resource-client-removal.svg: * svg/custom/resource-invalidate-on-target-update.svg: * svg/custom/resources/use-instanceRoot-event-bubbling.js: (repaintTest): * svg/custom/resources/use-instanceRoot-event-listeners.js: (repaintTest): * svg/custom/scroll-hit-test.xhtml: * svg/custom/scroll-to-anchor-in-symbol.svg: * svg/custom/scrolling-embedded-svg-file-image-repaint-problem.html: * svg/custom/stroke-opacity-update.svg: * svg/custom/svg-absolute-children.svg: * svg/custom/svg-disallowed-in-dashboard-object.html: * svg/custom/svg-fonts-in-html-linebreaks.html: * svg/custom/text-dom-removal.svg: * svg/custom/text-repaint-including-stroke.svg: * svg/custom/text-xy-updates-SVGList.xhtml: * svg/custom/use-animation-in-fill.html: * svg/custom/use-clipped-hit.svg: * svg/custom/use-crash-in-non-wellformed-document.svg: * svg/custom/use-crash-when-href-change.svg: * svg/custom/use-detach.svg: * svg/custom/use-disappears-after-style-update.svg: * svg/custom/use-elementInstance-event-target.svg: * svg/custom/use-elementInstance-methods.svg: * svg/custom/use-event-handler-on-referenced-element.svg: * svg/custom/use-event-handler-on-use-element.svg: * svg/custom/use-inherit-style.svg: * svg/custom/use-instanceRoot-as-event-target.xhtml: * svg/custom/use-instanceRoot-event-bubbling.xhtml: * svg/custom/use-instanceRoot-event-listeners.xhtml: * svg/custom/use-multiple-on-nested-disallowed-font.html: * svg/custom/use-setAttribute-crash.svg: Canonical link: https://commits.webkit.org/95114@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@107207 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-02-09 11:21:42 +00:00
function repaintTest() {
document.getElementById("rect").style.fill = "red";
2010-07-16 Nikolas Zimmermann <nzimmermann@rim.com> Reviewed by Dirk Schulze. relative positioning does not work for radialGradient after window resize https://bugs.webkit.org/show_bug.cgi?id=41249 Redesign the way resources are invalidated. No longer utilize the DOM tree, specifically SVGStyledElement::svgAttributeChanged(), to invalidate all resources in the ancestor chain (including itself) when any attribute changes. rect.setAttribute("foo", "bar") should never invalidate the resources. Also the old approach didn't work correctly if the root layout changed (eg. window size change) - we failed to invalidate the resources, thus leading to wrong renderings. Instead of calling setNeedsLayout(true) from the SVG*Element classes, call RenderSVGResource::markForLayoutAndParentResourceInvalidation(), which does the same thing and invalidates all resources in the ancestor chain (removing the cached results from the HashMaps). This only happens from the various svgAttributeChanged() methods, if we know which attribute changed, and what action has to be taken. All SVG renderers now invalidate their own resources on layout() if the layout changed (selfNeedsLayout()=true). The resources will be recreated and cached during the following paint() call. Tests: svg/custom/marker-child-changes-css.svg svg/custom/relative-sized-content-with-resources.xhtml * rendering/RenderForeignObject.cpp: (WebCore::RenderForeignObject::layout): If our layout changed, invalidate our resources, by calling RenderSVGResource::invalidateAllResourcesOfRenderer(). * rendering/RenderPath.cpp: (WebCore::RenderPath::layout): Ditto. * rendering/RenderSVGContainer.cpp: (WebCore::RenderSVGContainer::layout): Ditto. * rendering/RenderSVGImage.cpp: (WebCore::RenderSVGImage::layout): Ditto. * rendering/RenderSVGModelObject.cpp: (WebCore::RenderSVGModelObject::styleDidChange): Added, to invalidate resources on CSS changes, covered by new svg/custom/marker-child-changes-css.svg test. * rendering/RenderSVGModelObject.h: * rendering/RenderSVGResource.cpp: (WebCore::RenderSVGResource::markForLayoutAndResourceInvalidation): Add new "needsBoundaries" parameter, calling setNeedsBoundaries() on the target render object, simplifying all RenderSVGResource* code. (WebCore::RenderSVGResource::markForLayoutAndParentResourceInvalidation): New static method used from DOM tree to invalidate all cached resources in the ancestor chain for a render object. Also marks the renderer for layout, if needed. * rendering/RenderSVGResource.h: * rendering/RenderSVGResourceClipper.cpp: Simplify code, remove no longer needed hacks, as invalidation is now carried out by render tree. (WebCore::RenderSVGResourceClipper::RenderSVGResourceClipper): Add m_invalidationBlocked hack, to avoid invalidations, while we're mutating the render styles (which is a hack!). (WebCore::RenderSVGResourceClipper::invalidateClients): Don't do anything if m_invalidationBlocked=true. (WebCore::RenderSVGResourceClipper::invalidateClient): Ditto. (WebCore::RenderSVGResourceClipper::createClipData): Set m_invalidationBlocked before mutating render styles, as they are restored immediately after creating the clip image. (WebCore::RenderSVGResourceClipper::resourceBoundingBox): Remove no longer needed hack to initialize ClipperData earlier than applyResource() would do. * rendering/RenderSVGResourceClipper.h: * rendering/RenderSVGResourceFilter.cpp: (WebCore::RenderSVGResourceFilter::invalidateClients): Simplify code using markForLayoutAndResourceInvalidation. (WebCore::RenderSVGResourceFilter::invalidateClient): Remove wrong assertion. * rendering/RenderSVGResourceGradient.cpp: (WebCore::RenderSVGResourceGradient::invalidateClients): Simplify code using markForLayoutAndResourceInvalidation. (WebCore::RenderSVGResourceGradient::invalidateClient): Remove wrong assertion. * rendering/RenderSVGResourceMarker.cpp: (WebCore::RenderSVGResourceMarker::invalidateClients): Simplify code using markForLayoutAndResourceInvalidation. (WebCore::RenderSVGResourceMarker::invalidateClient): Remove wrong assertion. * rendering/RenderSVGResourceMasker.cpp: (WebCore::RenderSVGResourceMasker::invalidateClients): Simplify code using markForLayoutAndResourceInvalidation. (WebCore::RenderSVGResourceMasker::invalidateClient): Remove wrong assertion. (WebCore::RenderSVGResourceMasker::resourceBoundingBox): Remove no longer needed hack to initializer MaskerData earlier than applyResource() would do. * rendering/RenderSVGResourcePattern.cpp: (WebCore::RenderSVGResourcePattern::invalidateClients): Simplify code using markForLayoutAndResourceInvalidation. (WebCore::RenderSVGResourcePattern::invalidateClient): Remove wrong assertion. * rendering/RenderSVGText.cpp: (WebCore::RenderSVGText::layout): If our layout changed, invalidate our resources, by calling RenderSVGResource::invalidateAllResourcesOfRenderer(). * svg/SVGAnimateMotionElement.cpp: (WebCore::SVGAnimateMotionElement::applyResultsToTarget): Call RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer) instead of renderer->setNeedsLayout(true). * svg/SVGAnimateTransformElement.cpp: (WebCore::SVGAnimateTransformElement::applyResultsToTarget): Ditto. * svg/SVGCircleElement.cpp: (WebCore::SVGCircleElement::svgAttributeChanged): Ditto. * svg/SVGEllipseElement.cpp: (WebCore::SVGEllipseElement::svgAttributeChanged): Ditto. * svg/SVGFEImageElement.cpp: (WebCore::SVGFEImageElement::notifyFinished): Ditto. * svg/SVGForeignObjectElement.cpp: (WebCore::SVGForeignObjectElement::svgAttributeChanged): Ditto. * svg/SVGGElement.cpp: (WebCore::SVGGElement::svgAttributeChanged): Ditto. * svg/SVGImageElement.cpp: (WebCore::SVGImageElement::svgAttributeChanged): Ditto. * svg/SVGLineElement.cpp: (WebCore::SVGLineElement::svgAttributeChanged): Ditto. * svg/SVGPathElement.cpp: (WebCore::SVGPathElement::svgAttributeChanged): Ditto. * svg/SVGPolyElement.cpp: (WebCore::SVGPolyElement::svgAttributeChanged): Ditto. * svg/SVGRectElement.cpp: (WebCore::SVGRectElement::svgAttributeChanged): Ditto. * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::setCurrentScale): Ditto. (WebCore::SVGSVGElement::svgAttributeChanged): Ditto. (WebCore::SVGSVGElement::inheritViewAttributes): Ditto. * svg/SVGStopElement.cpp: (WebCore::SVGStopElement::SVGStopElement): Changed m_offset initialization from 0.0f to 0. (WebCore::SVGStopElement::svgAttributeChanged): Add missing implementation, calling RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer) on offsetAttr changes. * svg/SVGStopElement.h: * svg/SVGStyledElement.cpp: (WebCore::SVGStyledElement::svgAttributeChanged): Don't call invalidateResourceInAncestorChain() on every attribute change, do it in all classes inheriting from us, for specific attributes. Also stop calling RenderSVGResource::invalidateAllResourcesOfRenderer(), all handled in the render tree now. (WebCore::SVGStyledElement::invalidateResourceClients): Early exit, if document is still parsing. * svg/SVGStyledElement.h: * svg/SVGTRefElement.cpp: (WebCore::SVGTRefElement::svgAttributeChanged): Call RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer) instead of renderer->setNeedsLayout(true). * svg/SVGTextElement.cpp: (WebCore::SVGTextElement::svgAttributeChanged): Ditto. * svg/SVGTextPathElement.cpp: (WebCore::SVGTextPathElement::svgAttributeChanged): Ditto. * svg/SVGTextPositioningElement.cpp: (WebCore::SVGTextPositioningElement::svgAttributeChanged): Ditto. * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::svgAttributeChanged): Ditto. (WebCore::SVGUseElement::updateContainerSizes): Ditto. (WebCore::SVGUseElement::updateContainerOffsets): Ditto. 2010-07-16 Nikolas Zimmermann <nzimmermann@rim.com> Reviewed by Dirk Schulze. relative positioning does not work for radialGradient after window resize https://bugs.webkit.org/show_bug.cgi?id=41249 * platform/mac/svg/custom/marker-child-changes-css-expected.checksum: Added. * platform/mac/svg/custom/marker-child-changes-css-expected.png: Added. * platform/mac/svg/custom/marker-child-changes-css-expected.txt: Added. * platform/mac/svg/custom/relative-sized-content-with-resources-expected.checksum: Added. * platform/mac/svg/custom/relative-sized-content-with-resources-expected.png: Added. * platform/mac/svg/custom/relative-sized-content-with-resources-expected.txt: Added. * svg/custom/marker-child-changes-css.svg: Added. * svg/custom/relative-sized-content-with-resources.xhtml: Added. Canonical link: https://commits.webkit.org/54371@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@63531 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-07-16 08:26:24 +00:00
}
</script>
Switch svg/custom tests to repaint harness https://bugs.webkit.org/show_bug.cgi?id=78115 Reviewed by Andreas Kling. Make all tests that exercise repainting use the fast/repaint/resources/repaint.js harness. * platform/chromium/test_expectations.txt: * platform/mac/svg/custom/absolute-sized-content-with-resources-expected.png: * platform/mac/svg/custom/absolute-sized-content-with-resources-expected.txt: * platform/mac/svg/custom/animate-path-discrete-expected.png: * platform/mac/svg/custom/animate-path-morphing-expected.png: * platform/mac/svg/custom/animate-target-id-changed-expected.png: * platform/mac/svg/custom/animate-target-removed-from-document-expected.png: * platform/mac/svg/custom/circle-move-invalidation-expected.png: * platform/mac/svg/custom/clip-path-child-changes-expected.png: * platform/mac/svg/custom/clip-path-href-changes-expected.png: * platform/mac/svg/custom/clip-path-id-changes-expected.png: * platform/mac/svg/custom/clip-path-units-changes-expected.png: * platform/mac/svg/custom/deep-dynamic-updates-expected.png: * platform/mac/svg/custom/fill-opacity-update-expected.png: * platform/mac/svg/custom/foreignObject-crash-on-hover-expected.png: * platform/mac/svg/custom/foreignObject-crash-on-hover-expected.txt: * platform/mac/svg/custom/gradient-add-stops-expected.png: * platform/mac/svg/custom/gradient-stop-style-change-expected.png: * platform/mac/svg/custom/hit-test-unclosed-subpaths-expected.png: * platform/mac/svg/custom/hit-test-unclosed-subpaths-expected.txt: * platform/mac/svg/custom/hit-test-with-br-expected.png: * platform/mac/svg/custom/js-late-clipPath-and-object-creation-expected.png: * platform/mac/svg/custom/js-late-clipPath-creation-expected.png: * platform/mac/svg/custom/js-late-gradient-and-object-creation-expected.png: * platform/mac/svg/custom/js-late-gradient-creation-expected.png: * platform/mac/svg/custom/js-late-marker-and-object-creation-expected.png: * platform/mac/svg/custom/js-late-marker-creation-expected.png: * platform/mac/svg/custom/js-late-mask-and-object-creation-expected.png: * platform/mac/svg/custom/js-late-mask-creation-expected.png: * platform/mac/svg/custom/js-late-pattern-and-object-creation-expected.png: * platform/mac/svg/custom/js-late-pattern-creation-expected.png: * platform/mac/svg/custom/js-repaint-rect-on-path-with-stroke-expected.png: * platform/mac/svg/custom/js-update-bounce-expected.png: * platform/mac/svg/custom/js-update-bounce-expected.txt: * platform/mac/svg/custom/js-update-container-expected.png: * platform/mac/svg/custom/js-update-container2-expected.png: * platform/mac/svg/custom/js-update-gradient-expected.png: * platform/mac/svg/custom/js-update-image-expected.png: * platform/mac/svg/custom/js-update-path-changes-expected.png: * platform/mac/svg/custom/js-update-path-removal-expected.png: * platform/mac/svg/custom/js-update-pattern-child-expected.png: * platform/mac/svg/custom/js-update-pattern-expected.png: * platform/mac/svg/custom/js-update-polygon-changes-expected.png: * platform/mac/svg/custom/js-update-polygon-removal-expected.png: * platform/mac/svg/custom/js-update-stop-expected.png: * platform/mac/svg/custom/js-update-stop-linked-gradient-expected.png: * platform/mac/svg/custom/js-update-stop-linked-gradient-expected.txt: * platform/mac/svg/custom/js-update-style-expected.png: * platform/mac/svg/custom/js-update-style-expected.txt: * platform/mac/svg/custom/js-update-transform-addition-expected.png: * platform/mac/svg/custom/js-update-transform-changes-expected.png: * platform/mac/svg/custom/marker-child-changes-css-expected.png: * platform/mac/svg/custom/marker-child-changes-expected.png: * platform/mac/svg/custom/marker-strokeWidth-changes-expected.png: * platform/mac/svg/custom/marker-viewBox-changes-expected.png: * platform/mac/svg/custom/mask-child-changes-expected.png: * platform/mac/svg/custom/mask-invalidation-expected.png: * platform/mac/svg/custom/mask-invalidation-expected.txt: * platform/mac/svg/custom/object-sizing-no-width-height-change-content-box-size-expected.png: * platform/mac/svg/custom/prevent-default-expected.png: * platform/mac/svg/custom/relative-sized-content-expected.png: * platform/mac/svg/custom/relative-sized-content-with-resources-expected.png: * platform/mac/svg/custom/relative-sized-content-with-resources-expected.txt: * platform/mac/svg/custom/relative-sized-deep-shadow-tree-content-expected.png: * platform/mac/svg/custom/relative-sized-image-expected.png: * platform/mac/svg/custom/relative-sized-inner-svg-expected.png: * platform/mac/svg/custom/relative-sized-shadow-tree-content-expected.png: * platform/mac/svg/custom/relative-sized-shadow-tree-content-with-symbol-expected.png: * platform/mac/svg/custom/relative-sized-use-on-symbol-expected.png: * platform/mac/svg/custom/relative-sized-use-without-attributes-on-symbol-expected.png: * platform/mac/svg/custom/repaint-moving-svg-and-div-expected.png: * platform/mac/svg/custom/repaint-on-image-bounds-change-expected.png: * platform/mac/svg/custom/resource-client-removal-expected.png: * platform/mac/svg/custom/resource-invalidate-on-target-update-expected.png: * platform/mac/svg/custom/scroll-hit-test-expected.png: * platform/mac/svg/custom/scrolling-embedded-svg-file-image-repaint-problem-expected.png: * platform/mac/svg/custom/stroke-opacity-update-expected.png: * platform/mac/svg/custom/svg-absolute-children-expected.png: * platform/mac/svg/custom/text-dom-removal-expected.png: * platform/mac/svg/custom/text-repaint-including-stroke-expected.png: * platform/mac/svg/custom/text-repaint-including-stroke-expected.txt: * platform/mac/svg/custom/text-xy-updates-SVGList-expected.png: * platform/mac/svg/custom/use-clipped-hit-expected.png: * platform/mac/svg/custom/use-clipped-hit-expected.txt: * platform/mac/svg/custom/use-detach-expected.png: * platform/mac/svg/custom/use-disappears-after-style-update-expected.png: * platform/mac/svg/custom/use-elementInstance-event-target-expected.png: * platform/mac/svg/custom/use-elementInstance-methods-expected.png: * platform/mac/svg/custom/use-event-handler-on-referenced-element-expected.png: * platform/mac/svg/custom/use-event-handler-on-use-element-expected.png: * platform/mac/svg/custom/use-inherit-style-expected.png: * platform/mac/svg/custom/use-instanceRoot-as-event-target-expected.png: Removed. * platform/mac/svg/custom/use-instanceRoot-event-bubbling-expected.png: * platform/mac/svg/custom/use-instanceRoot-event-listeners-expected.png: * platform/mac/svg/custom/use-setAttribute-crash-expected.png: * svg/custom/absolute-sized-content-with-resources.xhtml: * svg/custom/animate-path-discrete.svg: * svg/custom/animate-path-morphing.svg: * svg/custom/animate-target-id-changed.svg: * svg/custom/animate-target-removed-from-document.svg: * svg/custom/circle-move-invalidation.svg: * svg/custom/clip-path-child-changes.svg: * svg/custom/clip-path-href-changes.svg: * svg/custom/clip-path-id-changes.svg: * svg/custom/clip-path-units-changes.svg: * svg/custom/deep-dynamic-updates.svg: * svg/custom/fill-opacity-update.svg: * svg/custom/foreignObject-crash-on-hover.xml: * svg/custom/gradient-add-stops.svg: * svg/custom/gradient-stop-style-change.svg: * svg/custom/hit-test-path-stroke.svg: * svg/custom/hit-test-path.svg: * svg/custom/hit-test-unclosed-subpaths.svg: * svg/custom/hit-test-with-br.xhtml: * svg/custom/js-late-clipPath-and-object-creation.svg: * svg/custom/js-late-clipPath-creation.svg: * svg/custom/js-late-gradient-and-object-creation.svg: * svg/custom/js-late-gradient-creation.svg: * svg/custom/js-late-marker-and-object-creation.svg: * svg/custom/js-late-marker-creation.svg: * svg/custom/js-late-mask-and-object-creation.svg: * svg/custom/js-late-mask-creation.svg: * svg/custom/js-late-pattern-and-object-creation.svg: * svg/custom/js-late-pattern-creation.svg: * svg/custom/js-repaint-rect-on-path-with-stroke.svg: * svg/custom/js-update-bounce.svg: * svg/custom/js-update-container.svg: * svg/custom/js-update-container2.svg: * svg/custom/js-update-gradient.svg: * svg/custom/js-update-image.svg: * svg/custom/js-update-path-changes.svg: * svg/custom/js-update-path-removal.svg: * svg/custom/js-update-pattern-child.svg: * svg/custom/js-update-pattern.svg: * svg/custom/js-update-polygon-changes.svg: * svg/custom/js-update-polygon-removal.svg: * svg/custom/js-update-stop-linked-gradient.svg: * svg/custom/js-update-stop.svg: * svg/custom/js-update-style.svg: * svg/custom/js-update-transform-addition.svg: * svg/custom/js-update-transform-changes.svg: * svg/custom/linking-a-03-b-all.svg: * svg/custom/linking-a-03-b-preserveAspectRatio.svg: * svg/custom/linking-a-03-b-transform.svg: * svg/custom/linking-a-03-b-viewBox-transform.svg: * svg/custom/linking-a-03-b-viewBox.svg: * svg/custom/linking-a-03-b-viewTarget.svg: * svg/custom/linking-a-03-b-zoomAndPan.svg: * svg/custom/marker-child-changes-css.svg: * svg/custom/marker-child-changes.svg: * svg/custom/marker-strokeWidth-changes.svg: * svg/custom/marker-viewBox-changes.svg: * svg/custom/mask-child-changes.svg: * svg/custom/mask-invalidation.svg: * svg/custom/object-sizing-no-width-height-change-content-box-size.xhtml: * svg/custom/pending-resource-after-removal-expected.png: * svg/custom/pending-resource-after-removal.xhtml: * svg/custom/pending-resource-leak-2.svg: * svg/custom/pending-resource-leak-3.svg: * svg/custom/prevent-default.svg: * svg/custom/relative-sized-content-with-resources.xhtml: * svg/custom/relative-sized-content.xhtml: * svg/custom/relative-sized-deep-shadow-tree-content.xhtml: * svg/custom/relative-sized-image.xhtml: * svg/custom/relative-sized-inner-svg.xhtml: * svg/custom/relative-sized-shadow-tree-content-with-symbol.xhtml: * svg/custom/relative-sized-shadow-tree-content.xhtml: * svg/custom/relative-sized-use-on-symbol.xhtml: * svg/custom/relative-sized-use-without-attributes-on-symbol.xhtml: * svg/custom/repaint-moving-svg-and-div.xhtml: * svg/custom/repaint-on-constant-size-change.svg: * svg/custom/repaint-on-image-bounds-change.svg: * svg/custom/repaint-shadow.svg: * svg/custom/repaint-stroke-width-changes.svg: * svg/custom/resource-client-removal.svg: * svg/custom/resource-invalidate-on-target-update.svg: * svg/custom/resources/use-instanceRoot-event-bubbling.js: (repaintTest): * svg/custom/resources/use-instanceRoot-event-listeners.js: (repaintTest): * svg/custom/scroll-hit-test.xhtml: * svg/custom/scroll-to-anchor-in-symbol.svg: * svg/custom/scrolling-embedded-svg-file-image-repaint-problem.html: * svg/custom/stroke-opacity-update.svg: * svg/custom/svg-absolute-children.svg: * svg/custom/svg-disallowed-in-dashboard-object.html: * svg/custom/svg-fonts-in-html-linebreaks.html: * svg/custom/text-dom-removal.svg: * svg/custom/text-repaint-including-stroke.svg: * svg/custom/text-xy-updates-SVGList.xhtml: * svg/custom/use-animation-in-fill.html: * svg/custom/use-clipped-hit.svg: * svg/custom/use-crash-in-non-wellformed-document.svg: * svg/custom/use-crash-when-href-change.svg: * svg/custom/use-detach.svg: * svg/custom/use-disappears-after-style-update.svg: * svg/custom/use-elementInstance-event-target.svg: * svg/custom/use-elementInstance-methods.svg: * svg/custom/use-event-handler-on-referenced-element.svg: * svg/custom/use-event-handler-on-use-element.svg: * svg/custom/use-inherit-style.svg: * svg/custom/use-instanceRoot-as-event-target.xhtml: * svg/custom/use-instanceRoot-event-bubbling.xhtml: * svg/custom/use-instanceRoot-event-listeners.xhtml: * svg/custom/use-multiple-on-nested-disallowed-font.html: * svg/custom/use-setAttribute-crash.svg: Canonical link: https://commits.webkit.org/95114@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@107207 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-02-09 11:21:42 +00:00
<g>
2010-07-16 Nikolas Zimmermann <nzimmermann@rim.com> Reviewed by Dirk Schulze. relative positioning does not work for radialGradient after window resize https://bugs.webkit.org/show_bug.cgi?id=41249 Redesign the way resources are invalidated. No longer utilize the DOM tree, specifically SVGStyledElement::svgAttributeChanged(), to invalidate all resources in the ancestor chain (including itself) when any attribute changes. rect.setAttribute("foo", "bar") should never invalidate the resources. Also the old approach didn't work correctly if the root layout changed (eg. window size change) - we failed to invalidate the resources, thus leading to wrong renderings. Instead of calling setNeedsLayout(true) from the SVG*Element classes, call RenderSVGResource::markForLayoutAndParentResourceInvalidation(), which does the same thing and invalidates all resources in the ancestor chain (removing the cached results from the HashMaps). This only happens from the various svgAttributeChanged() methods, if we know which attribute changed, and what action has to be taken. All SVG renderers now invalidate their own resources on layout() if the layout changed (selfNeedsLayout()=true). The resources will be recreated and cached during the following paint() call. Tests: svg/custom/marker-child-changes-css.svg svg/custom/relative-sized-content-with-resources.xhtml * rendering/RenderForeignObject.cpp: (WebCore::RenderForeignObject::layout): If our layout changed, invalidate our resources, by calling RenderSVGResource::invalidateAllResourcesOfRenderer(). * rendering/RenderPath.cpp: (WebCore::RenderPath::layout): Ditto. * rendering/RenderSVGContainer.cpp: (WebCore::RenderSVGContainer::layout): Ditto. * rendering/RenderSVGImage.cpp: (WebCore::RenderSVGImage::layout): Ditto. * rendering/RenderSVGModelObject.cpp: (WebCore::RenderSVGModelObject::styleDidChange): Added, to invalidate resources on CSS changes, covered by new svg/custom/marker-child-changes-css.svg test. * rendering/RenderSVGModelObject.h: * rendering/RenderSVGResource.cpp: (WebCore::RenderSVGResource::markForLayoutAndResourceInvalidation): Add new "needsBoundaries" parameter, calling setNeedsBoundaries() on the target render object, simplifying all RenderSVGResource* code. (WebCore::RenderSVGResource::markForLayoutAndParentResourceInvalidation): New static method used from DOM tree to invalidate all cached resources in the ancestor chain for a render object. Also marks the renderer for layout, if needed. * rendering/RenderSVGResource.h: * rendering/RenderSVGResourceClipper.cpp: Simplify code, remove no longer needed hacks, as invalidation is now carried out by render tree. (WebCore::RenderSVGResourceClipper::RenderSVGResourceClipper): Add m_invalidationBlocked hack, to avoid invalidations, while we're mutating the render styles (which is a hack!). (WebCore::RenderSVGResourceClipper::invalidateClients): Don't do anything if m_invalidationBlocked=true. (WebCore::RenderSVGResourceClipper::invalidateClient): Ditto. (WebCore::RenderSVGResourceClipper::createClipData): Set m_invalidationBlocked before mutating render styles, as they are restored immediately after creating the clip image. (WebCore::RenderSVGResourceClipper::resourceBoundingBox): Remove no longer needed hack to initialize ClipperData earlier than applyResource() would do. * rendering/RenderSVGResourceClipper.h: * rendering/RenderSVGResourceFilter.cpp: (WebCore::RenderSVGResourceFilter::invalidateClients): Simplify code using markForLayoutAndResourceInvalidation. (WebCore::RenderSVGResourceFilter::invalidateClient): Remove wrong assertion. * rendering/RenderSVGResourceGradient.cpp: (WebCore::RenderSVGResourceGradient::invalidateClients): Simplify code using markForLayoutAndResourceInvalidation. (WebCore::RenderSVGResourceGradient::invalidateClient): Remove wrong assertion. * rendering/RenderSVGResourceMarker.cpp: (WebCore::RenderSVGResourceMarker::invalidateClients): Simplify code using markForLayoutAndResourceInvalidation. (WebCore::RenderSVGResourceMarker::invalidateClient): Remove wrong assertion. * rendering/RenderSVGResourceMasker.cpp: (WebCore::RenderSVGResourceMasker::invalidateClients): Simplify code using markForLayoutAndResourceInvalidation. (WebCore::RenderSVGResourceMasker::invalidateClient): Remove wrong assertion. (WebCore::RenderSVGResourceMasker::resourceBoundingBox): Remove no longer needed hack to initializer MaskerData earlier than applyResource() would do. * rendering/RenderSVGResourcePattern.cpp: (WebCore::RenderSVGResourcePattern::invalidateClients): Simplify code using markForLayoutAndResourceInvalidation. (WebCore::RenderSVGResourcePattern::invalidateClient): Remove wrong assertion. * rendering/RenderSVGText.cpp: (WebCore::RenderSVGText::layout): If our layout changed, invalidate our resources, by calling RenderSVGResource::invalidateAllResourcesOfRenderer(). * svg/SVGAnimateMotionElement.cpp: (WebCore::SVGAnimateMotionElement::applyResultsToTarget): Call RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer) instead of renderer->setNeedsLayout(true). * svg/SVGAnimateTransformElement.cpp: (WebCore::SVGAnimateTransformElement::applyResultsToTarget): Ditto. * svg/SVGCircleElement.cpp: (WebCore::SVGCircleElement::svgAttributeChanged): Ditto. * svg/SVGEllipseElement.cpp: (WebCore::SVGEllipseElement::svgAttributeChanged): Ditto. * svg/SVGFEImageElement.cpp: (WebCore::SVGFEImageElement::notifyFinished): Ditto. * svg/SVGForeignObjectElement.cpp: (WebCore::SVGForeignObjectElement::svgAttributeChanged): Ditto. * svg/SVGGElement.cpp: (WebCore::SVGGElement::svgAttributeChanged): Ditto. * svg/SVGImageElement.cpp: (WebCore::SVGImageElement::svgAttributeChanged): Ditto. * svg/SVGLineElement.cpp: (WebCore::SVGLineElement::svgAttributeChanged): Ditto. * svg/SVGPathElement.cpp: (WebCore::SVGPathElement::svgAttributeChanged): Ditto. * svg/SVGPolyElement.cpp: (WebCore::SVGPolyElement::svgAttributeChanged): Ditto. * svg/SVGRectElement.cpp: (WebCore::SVGRectElement::svgAttributeChanged): Ditto. * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::setCurrentScale): Ditto. (WebCore::SVGSVGElement::svgAttributeChanged): Ditto. (WebCore::SVGSVGElement::inheritViewAttributes): Ditto. * svg/SVGStopElement.cpp: (WebCore::SVGStopElement::SVGStopElement): Changed m_offset initialization from 0.0f to 0. (WebCore::SVGStopElement::svgAttributeChanged): Add missing implementation, calling RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer) on offsetAttr changes. * svg/SVGStopElement.h: * svg/SVGStyledElement.cpp: (WebCore::SVGStyledElement::svgAttributeChanged): Don't call invalidateResourceInAncestorChain() on every attribute change, do it in all classes inheriting from us, for specific attributes. Also stop calling RenderSVGResource::invalidateAllResourcesOfRenderer(), all handled in the render tree now. (WebCore::SVGStyledElement::invalidateResourceClients): Early exit, if document is still parsing. * svg/SVGStyledElement.h: * svg/SVGTRefElement.cpp: (WebCore::SVGTRefElement::svgAttributeChanged): Call RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer) instead of renderer->setNeedsLayout(true). * svg/SVGTextElement.cpp: (WebCore::SVGTextElement::svgAttributeChanged): Ditto. * svg/SVGTextPathElement.cpp: (WebCore::SVGTextPathElement::svgAttributeChanged): Ditto. * svg/SVGTextPositioningElement.cpp: (WebCore::SVGTextPositioningElement::svgAttributeChanged): Ditto. * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::svgAttributeChanged): Ditto. (WebCore::SVGUseElement::updateContainerSizes): Ditto. (WebCore::SVGUseElement::updateContainerOffsets): Ditto. 2010-07-16 Nikolas Zimmermann <nzimmermann@rim.com> Reviewed by Dirk Schulze. relative positioning does not work for radialGradient after window resize https://bugs.webkit.org/show_bug.cgi?id=41249 * platform/mac/svg/custom/marker-child-changes-css-expected.checksum: Added. * platform/mac/svg/custom/marker-child-changes-css-expected.png: Added. * platform/mac/svg/custom/marker-child-changes-css-expected.txt: Added. * platform/mac/svg/custom/relative-sized-content-with-resources-expected.checksum: Added. * platform/mac/svg/custom/relative-sized-content-with-resources-expected.png: Added. * platform/mac/svg/custom/relative-sized-content-with-resources-expected.txt: Added. * svg/custom/marker-child-changes-css.svg: Added. * svg/custom/relative-sized-content-with-resources.xhtml: Added. Canonical link: https://commits.webkit.org/54371@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@63531 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-07-16 08:26:24 +00:00
<path fill="none" stroke="black" stroke-width="8" marker-start="url(#markerStart)" marker-mid="url(#markerMiddle)" marker-end="url(#markerEnd)" d="M 130 135 L 180 135 L 180 185"/>
</g>
</svg>