haikuwebkit/LayoutTests/svg/custom/relative-sized-use-without-...

27 lines
1.2 KiB
HTML
Raw Permalink Normal View History

2010-07-05 Nikolas Zimmermann <nzimmermann@rim.com> Reviewed by Dirk Schulze. Logic to track whether elements are using relative lengths is incomplete https://bugs.webkit.org/show_bug.cgi?id=41566 Add logic to all SVG elements which create renderes to expose a method "bool selfHasRelativeLengths()", that returns whether the element uses relative lengths (eg. <rect x="50%"...). This will be used soon to avoid relayouts of container children, when the bounds have not changed. A new method SVGStyledElement::updateRelativeLengthsInformation() is added, which is called from the various svgAttributeChanged() methods and insertedIntoDocument/removedFromDocument. It will be implemented in a follow-up patch. This patch does not affect any test behaviour related to relayouting. As SVGFilterElement finally got a proper svgAttributeChanged() method, it now properly invalidates clients on attribute changes - covered by a new test. Tests: svg/custom/relative-sized-inner-svg.xhtml svg/custom/relative-sized-use-without-attributes-on-symbol.xhtml svg/filters/filter-width-update.svg * rendering/RenderPath.cpp: (WebCore::RenderPath::layout): Rename hasRelativeValues to hasRelativeLengths. * rendering/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::layout): Ditto. (WebCore::RenderSVGRoot::calcViewport): Ditto. * rendering/RenderSVGViewportContainer.cpp: (WebCore::RenderSVGViewportContainer::calcViewport): Ditto * rendering/SVGRenderSupport.cpp: (WebCore::SVGRenderSupport::layoutChildren): Ditto. * svg/SVGCircleElement.cpp: (WebCore::SVGCircleElement::svgAttributeChanged): Call updateRelativeLengthsInformation() if any attribute which may contain relative lengths changes. (WebCore::SVGCircleElement::selfHasRelativeLengths): Ditto. Same for all other SVG*Elements below. * svg/SVGCircleElement.h: * svg/SVGEllipseElement.cpp: (WebCore::SVGEllipseElement::svgAttributeChanged): (WebCore::SVGEllipseElement::selfHasRelativeLengths): * svg/SVGEllipseElement.h: * svg/SVGFilterElement.cpp: (WebCore::SVGFilterElement::svgAttributeChanged): (WebCore::SVGFilterElement::selfHasRelativeLengths): * svg/SVGFilterElement.h: * svg/SVGForeignObjectElement.cpp: (WebCore::SVGForeignObjectElement::svgAttributeChanged): (WebCore::SVGForeignObjectElement::selfHasRelativeLengths): * svg/SVGForeignObjectElement.h: * svg/SVGImageElement.cpp: (WebCore::SVGImageElement::svgAttributeChanged): (WebCore::SVGImageElement::selfHasRelativeLengths): * svg/SVGImageElement.h: * svg/SVGLineElement.cpp: (WebCore::SVGLineElement::svgAttributeChanged): (WebCore::SVGLineElement::selfHasRelativeLengths): * svg/SVGLineElement.h: * svg/SVGLinearGradientElement.cpp: (WebCore::SVGLinearGradientElement::svgAttributeChanged): (WebCore::SVGLinearGradientElement::selfHasRelativeLengths): * svg/SVGLinearGradientElement.h: * svg/SVGMarkerElement.cpp: (WebCore::SVGMarkerElement::svgAttributeChanged): (WebCore::SVGMarkerElement::selfHasRelativeLengths): * svg/SVGMarkerElement.h: * svg/SVGMaskElement.cpp: (WebCore::SVGMaskElement::svgAttributeChanged): (WebCore::SVGMaskElement::selfHasRelativeLengths): * svg/SVGMaskElement.h: * svg/SVGPatternElement.cpp: (WebCore::SVGPatternElement::svgAttributeChanged): (WebCore::SVGPatternElement::selfHasRelativeLengths): * svg/SVGPatternElement.h: * svg/SVGRadialGradientElement.cpp: (WebCore::SVGRadialGradientElement::svgAttributeChanged): (WebCore::SVGRadialGradientElement::selfHasRelativeLengths): * svg/SVGRadialGradientElement.h: * svg/SVGRectElement.cpp: (WebCore::SVGRectElement::svgAttributeChanged): (WebCore::SVGRectElement::selfHasRelativeLengths): * svg/SVGRectElement.h: * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::svgAttributeChanged): (WebCore::SVGSVGElement::selfHasRelativeLengths): * svg/SVGSVGElement.h: * svg/SVGStyledElement.cpp: (WebCore::SVGStyledElement::insertedIntoDocument): Call updateRelativeLengthsInformation(). (WebCore::SVGStyledElement::removedFromDocument): Ditto. (WebCore::SVGStyledElement::updateRelativeLengthsInformation): Not implemented so far. Will land in a follow-up patch, together with the render tree changes. * svg/SVGStyledElement.h: (WebCore::SVGStyledElement::hasRelativeLengths): Devirtualized. For now, just call selfHasRelativeLengths() - this will change in a follow-up patch. (WebCore::SVGStyledElement::updateRelativeLengthsInformation): (WebCore::SVGStyledElement::selfHasRelativeLengths): Renamed from hasRelativeValues(). * svg/SVGSymbolElement.cpp: (WebCore::SVGSymbolElement::svgAttributeChanged): (WebCore::SVGSymbolElement::selfHasRelativeLengths): * svg/SVGSymbolElement.h: * svg/SVGTextContentElement.cpp: (WebCore::SVGTextContentElement::selfHasRelativeLengths): * svg/SVGTextContentElement.h: * svg/SVGTextPathElement.cpp: (WebCore::SVGTextPathElement::svgAttributeChanged): (WebCore::SVGTextPathElement::insertedIntoDocument): Call right base class' method. Skipped one in the hierachy before. (WebCore::SVGTextPathElement::selfHasRelativeLengths): * svg/SVGTextPathElement.h: * svg/SVGTextPositioningElement.cpp: (WebCore::SVGTextPositioningElement::svgAttributeChanged): (WebCore::listContainsRelativeValue): New helper funtion that checks wheter a SVGLengthList contains relative lengths. (WebCore::SVGTextPositioningElement::selfHasRelativeLengths): * svg/SVGTextPositioningElement.h: * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::insertedIntoDocument): Call right base class' method. Skipped on in the hierachy before. (WebCore::SVGUseElement::removedFromDocument): Ditto. (WebCore::SVGUseElement::svgAttributeChanged): (WebCore::SVGUseElement::buildShadowAndInstanceTree): Call updateRelativeLengthsInformation() after building the shadow tree. (WebCore::SVGUseElement::selfHasRelativeLengths): Same as all other methods, except that it includes the shadow tree root element. * svg/SVGUseElement.h: 2010-07-05 Nikolas Zimmermann <nzimmermann@rim.com> Reviewed by Dirk Schulze. Logic to track whether elements are using relative lengths is incomplete https://bugs.webkit.org/show_bug.cgi?id=41566 Add two new relative-sized-*.svg tests that would break, when relative sized kids aren't layout correctly. Add new test covering that filters update their clients, if any attribute changes. * platform/mac/svg/custom/relative-sized-inner-svg-expected.checksum: Added. * platform/mac/svg/custom/relative-sized-inner-svg-expected.png: Added. * platform/mac/svg/custom/relative-sized-inner-svg-expected.txt: Added. * platform/mac/svg/custom/relative-sized-use-without-attributes-on-symbol-expected.checksum: Added. * platform/mac/svg/custom/relative-sized-use-without-attributes-on-symbol-expected.png: Added. * platform/mac/svg/custom/relative-sized-use-without-attributes-on-symbol-expected.txt: Added. * platform/mac/svg/filters/filter-width-update-expected.checksum: Added. * platform/mac/svg/filters/filter-width-update-expected.png: Added. * platform/mac/svg/filters/filter-width-update-expected.txt: Added. * svg/custom/relative-sized-inner-svg.xhtml: Added. * svg/custom/relative-sized-use-without-attributes-on-symbol.xhtml: Added. * svg/filters/filter-width-update.svg: Added. Canonical link: https://commits.webkit.org/53403@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@62488 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-07-05 14:32:20 +00:00
<html xmlns="http://www.w3.org/1999/xhtml">
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
<head>
<script src="../../fast/repaint/resources/repaint.js"></script>
</head>
<body onload="runRepaintTest()">
2010-07-05 Nikolas Zimmermann <nzimmermann@rim.com> Reviewed by Dirk Schulze. Logic to track whether elements are using relative lengths is incomplete https://bugs.webkit.org/show_bug.cgi?id=41566 Add logic to all SVG elements which create renderes to expose a method "bool selfHasRelativeLengths()", that returns whether the element uses relative lengths (eg. <rect x="50%"...). This will be used soon to avoid relayouts of container children, when the bounds have not changed. A new method SVGStyledElement::updateRelativeLengthsInformation() is added, which is called from the various svgAttributeChanged() methods and insertedIntoDocument/removedFromDocument. It will be implemented in a follow-up patch. This patch does not affect any test behaviour related to relayouting. As SVGFilterElement finally got a proper svgAttributeChanged() method, it now properly invalidates clients on attribute changes - covered by a new test. Tests: svg/custom/relative-sized-inner-svg.xhtml svg/custom/relative-sized-use-without-attributes-on-symbol.xhtml svg/filters/filter-width-update.svg * rendering/RenderPath.cpp: (WebCore::RenderPath::layout): Rename hasRelativeValues to hasRelativeLengths. * rendering/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::layout): Ditto. (WebCore::RenderSVGRoot::calcViewport): Ditto. * rendering/RenderSVGViewportContainer.cpp: (WebCore::RenderSVGViewportContainer::calcViewport): Ditto * rendering/SVGRenderSupport.cpp: (WebCore::SVGRenderSupport::layoutChildren): Ditto. * svg/SVGCircleElement.cpp: (WebCore::SVGCircleElement::svgAttributeChanged): Call updateRelativeLengthsInformation() if any attribute which may contain relative lengths changes. (WebCore::SVGCircleElement::selfHasRelativeLengths): Ditto. Same for all other SVG*Elements below. * svg/SVGCircleElement.h: * svg/SVGEllipseElement.cpp: (WebCore::SVGEllipseElement::svgAttributeChanged): (WebCore::SVGEllipseElement::selfHasRelativeLengths): * svg/SVGEllipseElement.h: * svg/SVGFilterElement.cpp: (WebCore::SVGFilterElement::svgAttributeChanged): (WebCore::SVGFilterElement::selfHasRelativeLengths): * svg/SVGFilterElement.h: * svg/SVGForeignObjectElement.cpp: (WebCore::SVGForeignObjectElement::svgAttributeChanged): (WebCore::SVGForeignObjectElement::selfHasRelativeLengths): * svg/SVGForeignObjectElement.h: * svg/SVGImageElement.cpp: (WebCore::SVGImageElement::svgAttributeChanged): (WebCore::SVGImageElement::selfHasRelativeLengths): * svg/SVGImageElement.h: * svg/SVGLineElement.cpp: (WebCore::SVGLineElement::svgAttributeChanged): (WebCore::SVGLineElement::selfHasRelativeLengths): * svg/SVGLineElement.h: * svg/SVGLinearGradientElement.cpp: (WebCore::SVGLinearGradientElement::svgAttributeChanged): (WebCore::SVGLinearGradientElement::selfHasRelativeLengths): * svg/SVGLinearGradientElement.h: * svg/SVGMarkerElement.cpp: (WebCore::SVGMarkerElement::svgAttributeChanged): (WebCore::SVGMarkerElement::selfHasRelativeLengths): * svg/SVGMarkerElement.h: * svg/SVGMaskElement.cpp: (WebCore::SVGMaskElement::svgAttributeChanged): (WebCore::SVGMaskElement::selfHasRelativeLengths): * svg/SVGMaskElement.h: * svg/SVGPatternElement.cpp: (WebCore::SVGPatternElement::svgAttributeChanged): (WebCore::SVGPatternElement::selfHasRelativeLengths): * svg/SVGPatternElement.h: * svg/SVGRadialGradientElement.cpp: (WebCore::SVGRadialGradientElement::svgAttributeChanged): (WebCore::SVGRadialGradientElement::selfHasRelativeLengths): * svg/SVGRadialGradientElement.h: * svg/SVGRectElement.cpp: (WebCore::SVGRectElement::svgAttributeChanged): (WebCore::SVGRectElement::selfHasRelativeLengths): * svg/SVGRectElement.h: * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::svgAttributeChanged): (WebCore::SVGSVGElement::selfHasRelativeLengths): * svg/SVGSVGElement.h: * svg/SVGStyledElement.cpp: (WebCore::SVGStyledElement::insertedIntoDocument): Call updateRelativeLengthsInformation(). (WebCore::SVGStyledElement::removedFromDocument): Ditto. (WebCore::SVGStyledElement::updateRelativeLengthsInformation): Not implemented so far. Will land in a follow-up patch, together with the render tree changes. * svg/SVGStyledElement.h: (WebCore::SVGStyledElement::hasRelativeLengths): Devirtualized. For now, just call selfHasRelativeLengths() - this will change in a follow-up patch. (WebCore::SVGStyledElement::updateRelativeLengthsInformation): (WebCore::SVGStyledElement::selfHasRelativeLengths): Renamed from hasRelativeValues(). * svg/SVGSymbolElement.cpp: (WebCore::SVGSymbolElement::svgAttributeChanged): (WebCore::SVGSymbolElement::selfHasRelativeLengths): * svg/SVGSymbolElement.h: * svg/SVGTextContentElement.cpp: (WebCore::SVGTextContentElement::selfHasRelativeLengths): * svg/SVGTextContentElement.h: * svg/SVGTextPathElement.cpp: (WebCore::SVGTextPathElement::svgAttributeChanged): (WebCore::SVGTextPathElement::insertedIntoDocument): Call right base class' method. Skipped one in the hierachy before. (WebCore::SVGTextPathElement::selfHasRelativeLengths): * svg/SVGTextPathElement.h: * svg/SVGTextPositioningElement.cpp: (WebCore::SVGTextPositioningElement::svgAttributeChanged): (WebCore::listContainsRelativeValue): New helper funtion that checks wheter a SVGLengthList contains relative lengths. (WebCore::SVGTextPositioningElement::selfHasRelativeLengths): * svg/SVGTextPositioningElement.h: * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::insertedIntoDocument): Call right base class' method. Skipped on in the hierachy before. (WebCore::SVGUseElement::removedFromDocument): Ditto. (WebCore::SVGUseElement::svgAttributeChanged): (WebCore::SVGUseElement::buildShadowAndInstanceTree): Call updateRelativeLengthsInformation() after building the shadow tree. (WebCore::SVGUseElement::selfHasRelativeLengths): Same as all other methods, except that it includes the shadow tree root element. * svg/SVGUseElement.h: 2010-07-05 Nikolas Zimmermann <nzimmermann@rim.com> Reviewed by Dirk Schulze. Logic to track whether elements are using relative lengths is incomplete https://bugs.webkit.org/show_bug.cgi?id=41566 Add two new relative-sized-*.svg tests that would break, when relative sized kids aren't layout correctly. Add new test covering that filters update their clients, if any attribute changes. * platform/mac/svg/custom/relative-sized-inner-svg-expected.checksum: Added. * platform/mac/svg/custom/relative-sized-inner-svg-expected.png: Added. * platform/mac/svg/custom/relative-sized-inner-svg-expected.txt: Added. * platform/mac/svg/custom/relative-sized-use-without-attributes-on-symbol-expected.checksum: Added. * platform/mac/svg/custom/relative-sized-use-without-attributes-on-symbol-expected.png: Added. * platform/mac/svg/custom/relative-sized-use-without-attributes-on-symbol-expected.txt: Added. * platform/mac/svg/filters/filter-width-update-expected.checksum: Added. * platform/mac/svg/filters/filter-width-update-expected.png: Added. * platform/mac/svg/filters/filter-width-update-expected.txt: Added. * svg/custom/relative-sized-inner-svg.xhtml: Added. * svg/custom/relative-sized-use-without-attributes-on-symbol.xhtml: Added. * svg/filters/filter-width-update.svg: Added. Canonical link: https://commits.webkit.org/53403@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@62488 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-07-05 14:32:20 +00:00
<p>The svg area contained in the div element (red box), should fill out the whole area with a green shaped path</p>
<div id="contentBox" style="width: 100px; height: 400px; border: 1px solid red;">
Adapt inline SVG sizing behavior to Firefox and Blink https://bugs.webkit.org/show_bug.cgi?id=132569 Reviewed by Dean Jackson. Source/WebCore: This patch is ported from Blink CR 308992. Thanks to David Vest for helping with back porting his Blink patch. From the commit message: "The basis of this change is to map explicit width and height attributes to CSS properties, essentially promoting them to presentation attributes. Note that implicit "100%" width and height are not mapped. This enables us to remove the concept of "percentage intrinsic size" and rely on normal CSS rules to resolve percentage values. The change has been approved by the SVG WG and the spec is being updated. Minutes here: http://www.w3.org/2014/04/07-svg-minutes.html#item03" The new model was indeed approved by the SVG WG and is basically following the CSS 2.1 model for replaced elements. With this patch WebKit, Firefox and Blink have the same behavior for inline SVG. This is the first successful approach to unify the sizing behavior of SVG across UAs. Tests: svg/as-object/sizing/svg-in-object-placeholder-height-auto.html svg/as-object/sizing/svg-in-object-placeholder-height-fixed.html svg/as-object/sizing/svg-in-object-placeholder-height-percentage.html svg/in-html/sizing/svg-inline.html * css/svg.css: Root SVG elements still need to be sized with height: 100% and width: 100%. This is necessary since width and height are presentation attributes now. (svg:root): * rendering/RenderBox.h: (WebCore::RenderBox::computeIntrinsicRatioInformation): Remove all special behavior for intrinsic and percentage based sizes in SVG. This simplifies and unifies the code a lot. Most of the logic that is used is in RenderBox and RenderReplaced now. RenderSVGRoot was cleaned up a lot and is much lighter. And so it SVGSVGElement. * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight): (WebCore::RenderBoxModelObject::calculateImageIntrinsicDimensions): * rendering/RenderImage.cpp: (WebCore::RenderImage::computeIntrinsicRatioInformation): * rendering/RenderImage.h: * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::computeAspectRatioInformationForRenderBox): (WebCore::RenderReplaced::computeIntrinsicRatioInformation): (WebCore::RenderReplaced::computeReplacedLogicalWidth): (WebCore::RenderReplaced::computeReplacedLogicalHeight): (WebCore::RenderReplaced::computePreferredLogicalWidths): * rendering/RenderReplaced.h: * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::computeIntrinsicRatioInformation): (WebCore::RenderSVGRoot::computeReplacedLogicalWidth): (WebCore::RenderSVGRoot::computeReplacedLogicalHeight): (WebCore::RenderSVGRoot::hasRelativeDimensions): (WebCore::RenderSVGRoot::hasRelativeIntrinsicLogicalWidth): Deleted. (WebCore::RenderSVGRoot::hasRelativeLogicalHeight): Deleted. * rendering/svg/RenderSVGRoot.h: * svg/SVGElement.h: (WebCore::SVGElement::invalidateSVGPresentationAttributeStyle): * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::isPresentationAttribute): (WebCore::SVGSVGElement::collectStyleForPresentationAttribute): (WebCore::SVGSVGElement::svgAttributeChanged): (WebCore::SVGSVGElement::currentViewportSize): (WebCore::SVGSVGElement::hasIntrinsicWidth): (WebCore::SVGSVGElement::hasIntrinsicHeight): (WebCore::SVGSVGElement::intrinsicWidth): (WebCore::SVGSVGElement::intrinsicHeight): (WebCore::SVGSVGElement::widthAttributeEstablishesViewport): Deleted. (WebCore::SVGSVGElement::heightAttributeEstablishesViewport): Deleted. * svg/SVGSVGElement.h: * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::containerSize): * xml/XMLErrors.cpp: If an error occurs in a stand alone SVG file, we create an XHTML document with the error message and append the SVG file. This SVG file now follows the CSS sizing behavior as inline SVG. Therefore, we need to set width and height to 100% explicitly. (WebCore::XMLErrors::insertErrorMessageBlock): LayoutTests: The new sizing behavior for inline SVG causes different DRT outputs for about 40 test cases. This is expected but for most tests an improvement since the SVGs fit into the documents and scrollbars disappear or the general size gets smaller. Some tests needed to be updated. The size was either not set at all or not properly. svg-in-object.js and svg-inline.js contain dozens of new tests to check the correct sizing behavior. The tests were written by David Vest from Opera as part of CR 308992. Many of the -expected updates are caused by SVG size changes in turn affecting where line breaks are inserted. * TestExpectations: * accessibility/svg-image-expected.txt: * css3/flexbox/flexitem.html: * fast/css/infinite-floating-value-expected.txt: * fast/css/remove-fixed-resizer-crash-expected.txt: * fast/css3-text/css3-word-spacing-percentage/word-spacing-crash-expected.txt: * fast/repaint/moving-shadow-on-container.html: * fast/repaint/moving-shadow-on-path.html: * fast/repaint/svg-layout-root-style-attr-update.html: * fast/shapes/shape-outside-floats/shape-outside-relative-size-svg-expected.html: * fast/shapes/shape-outside-floats/shape-outside-relative-size-svg.html: * http/tests/xmlviewer/dumpAsText/svg-expected.txt: * platform/mac/svg/batik/filters/feTile-expected.txt: * platform/mac/svg/batik/masking/maskRegions-expected.txt: * platform/mac/svg/batik/paints/patternRegions-positioned-objects-expected.txt: * platform/mac/svg/batik/text/longTextOnPath-expected.txt: * platform/mac/svg/batik/text/textDecoration-expected.txt: * platform/mac/svg/batik/text/textEffect-expected.txt: * platform/mac/svg/batik/text/textLength-expected.txt: * platform/mac/svg/batik/text/textOnPath-expected.txt: * platform/mac/svg/batik/text/textPosition-expected.txt: * platform/mac/svg/batik/text/verticalText-expected.txt: * platform/mac/svg/batik/text/verticalTextOnPath-expected.txt: * platform/mac/svg/custom/bug45331-expected.txt: * platform/mac/svg/custom/junk-data-expected.txt: * platform/mac/svg/custom/missing-xlink-expected.txt: * platform/mac/svg/custom/object-sizing-height-50p-on-target-svg-absolute-expected.png: Removed. * platform/mac/svg/custom/object-sizing-height-50p-on-target-svg-expected.png: Removed. * platform/mac/svg/custom/object-sizing-width-50p-height-50p-on-target-svg-absolute-expected.png: Removed. * platform/mac/svg/custom/object-sizing-width-50p-height-50p-on-target-svg-expected.png: Removed. * platform/mac/svg/custom/object-sizing-width-50p-height-75p-on-target-svg-absolute-expected.png: Removed. * platform/mac/svg/custom/object-sizing-width-50p-height-75p-on-target-svg-absolute-expected.txt: Removed. * platform/mac/svg/custom/object-sizing-width-50p-height-75p-on-target-svg-expected.png: Removed. * platform/mac/svg/custom/object-sizing-width-50p-height-75p-on-target-svg-expected.txt: Removed. * platform/mac/svg/custom/object-sizing-width-50p-on-target-svg-absolute-expected.png: Removed. * platform/mac/svg/custom/object-sizing-width-50p-on-target-svg-expected.png: Removed. * platform/mac/svg/custom/object-sizing-width-75p-height-50p-on-target-svg-absolute-expected.png: Removed. * platform/mac/svg/custom/object-sizing-width-75p-height-50p-on-target-svg-expected.png: Removed. * platform/mac/svg/custom/object-sizing-width-75p-height-50p-on-target-svg-expected.txt: Removed. * platform/mac/svg/custom/path-bad-data-expected.txt: * platform/mac/svg/custom/svg-fonts-in-html-expected.txt: * platform/mac/svg/custom/use-font-face-crash-expected.txt: * platform/mac/svg/foreignObject/svg-document-in-html-document-expected.txt: * platform/mac/svg/hixie/error/012-expected.txt: * platform/mac/svg/hixie/intrinsic/001-expected.png: Removed. * platform/mac/svg/hixie/intrinsic/001-expected.txt: Removed. * platform/mac/svg/hixie/intrinsic/002-expected.png: Removed. * platform/mac/svg/hixie/intrinsic/002-expected.txt: Removed. * platform/mac/svg/in-html/circle-expected.txt: * platform/mac/svg/text/non-bmp-positioning-lists-expected.txt: * platform/mac/svg/transforms/animated-path-inside-transformed-html-expected.txt: * platform/mac/svg/transforms/text-with-pattern-inside-transformed-html-expected.txt: * platform/mac/svg/wicd/rightsizing-grid-expected.txt: * platform/mac/svg/wicd/test-rightsizing-b-expected.txt: * platform/mac/svg/zoom/page/zoom-background-image-tiled-expected.txt: * platform/mac/svg/zoom/page/zoom-background-images-expected.txt: * platform/mac/svg/zoom/page/zoom-foreignObject-expected.txt: * platform/mac/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.txt: * platform/mac/svg/zoom/page/zoom-svg-as-relative-image-expected.txt: * platform/mac/svg/zoom/page/zoom-svg-float-border-padding-expected.txt: * platform/mac/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.txt: * platform/mac/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.txt: * platform/mac/svg/zoom/page/zoom-svg-through-object-with-auto-size-expected.txt: * platform/mac/svg/zoom/page/zoom-svg-through-object-with-override-size-expected.txt: * platform/mac/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.txt: * platform/mac/svg/zoom/page/zoom-zoom-coords-expected.txt: * platform/mac/svg/zoom/text/zoom-foreignObject-expected.txt: * svg/animations/animate-css-xml-attributeType-expected.txt: * svg/as-image/image-respects-deviceScaleFactor.html: * svg/as-image/image-respects-pageScaleFactor.html: * svg/as-image/svg-as-image-with-relative-size-expected.html: * svg/as-image/svg-as-relative-image.html: * svg/as-object/sizing/svg-in-object-placeholder-height-auto-expected.txt: Added. * svg/as-object/sizing/svg-in-object-placeholder-height-auto.html: Added. * svg/as-object/sizing/svg-in-object-placeholder-height-fixed-expected.txt: Added. * svg/as-object/sizing/svg-in-object-placeholder-height-fixed.html: Added. * svg/as-object/sizing/svg-in-object-placeholder-height-percentage-expected.txt: Added. * svg/as-object/sizing/svg-in-object-placeholder-height-percentage.html: Added. * svg/as-object/sizing/svg-in-object.js: Added. (.): (.addAttr): (.generateSVGURI): (buildDemo): (.doCombinationTestRecursive): (doCombinationTest): (debugHint): (.debugHint): (testSVGInObjectWithPlaceholderHeightAttr.): (testSVGInObjectWithPlaceholderHeightAttr): * svg/css/composite-shadow-example.html: * svg/css/composite-shadow-with-opacity.html: * svg/css/max-width-2.html: * svg/css/stars-with-shadow.html: * svg/custom/absolute-sized-content-with-resources.xhtml: * svg/custom/altglyph.svg: * svg/custom/document-all-includes-svg-expected.txt: * svg/custom/external-paintserver-reference-expected.txt: * svg/custom/external-paintserver-reference.svg: * svg/custom/get-text-element-transform-crash-expected.txt: * svg/custom/linking-base-external-reference-expected.txt: * svg/custom/linking-base-external-reference.xhtml: * svg/custom/object-sizing-height-50p-on-target-svg-absolute-expected.txt: Removed. * svg/custom/object-sizing-height-50p-on-target-svg-absolute.xhtml: Removed. * svg/custom/object-sizing-height-50p-on-target-svg-expected.txt: Removed. * svg/custom/object-sizing-height-50p-on-target-svg.xhtml: Removed. * svg/custom/object-sizing-width-50p-height-50p-on-target-svg-absolute-expected.txt: Removed. * svg/custom/object-sizing-width-50p-height-50p-on-target-svg-absolute.xhtml: Removed. * svg/custom/object-sizing-width-50p-height-50p-on-target-svg-expected.txt: Removed. * svg/custom/object-sizing-width-50p-height-50p-on-target-svg.xhtml: Removed. * svg/custom/object-sizing-width-50p-height-75p-on-target-svg-absolute-expected.txt: Removed. * svg/custom/object-sizing-width-50p-height-75p-on-target-svg-absolute.xhtml: Removed. * svg/custom/object-sizing-width-50p-height-75p-on-target-svg-expected.txt: Removed. * svg/custom/object-sizing-width-50p-height-75p-on-target-svg.xhtml: Removed. * svg/custom/object-sizing-width-50p-on-target-svg-absolute-expected.txt: Removed. * svg/custom/object-sizing-width-50p-on-target-svg-absolute.xhtml: Removed. * svg/custom/object-sizing-width-50p-on-target-svg-expected.txt: Removed. * svg/custom/object-sizing-width-50p-on-target-svg.xhtml: Removed. * svg/custom/object-sizing-width-75p-height-50p-on-target-svg-absolute-expected.txt: Removed. * svg/custom/object-sizing-width-75p-height-50p-on-target-svg-absolute.xhtml: Removed. * svg/custom/object-sizing-width-75p-height-50p-on-target-svg-expected.txt: Removed. * svg/custom/object-sizing-width-75p-height-50p-on-target-svg.xhtml: Removed. * svg/custom/pending-resource-after-removal.xhtml: * svg/custom/percentage-of-html-parent.xhtml: * 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/tref-with-progress-tag-setpseudo-assert-expected.txt: * svg/custom/unicode-in-tspan-multi-svg-crash-expected.txt: * svg/custom/use-invalid-html-expected.txt: * svg/custom/window-named-item-lookup-expected.txt: * svg/dom/SVGViewSpec-invalid-ref-crash-expected.txt: * svg/dom/parent-view-layout-crash-expected.txt: * svg/dom/stylesheet-candidate-node-crash-main-expected.txt: * svg/dom/svg-root-lengths.html: * svg/foreignObject/absolute-position-foreign-object-child-crash-expected.txt: * svg/hixie/intrinsic/001-expected.png: Removed. * svg/hixie/intrinsic/001-expected.txt: Removed. * svg/hixie/intrinsic/001.html: Removed. * svg/hixie/intrinsic/002-expected.png: Removed. * svg/hixie/intrinsic/002-expected.txt: Removed. * svg/hixie/intrinsic/002.html: Removed. * svg/hixie/intrinsic/resources/001.svg: Removed. * svg/hixie/intrinsic/resources/002.svg: Removed. * svg/in-html/sizing/svg-inline-expected.txt: Added. * svg/in-html/sizing/svg-inline.html: Added. * svg/in-html/sizing/svg-inline.js: Added. (.): (setupSVGElement): (buildDemo): (.doCombinationTestRecursive): (doCombinationTest): (debugHint): (.debugHint): * svg/path-arc-invalid-expected.txt: * svg/repaint/repaint-webkit-svg-shadow-container-expected.txt: * svg/text/append-text-node-to-tspan.html: * svg/text/kerning.svg: * svg/text/modify-text-node-in-tspan.html: * svg/text/multichar-glyph.svg: * svg/text/remove-text-node-from-tspan.html: * svg/text/remove-tspan-from-text.html: * svg/text/svg-rtl-text-crash-expected.txt: * svg/text/text-block-child-crash-expected.txt: * svg/transforms/animated-path-inside-transformed-html.xhtml: * svg/transforms/svg-css-transforms-clip-path.xhtml: * svg/transforms/transform-origin-css-property.xhtml: * svg/zoom/page/zoom-foreignObject.svg: * svg/zoom/page/zoom-svg-as-relative-image.html: * svg/zoom/text/zoom-foreignObject.svg: Canonical link: https://commits.webkit.org/150625@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@168350 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-05-06 06:06:28 +00:00
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100%" height="100%">
2010-07-05 Nikolas Zimmermann <nzimmermann@rim.com> Reviewed by Dirk Schulze. Logic to track whether elements are using relative lengths is incomplete https://bugs.webkit.org/show_bug.cgi?id=41566 Add logic to all SVG elements which create renderes to expose a method "bool selfHasRelativeLengths()", that returns whether the element uses relative lengths (eg. <rect x="50%"...). This will be used soon to avoid relayouts of container children, when the bounds have not changed. A new method SVGStyledElement::updateRelativeLengthsInformation() is added, which is called from the various svgAttributeChanged() methods and insertedIntoDocument/removedFromDocument. It will be implemented in a follow-up patch. This patch does not affect any test behaviour related to relayouting. As SVGFilterElement finally got a proper svgAttributeChanged() method, it now properly invalidates clients on attribute changes - covered by a new test. Tests: svg/custom/relative-sized-inner-svg.xhtml svg/custom/relative-sized-use-without-attributes-on-symbol.xhtml svg/filters/filter-width-update.svg * rendering/RenderPath.cpp: (WebCore::RenderPath::layout): Rename hasRelativeValues to hasRelativeLengths. * rendering/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::layout): Ditto. (WebCore::RenderSVGRoot::calcViewport): Ditto. * rendering/RenderSVGViewportContainer.cpp: (WebCore::RenderSVGViewportContainer::calcViewport): Ditto * rendering/SVGRenderSupport.cpp: (WebCore::SVGRenderSupport::layoutChildren): Ditto. * svg/SVGCircleElement.cpp: (WebCore::SVGCircleElement::svgAttributeChanged): Call updateRelativeLengthsInformation() if any attribute which may contain relative lengths changes. (WebCore::SVGCircleElement::selfHasRelativeLengths): Ditto. Same for all other SVG*Elements below. * svg/SVGCircleElement.h: * svg/SVGEllipseElement.cpp: (WebCore::SVGEllipseElement::svgAttributeChanged): (WebCore::SVGEllipseElement::selfHasRelativeLengths): * svg/SVGEllipseElement.h: * svg/SVGFilterElement.cpp: (WebCore::SVGFilterElement::svgAttributeChanged): (WebCore::SVGFilterElement::selfHasRelativeLengths): * svg/SVGFilterElement.h: * svg/SVGForeignObjectElement.cpp: (WebCore::SVGForeignObjectElement::svgAttributeChanged): (WebCore::SVGForeignObjectElement::selfHasRelativeLengths): * svg/SVGForeignObjectElement.h: * svg/SVGImageElement.cpp: (WebCore::SVGImageElement::svgAttributeChanged): (WebCore::SVGImageElement::selfHasRelativeLengths): * svg/SVGImageElement.h: * svg/SVGLineElement.cpp: (WebCore::SVGLineElement::svgAttributeChanged): (WebCore::SVGLineElement::selfHasRelativeLengths): * svg/SVGLineElement.h: * svg/SVGLinearGradientElement.cpp: (WebCore::SVGLinearGradientElement::svgAttributeChanged): (WebCore::SVGLinearGradientElement::selfHasRelativeLengths): * svg/SVGLinearGradientElement.h: * svg/SVGMarkerElement.cpp: (WebCore::SVGMarkerElement::svgAttributeChanged): (WebCore::SVGMarkerElement::selfHasRelativeLengths): * svg/SVGMarkerElement.h: * svg/SVGMaskElement.cpp: (WebCore::SVGMaskElement::svgAttributeChanged): (WebCore::SVGMaskElement::selfHasRelativeLengths): * svg/SVGMaskElement.h: * svg/SVGPatternElement.cpp: (WebCore::SVGPatternElement::svgAttributeChanged): (WebCore::SVGPatternElement::selfHasRelativeLengths): * svg/SVGPatternElement.h: * svg/SVGRadialGradientElement.cpp: (WebCore::SVGRadialGradientElement::svgAttributeChanged): (WebCore::SVGRadialGradientElement::selfHasRelativeLengths): * svg/SVGRadialGradientElement.h: * svg/SVGRectElement.cpp: (WebCore::SVGRectElement::svgAttributeChanged): (WebCore::SVGRectElement::selfHasRelativeLengths): * svg/SVGRectElement.h: * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::svgAttributeChanged): (WebCore::SVGSVGElement::selfHasRelativeLengths): * svg/SVGSVGElement.h: * svg/SVGStyledElement.cpp: (WebCore::SVGStyledElement::insertedIntoDocument): Call updateRelativeLengthsInformation(). (WebCore::SVGStyledElement::removedFromDocument): Ditto. (WebCore::SVGStyledElement::updateRelativeLengthsInformation): Not implemented so far. Will land in a follow-up patch, together with the render tree changes. * svg/SVGStyledElement.h: (WebCore::SVGStyledElement::hasRelativeLengths): Devirtualized. For now, just call selfHasRelativeLengths() - this will change in a follow-up patch. (WebCore::SVGStyledElement::updateRelativeLengthsInformation): (WebCore::SVGStyledElement::selfHasRelativeLengths): Renamed from hasRelativeValues(). * svg/SVGSymbolElement.cpp: (WebCore::SVGSymbolElement::svgAttributeChanged): (WebCore::SVGSymbolElement::selfHasRelativeLengths): * svg/SVGSymbolElement.h: * svg/SVGTextContentElement.cpp: (WebCore::SVGTextContentElement::selfHasRelativeLengths): * svg/SVGTextContentElement.h: * svg/SVGTextPathElement.cpp: (WebCore::SVGTextPathElement::svgAttributeChanged): (WebCore::SVGTextPathElement::insertedIntoDocument): Call right base class' method. Skipped one in the hierachy before. (WebCore::SVGTextPathElement::selfHasRelativeLengths): * svg/SVGTextPathElement.h: * svg/SVGTextPositioningElement.cpp: (WebCore::SVGTextPositioningElement::svgAttributeChanged): (WebCore::listContainsRelativeValue): New helper funtion that checks wheter a SVGLengthList contains relative lengths. (WebCore::SVGTextPositioningElement::selfHasRelativeLengths): * svg/SVGTextPositioningElement.h: * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::insertedIntoDocument): Call right base class' method. Skipped on in the hierachy before. (WebCore::SVGUseElement::removedFromDocument): Ditto. (WebCore::SVGUseElement::svgAttributeChanged): (WebCore::SVGUseElement::buildShadowAndInstanceTree): Call updateRelativeLengthsInformation() after building the shadow tree. (WebCore::SVGUseElement::selfHasRelativeLengths): Same as all other methods, except that it includes the shadow tree root element. * svg/SVGUseElement.h: 2010-07-05 Nikolas Zimmermann <nzimmermann@rim.com> Reviewed by Dirk Schulze. Logic to track whether elements are using relative lengths is incomplete https://bugs.webkit.org/show_bug.cgi?id=41566 Add two new relative-sized-*.svg tests that would break, when relative sized kids aren't layout correctly. Add new test covering that filters update their clients, if any attribute changes. * platform/mac/svg/custom/relative-sized-inner-svg-expected.checksum: Added. * platform/mac/svg/custom/relative-sized-inner-svg-expected.png: Added. * platform/mac/svg/custom/relative-sized-inner-svg-expected.txt: Added. * platform/mac/svg/custom/relative-sized-use-without-attributes-on-symbol-expected.checksum: Added. * platform/mac/svg/custom/relative-sized-use-without-attributes-on-symbol-expected.png: Added. * platform/mac/svg/custom/relative-sized-use-without-attributes-on-symbol-expected.txt: Added. * platform/mac/svg/filters/filter-width-update-expected.checksum: Added. * platform/mac/svg/filters/filter-width-update-expected.png: Added. * platform/mac/svg/filters/filter-width-update-expected.txt: Added. * svg/custom/relative-sized-inner-svg.xhtml: Added. * svg/custom/relative-sized-use-without-attributes-on-symbol.xhtml: Added. * svg/filters/filter-width-update.svg: Added. Canonical link: https://commits.webkit.org/53403@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@62488 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-07-05 14:32:20 +00:00
<defs>
<symbol id="gamesBorder" viewBox="0 0 150 150" >
<path fill="green" d="M143 103 143 117 a27,10 0 1 1 -136 0 L 7 117 7 103 a27,10 0 0 1 136 0 L52 72 a33,33 0 1 1 5 0" />
</symbol>
</defs>
<!-- This test is identical to relative-sized-use-on-symbol.xhtml, except that <use> doesn't contain any attributes.
This assures that specifying viewBox on the symbol alone is enough to trigger relayouting -->
<use xlink:href="#gamesBorder"/>
</svg>
</div>
<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() {
2010-07-05 Nikolas Zimmermann <nzimmermann@rim.com> Reviewed by Dirk Schulze. Logic to track whether elements are using relative lengths is incomplete https://bugs.webkit.org/show_bug.cgi?id=41566 Add logic to all SVG elements which create renderes to expose a method "bool selfHasRelativeLengths()", that returns whether the element uses relative lengths (eg. <rect x="50%"...). This will be used soon to avoid relayouts of container children, when the bounds have not changed. A new method SVGStyledElement::updateRelativeLengthsInformation() is added, which is called from the various svgAttributeChanged() methods and insertedIntoDocument/removedFromDocument. It will be implemented in a follow-up patch. This patch does not affect any test behaviour related to relayouting. As SVGFilterElement finally got a proper svgAttributeChanged() method, it now properly invalidates clients on attribute changes - covered by a new test. Tests: svg/custom/relative-sized-inner-svg.xhtml svg/custom/relative-sized-use-without-attributes-on-symbol.xhtml svg/filters/filter-width-update.svg * rendering/RenderPath.cpp: (WebCore::RenderPath::layout): Rename hasRelativeValues to hasRelativeLengths. * rendering/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::layout): Ditto. (WebCore::RenderSVGRoot::calcViewport): Ditto. * rendering/RenderSVGViewportContainer.cpp: (WebCore::RenderSVGViewportContainer::calcViewport): Ditto * rendering/SVGRenderSupport.cpp: (WebCore::SVGRenderSupport::layoutChildren): Ditto. * svg/SVGCircleElement.cpp: (WebCore::SVGCircleElement::svgAttributeChanged): Call updateRelativeLengthsInformation() if any attribute which may contain relative lengths changes. (WebCore::SVGCircleElement::selfHasRelativeLengths): Ditto. Same for all other SVG*Elements below. * svg/SVGCircleElement.h: * svg/SVGEllipseElement.cpp: (WebCore::SVGEllipseElement::svgAttributeChanged): (WebCore::SVGEllipseElement::selfHasRelativeLengths): * svg/SVGEllipseElement.h: * svg/SVGFilterElement.cpp: (WebCore::SVGFilterElement::svgAttributeChanged): (WebCore::SVGFilterElement::selfHasRelativeLengths): * svg/SVGFilterElement.h: * svg/SVGForeignObjectElement.cpp: (WebCore::SVGForeignObjectElement::svgAttributeChanged): (WebCore::SVGForeignObjectElement::selfHasRelativeLengths): * svg/SVGForeignObjectElement.h: * svg/SVGImageElement.cpp: (WebCore::SVGImageElement::svgAttributeChanged): (WebCore::SVGImageElement::selfHasRelativeLengths): * svg/SVGImageElement.h: * svg/SVGLineElement.cpp: (WebCore::SVGLineElement::svgAttributeChanged): (WebCore::SVGLineElement::selfHasRelativeLengths): * svg/SVGLineElement.h: * svg/SVGLinearGradientElement.cpp: (WebCore::SVGLinearGradientElement::svgAttributeChanged): (WebCore::SVGLinearGradientElement::selfHasRelativeLengths): * svg/SVGLinearGradientElement.h: * svg/SVGMarkerElement.cpp: (WebCore::SVGMarkerElement::svgAttributeChanged): (WebCore::SVGMarkerElement::selfHasRelativeLengths): * svg/SVGMarkerElement.h: * svg/SVGMaskElement.cpp: (WebCore::SVGMaskElement::svgAttributeChanged): (WebCore::SVGMaskElement::selfHasRelativeLengths): * svg/SVGMaskElement.h: * svg/SVGPatternElement.cpp: (WebCore::SVGPatternElement::svgAttributeChanged): (WebCore::SVGPatternElement::selfHasRelativeLengths): * svg/SVGPatternElement.h: * svg/SVGRadialGradientElement.cpp: (WebCore::SVGRadialGradientElement::svgAttributeChanged): (WebCore::SVGRadialGradientElement::selfHasRelativeLengths): * svg/SVGRadialGradientElement.h: * svg/SVGRectElement.cpp: (WebCore::SVGRectElement::svgAttributeChanged): (WebCore::SVGRectElement::selfHasRelativeLengths): * svg/SVGRectElement.h: * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::svgAttributeChanged): (WebCore::SVGSVGElement::selfHasRelativeLengths): * svg/SVGSVGElement.h: * svg/SVGStyledElement.cpp: (WebCore::SVGStyledElement::insertedIntoDocument): Call updateRelativeLengthsInformation(). (WebCore::SVGStyledElement::removedFromDocument): Ditto. (WebCore::SVGStyledElement::updateRelativeLengthsInformation): Not implemented so far. Will land in a follow-up patch, together with the render tree changes. * svg/SVGStyledElement.h: (WebCore::SVGStyledElement::hasRelativeLengths): Devirtualized. For now, just call selfHasRelativeLengths() - this will change in a follow-up patch. (WebCore::SVGStyledElement::updateRelativeLengthsInformation): (WebCore::SVGStyledElement::selfHasRelativeLengths): Renamed from hasRelativeValues(). * svg/SVGSymbolElement.cpp: (WebCore::SVGSymbolElement::svgAttributeChanged): (WebCore::SVGSymbolElement::selfHasRelativeLengths): * svg/SVGSymbolElement.h: * svg/SVGTextContentElement.cpp: (WebCore::SVGTextContentElement::selfHasRelativeLengths): * svg/SVGTextContentElement.h: * svg/SVGTextPathElement.cpp: (WebCore::SVGTextPathElement::svgAttributeChanged): (WebCore::SVGTextPathElement::insertedIntoDocument): Call right base class' method. Skipped one in the hierachy before. (WebCore::SVGTextPathElement::selfHasRelativeLengths): * svg/SVGTextPathElement.h: * svg/SVGTextPositioningElement.cpp: (WebCore::SVGTextPositioningElement::svgAttributeChanged): (WebCore::listContainsRelativeValue): New helper funtion that checks wheter a SVGLengthList contains relative lengths. (WebCore::SVGTextPositioningElement::selfHasRelativeLengths): * svg/SVGTextPositioningElement.h: * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::insertedIntoDocument): Call right base class' method. Skipped on in the hierachy before. (WebCore::SVGUseElement::removedFromDocument): Ditto. (WebCore::SVGUseElement::svgAttributeChanged): (WebCore::SVGUseElement::buildShadowAndInstanceTree): Call updateRelativeLengthsInformation() after building the shadow tree. (WebCore::SVGUseElement::selfHasRelativeLengths): Same as all other methods, except that it includes the shadow tree root element. * svg/SVGUseElement.h: 2010-07-05 Nikolas Zimmermann <nzimmermann@rim.com> Reviewed by Dirk Schulze. Logic to track whether elements are using relative lengths is incomplete https://bugs.webkit.org/show_bug.cgi?id=41566 Add two new relative-sized-*.svg tests that would break, when relative sized kids aren't layout correctly. Add new test covering that filters update their clients, if any attribute changes. * platform/mac/svg/custom/relative-sized-inner-svg-expected.checksum: Added. * platform/mac/svg/custom/relative-sized-inner-svg-expected.png: Added. * platform/mac/svg/custom/relative-sized-inner-svg-expected.txt: Added. * platform/mac/svg/custom/relative-sized-use-without-attributes-on-symbol-expected.checksum: Added. * platform/mac/svg/custom/relative-sized-use-without-attributes-on-symbol-expected.png: Added. * platform/mac/svg/custom/relative-sized-use-without-attributes-on-symbol-expected.txt: Added. * platform/mac/svg/filters/filter-width-update-expected.checksum: Added. * platform/mac/svg/filters/filter-width-update-expected.png: Added. * platform/mac/svg/filters/filter-width-update-expected.txt: Added. * svg/custom/relative-sized-inner-svg.xhtml: Added. * svg/custom/relative-sized-use-without-attributes-on-symbol.xhtml: Added. * svg/filters/filter-width-update.svg: Added. Canonical link: https://commits.webkit.org/53403@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@62488 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-07-05 14:32:20 +00:00
document.getElementById("contentBox").style.setProperty("width", "400px");
}
</script>
</body>
</html>