haikuwebkit/LayoutTests/svg/as-object/nested-embedded-svg-size-ch...

21 lines
759 B
HTML
Raw Permalink Normal View History

2011-08-06 Nikolas Zimmermann <nzimmermann@rim.com> REGRESSION(87526): ASSERT(!needsLayout()) followed by graphical glitches on google charts (svg loaded in iframe) https://bugs.webkit.org/show_bug.cgi?id=64974 svg/zoom/page/zoom-svg-through-object-with-*.xhtml are flaky https://bugs.webkit.org/show_bug.cgi?id=63186 Reviewed by Zoltan Herczeg. Rollout r89484, which disabled some svg/zoom/page tests, to see whether the flakiness is gone now. Add several new tests in svg/as-object - covering bug 64974. * platform/mac/svg/as-object/deep-nested-embedded-svg-size-changes-no-layout-triggers-1-expected.png: Added. * platform/mac/svg/as-object/deep-nested-embedded-svg-size-changes-no-layout-triggers-1-expected.txt: Added. * platform/mac/svg/as-object/deep-nested-embedded-svg-size-changes-no-layout-triggers-2-expected.png: Added. * platform/mac/svg/as-object/deep-nested-embedded-svg-size-changes-no-layout-triggers-2-expected.txt: Added. * platform/mac/svg/as-object/embedded-svg-immediate-offsetWidth-query-expected.png: Added. * platform/mac/svg/as-object/embedded-svg-size-changes-expected.png: Added. * platform/mac/svg/as-object/embedded-svg-size-changes-no-layout-triggers-expected.png: Added. * platform/mac/svg/as-object/embedded-svg-size-changes-no-layout-triggers-expected.txt: Added. * platform/mac/svg/as-object/nested-embedded-svg-size-changes-expected.png: Added. * platform/mac/svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-1-expected.png: Added. * platform/mac/svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-1-expected.txt: Added. * platform/mac/svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-2-expected.png: Added. * platform/mac/svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-2-expected.txt: Added. * svg/as-object/deep-nested-embedded-svg-size-changes-no-layout-triggers-1.html: Added. * svg/as-object/deep-nested-embedded-svg-size-changes-no-layout-triggers-2.html: Added. * svg/as-object/embedded-svg-immediate-offsetWidth-query-expected.txt: Added. * svg/as-object/embedded-svg-immediate-offsetWidth-query.html: Added. * svg/as-object/embedded-svg-size-changes-expected.txt: Added. * svg/as-object/embedded-svg-size-changes-no-layout-triggers.html: Added. * svg/as-object/embedded-svg-size-changes.html: Added. * svg/as-object/nested-embedded-svg-size-changes-expected.txt: Added. * svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-1.html: Added. * svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-2.html: Added. * svg/as-object/nested-embedded-svg-size-changes.html: Added. * svg/as-object/resources: Added. * svg/as-object/resources/embedded-svg-size-changes-no-layout-triggers.svg: Added. * svg/as-object/resources/embedded-svg-size-changes.svg: Added. * svg/as-object/resources/nested-embedded-svg-size-changes-target-no-layout-triggers-1.html: Added. * svg/as-object/resources/nested-embedded-svg-size-changes-target-no-layout-triggers-2.html: Added. * svg/as-object/resources/nested-embedded-svg-size-changes-target.html: Added. * svg/zoom/page/zoom-svg-through-object-with-absolute-size-2.xhtml: Copied from LayoutTests/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2.xhtml-disabled. * svg/zoom/page/zoom-svg-through-object-with-absolute-size-2.xhtml-disabled: Removed. * svg/zoom/page/zoom-svg-through-object-with-absolute-size.xhtml: Copied from LayoutTests/svg/zoom/page/zoom-svg-through-object-with-absolute-size.xhtml-disabled. * svg/zoom/page/zoom-svg-through-object-with-absolute-size.xhtml-disabled: Removed. * svg/zoom/page/zoom-svg-through-object-with-auto-size.html: Copied from LayoutTests/svg/zoom/page/zoom-svg-through-object-with-auto-size.html-disabled. * svg/zoom/page/zoom-svg-through-object-with-auto-size.html-disabled: Removed. * svg/zoom/page/zoom-svg-through-object-with-huge-size.xhtml: Copied from LayoutTests/svg/zoom/page/zoom-svg-through-object-with-huge-size.xhtml-disabled. * svg/zoom/page/zoom-svg-through-object-with-huge-size.xhtml-disabled: Removed. * svg/zoom/page/zoom-svg-through-object-with-override-size.html: Copied from LayoutTests/svg/zoom/page/zoom-svg-through-object-with-override-size.html-disabled. * svg/zoom/page/zoom-svg-through-object-with-override-size.html-disabled: Removed. * svg/zoom/page/zoom-svg-through-object-with-percentage-size.xhtml: Copied from LayoutTests/svg/zoom/page/zoom-svg-through-object-with-percentage-size.xhtml-disabled. * svg/zoom/page/zoom-svg-through-object-with-percentage-size.xhtml-disabled: Removed. 2011-08-06 Nikolas Zimmermann <nzimmermann@rim.com> REGRESSION(87526): ASSERT(!needsLayout()) followed by graphical glitches on google charts (svg loaded in iframe) https://bugs.webkit.org/show_bug.cgi?id=64974 svg/zoom/page/zoom-svg-through-object-with-*.xhtml are flaky https://bugs.webkit.org/show_bug.cgi?id=63186 Reviewed by Zoltan Herczeg. Fix host <-> embedded document size negotiation race. The currently implemented solution relied on a specific order of paint/layout calls, which is broken. Consider rendering a document containing an object/iframe/embed referencing an external SVG file. When FrameView::layout() is called (associated with the outermost RenderView of the host document), it lays out the whole document, and afterwards performPostLayoutTasks() is called. This method then asks the Frames contentRenderer to update its widget positions. This triggers a call of the embedded documents FrameView::layout() method, which now lays out the embedded SVG documents tree through RenderSVGRoot::layout. And here's the bug: The size of the object/iframe replaced element, which hosts the embedded document may depend on the intrinsic size of the SVG. We tried to mark the embedded documents _ownerRenderer_ (the RenderPart) as "needs layout and pref width recalc" right from RenderSVGRoot::layout() and hoped that this would cause the whole document to be laid out again, now that the size of the embedded SVG document is known. As soon as the SVG document is laid out, the host document will be painted (flush deferred repaints) and an assertion ASSERTS(!needsLayout()) will be fired, as we modified the setNeedsLayout() state after the host document layout finished, right before painting. A proper fix is to only keep track in RenderSVGRoot whether it needs to negotiate the size with the host document, but not modify the layout state of the host document in any way. Let FrameView handle the size negotiation right in FrameView::layout(). Consider following document: <body><iframe src="some.svg"></body> After initial loading & parsing of the document, a FrameView exists for the main frame, and a sub-FrameView for the <iframe>. The external SVG document, may not be loaded yet at this point. That means when RenderIFrame::layout() tries to figure out its size (computeLogicalWidth/Height) - the RenderSVGRoot renderer of the external document hasn't been created yet (as the external document hasn't received data yet) - so it falls back to eg. 300x150 CSS default size (in the simplest case, where width/height are both auto). Suppose the external document now finished loading, the RenderSVGRoot is created and a global relayout is triggered starting from the main FrameView. As we already laid out the document once, needsLayout() is false for the main FrameView, so _only_ the child frame view that contains the RenderSVGRoot is now laid out, for the first time. After layout is done, the SVG document is fully laid out, though the RenderPart which embedded the SVG does NOT notice the SVG has been laid out, so it still carries the default 300x150 size (and needsLayout=false!). The fix is to retrigger layout of the parent frame view by marking the owner renderer of the frame view as "needs layout and pref widths recalc" and immediatiely performing a synchronous update of the layout. It's important to do it sync, as scripts depend on the result of the size negotiation (covered extensively with the new tests in svg/as-object). Reenable svg/zoom/page/zoom-svg-through-object* tests to see whether the flakiness is gone. Tests: svg/as-object/deep-nested-embedded-svg-size-changes-no-layout-triggers-1.html svg/as-object/deep-nested-embedded-svg-size-changes-no-layout-triggers-2.html svg/as-object/embedded-svg-immediate-offsetWidth-query.html svg/as-object/embedded-svg-size-changes-no-layout-triggers.html svg/as-object/embedded-svg-size-changes.html svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-1.html svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-2.html svg/as-object/nested-embedded-svg-size-changes.html svg/zoom/page/zoom-svg-through-object-with-absolute-size-2.xhtml svg/zoom/page/zoom-svg-through-object-with-absolute-size.xhtml svg/zoom/page/zoom-svg-through-object-with-auto-size.html svg/zoom/page/zoom-svg-through-object-with-huge-size.xhtml svg/zoom/page/zoom-svg-through-object-with-override-size.html svg/zoom/page/zoom-svg-through-object-with-percentage-size.xhtml * page/FrameView.cpp: (WebCore::FrameView::layout): Call forceLayoutParentViewIfNeeded() after layout finished. (WebCore::FrameView::forceLayoutParentViewIfNeeded): Added helper method. (WebCore::FrameView::embeddedContentBox): Moved from RenderPart to a more central place. * page/FrameView.h: * rendering/RenderPart.cpp: (WebCore::RenderPart::embeddedContentBox): Moved to FrameView. * rendering/svg/RenderSVGRoot.cpp: Rename m_didNegotiateSize to m_needsSizeNegotiationWithHostDocument. (WebCore::RenderSVGRoot::RenderSVGRoot): (WebCore::RenderSVGRoot::layout): Only figure out if we need neggotiation, don't actually do anything, let FrameView handle this. * rendering/svg/RenderSVGRoot.h: Remove incorrect negotiateSizeWithHostDocumentIfNeeded() logic. (WebCore::RenderSVGRoot::needsSizeNegotiationWithHostDocument): Added getter for m_needsSizeNegotiationWithHostDocument. (WebCore::RenderSVGRoot::scheduledSizeNegotiationWithHostDocument): Added safe way to clear m_needsSizeNegotiationWithHostDocument (asserts if it was false before). Canonical link: https://commits.webkit.org/81640@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@92545 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-08-06 08:25:44 +00:00
<html xmlns="http://www.w3.org/1999/xhtml">
Rewrite SVG tests to make extensive use of display() in repaint tests https://bugs.webkit.org/show_bug.cgi?id=77736 Reviewed by Andreas Kling. Convert all tests in svg/ (except svg/custom & svg/dynamic-updates) that exercise repainting to use the fast/repaint/resources/repaint.js harness, which forces a layout, and calls layoutTestController.display() before executing the actual repaint test, so that repaint rectangles are properly tracked and shown (white areas that are redrawn, on top of the gray background, painted over the web view after the initial painting). Previously SVG tests used to work like this: (using an HTML example, but it doesn't matter) <html><body><svg><rect/><script>function change() { rect.setAttribute(...); layoutTestController.notifyDone(); } setTimeout(change, 0); </script></svg></body></html> We expected that the initial painting was done, before change() as called. This is unreliable for various reasons: - the timeout is not guaranteed to fire after the document loaded, it may happen inbetween on eg. a slow connection. - nor is it guaranteed that the document has painted initially before we enter change(). This leads to the current regressions -- if we break repainting, we can't see it in the current layout tests, as the initial painting always happens after change() executed in trunk, at least on a fast machine. In order to make repaint testing reliable we have to use following scheme: <html><body onload="runRepaintTest()"><svg><rect/><script>function repaintTest() { rect.setAttribute(...); }</script></svg></body></html> runRepaintTest() is provided by the repaint.js harness and does: if (window.layoutTestController) { document.body.offsetTop; layoutTestController.display(); repaintTest(); } else { setTimeout(repaintTest, 100); } Using this harness outside of DRT allows to test SVG repainting tests in the browser as well, as the repainting changes aren't immediately fired (0ms timer) but instead delayed by 100ms, so a visual "flash" is visible, if something changes. For DRT it does two things. First it forces Document::updateLayout() to be called, and then forces the web view to paint immediately, and then it starts tracking any repaint rects, that are fired _after_ the initial painting, which are then highlighted in the pixel test dump later on. Using display() is the only way to get reliable painting results across DRT/WebKitTestRunner, and to get rid of the flakiness. All *.xml/*.html/*.htm/*.xhtml tests which excersise repainting can be moved to use runRepaintTest() from repaint.js. <body> needs to be changed to <body onload="runRepaintTest()">, and the timeouts & waitUntilDone/notifyDone calls can be removed from the tests, leading to much nicer testcases, removing lots of boilerplate. Pure *.svg tests unfortunately can't use <svg onload="runRepaintTest()"> at the moment, due timing differences between the HTML load and the SVGLoad event, that's out of scope for this bug report. To remove any hacks from the testcases themselves, I centralized following work-around in a new function in repaint.js, and let all *.svg tests use it. function runSVGRepaintTest() { if (window.layoutTestController) { layoutTestController.waitUntilDone(); setTimeout(runRepaintTest, 0); } else runRepaintTest(); } runRepaintTest() has to be called from a timer at the moment, as the SVGLoad event fires earlier as HTML load event. Before that is fixed, we have to use <svg onload="runSVGRepaintTest()"> instead of <svg onload="runRepaintTest()"> and append: layoutTestController.notifyDone() to the repaintTest() functions in the testcases. That should explain the testcase differences between pure-SVG and non-pure-SVG tests, and why I treated them differently. This approach is unfortunately as flakey as the old, so to make pure *.svg tests test repainting reliable, the bug needs to be fixed. Note that svg/custom, and svg/dynamic-updates will be fixed in another chunk, as they also require large amounts of rebaselines. * fast/repaint/resources/repaint.js: (runRepaintTest): (runSVGRepaintTest): * platform/chromium/test_expectations.txt: * platform/mac/svg/as-background-image/animated-svg-as-background-expected.png: * platform/mac/svg/as-image/animated-svg-as-image-expected.png: * platform/mac/svg/as-image/animated-svg-as-image-no-fixed-intrinsic-size-expected.png: * platform/mac/svg/as-image/animated-svg-as-image-same-image-expected.png: * platform/mac/svg/as-image/svg-image-change-content-size-expected.png: * platform/mac/svg/as-object/deep-nested-embedded-svg-size-changes-no-layout-triggers-1-expected.png: * platform/mac/svg/as-object/deep-nested-embedded-svg-size-changes-no-layout-triggers-1-expected.txt: * platform/mac/svg/as-object/deep-nested-embedded-svg-size-changes-no-layout-triggers-2-expected.png: * platform/mac/svg/as-object/deep-nested-embedded-svg-size-changes-no-layout-triggers-2-expected.txt: * platform/mac/svg/as-object/embedded-svg-immediate-offsetWidth-query-expected.png: * platform/mac/svg/as-object/embedded-svg-size-changes-expected.png: * platform/mac/svg/as-object/embedded-svg-size-changes-no-layout-triggers-expected.png: * platform/mac/svg/as-object/embedded-svg-size-changes-no-layout-triggers-expected.txt: * platform/mac/svg/as-object/nested-embedded-svg-size-changes-expected.png: * platform/mac/svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-1-expected.png: * platform/mac/svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-1-expected.txt: * platform/mac/svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-2-expected.png: * platform/mac/svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-2-expected.txt: * platform/mac/svg/carto.net/tabgroup-expected.png: * platform/mac/svg/carto.net/tabgroup-expected.txt: * platform/mac/svg/carto.net/window-expected.png: * platform/mac/svg/carto.net/window-expected.txt: * platform/mac/svg/css/shadow-changes-expected.png: * platform/mac/svg/dom/SVGPathSegList-segment-modification-expected.png: * platform/mac/svg/dom/SVGPathSegList-segment-modification-expected.txt: * platform/mac/svg/dom/SVGPathSegList-xml-dom-synchronization-expected.png: * platform/mac/svg/dom/SVGPathSegList-xml-dom-synchronization2-expected.png: * platform/mac/svg/dom/SVGRectElement/rect-modify-rx-expected.png: * platform/mac/svg/filters/filter-refresh-expected.png: * platform/mac/svg/filters/filter-width-update-expected.png: * platform/mac/svg/filters/filter-width-update-expected.txt: * platform/mac/svg/filters/invalidate-on-child-layout-expected.png: * platform/mac/svg/hixie/perf/001-expected.png: * platform/mac/svg/hixie/perf/002-expected.png: * platform/mac/svg/hixie/perf/003-expected.png: * platform/mac/svg/hixie/perf/003-expected.txt: * platform/mac/svg/hixie/perf/004-expected.png: * platform/mac/svg/hixie/perf/004-expected.txt: * platform/mac/svg/hixie/perf/005-expected.png: * platform/mac/svg/hixie/perf/005-expected.txt: * platform/mac/svg/hixie/perf/006-expected.png: * platform/mac/svg/hixie/perf/006-expected.txt: * platform/mac/svg/hixie/perf/007-expected.png: * platform/mac/svg/hixie/perf/007-expected.txt: * platform/mac/svg/repaint/filter-child-repaint-expected.png: * platform/mac/svg/repaint/image-href-change-expected.png: * platform/mac/svg/repaint/image-with-clip-path-expected.png: * platform/mac/svg/text/append-text-node-to-tspan-expected.png: * platform/mac/svg/text/modify-text-node-in-tspan-expected.png: * platform/mac/svg/text/remove-text-node-from-tspan-expected.png: * platform/mac/svg/text/remove-tspan-from-text-expected.png: * platform/mac/svg/text/text-text-05-t-expected.png: * platform/mac/svg/text/text-text-05-t-expected.txt: * platform/mac/svg/transforms/animated-path-inside-transformed-html-expected.png: * platform/mac/svg/zoom/page/absolute-sized-document-no-scrollbars-expected.png: * platform/mac/svg/zoom/page/relative-sized-document-scrollbars-expected.png: * platform/mac/svg/zoom/page/zoom-background-images-expected.txt: * platform/mac/svg/zoom/page/zoom-foreignObject-expected.png: * platform/mac/svg/zoom/page/zoom-hixie-mixed-008-expected.txt: * platform/mac/svg/zoom/page/zoom-hixie-rendering-model-004-expected.png: * platform/mac/svg/zoom/page/zoom-hixie-rendering-model-004-expected.txt: * platform/mac/svg/zoom/page/zoom-mask-with-percentages-expected.png: * platform/mac/svg/zoom/page/zoom-svg-as-background-with-relative-size-and-viewBox-expected.png: * platform/mac/svg/zoom/page/zoom-svg-as-background-with-relative-size-expected.png: * platform/mac/svg/zoom/page/zoom-svg-as-image-expected.png: * platform/mac/svg/zoom/page/zoom-svg-as-object-expected.png: * platform/mac/svg/zoom/page/zoom-svg-as-relative-image-expected.png: * 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/text/absolute-sized-document-no-scrollbars-expected.png: * platform/mac/svg/zoom/text/absolute-sized-document-scrollbars-expected.png: * platform/mac/svg/zoom/text/relative-sized-document-scrollbars-expected.png: * platform/mac/svg/zoom/text/zoom-foreignObject-expected.png: * platform/mac/svg/zoom/text/zoom-hixie-mixed-008-expected.png: * platform/mac/svg/zoom/text/zoom-hixie-mixed-008-expected.txt: * platform/mac/svg/zoom/text/zoom-hixie-mixed-009-expected.png: * platform/mac/svg/zoom/text/zoom-hixie-rendering-model-004-expected.png: * platform/mac/svg/zoom/text/zoom-hixie-rendering-model-004-expected.txt: * svg/as-background-image/animated-svg-as-background.html: * svg/as-background-image/resources/animated-rect-relative-size.svg: * svg/as-background-image/svg-as-background-5.html: * svg/as-background-image/svg-background-partial-redraw.html: * svg/as-image/animated-svg-as-image-no-fixed-intrinsic-size.html: * svg/as-image/animated-svg-as-image-same-image.html: * svg/as-image/animated-svg-as-image.html: * svg/as-image/resources/animated-rect-fixed-size-2.svg: Copied from LayoutTests/svg/as-image/resources/animated-rect-same-image.svg. * svg/as-image/resources/animated-rect-fixed-size.svg: * svg/as-image/resources/animated-rect-relative-size.svg: * svg/as-image/resources/animated-rect-same-image.svg: * svg/as-image/svg-image-change-content-size.xhtml: * svg/as-object/embedded-svg-immediate-offsetWidth-query.html: * svg/as-object/embedded-svg-size-changes-no-layout-triggers.html: * svg/as-object/embedded-svg-size-changes.html: * svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-1.html: * svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-2.html: * svg/as-object/nested-embedded-svg-size-changes.html: * svg/as-object/resources/embedded-svg-size-changes-no-layout-triggers.svg: * svg/as-object/resources/nested-embedded-svg-size-changes-target-no-layout-triggers-1.html: * svg/carto.net/tabgroup.svg: * svg/carto.net/window.svg: * svg/css/shadow-changes.svg: * svg/dom/SVGPathSegList-segment-modification.svg: * svg/dom/SVGPathSegList-xml-dom-synchronization.xhtml: * svg/dom/SVGPathSegList-xml-dom-synchronization2.xhtml: * svg/dom/SVGRectElement/rect-modify-rx.svg: * svg/filters/animate-fill-expected.png: * svg/filters/animate-fill.svg: * svg/filters/feImage-reference-invalidation-expected.png: * svg/filters/feImage-reference-invalidation.svg: * svg/filters/feImage-target-add-to-document-expected.png: * svg/filters/feImage-target-add-to-document.svg: * svg/filters/feImage-target-changes-id-expected.png: * svg/filters/feImage-target-changes-id.svg: * svg/filters/feImage-target-id-change-expected.png: * svg/filters/feImage-target-id-change.svg: * svg/filters/feImage-target-reappend-to-document-expected.png: * svg/filters/feImage-target-reappend-to-document.svg: * svg/filters/feImage-target-remove-from-document-expected.png: * svg/filters/feImage-target-remove-from-document.svg: * svg/filters/filter-refresh.svg: * svg/filters/filter-width-update.svg: * svg/filters/invalidate-on-child-layout.svg: * svg/hixie/perf/001.xml: * svg/hixie/perf/002.xml: * svg/hixie/perf/003.xml: * svg/hixie/perf/004.xml: * svg/hixie/perf/005.xml: * svg/hixie/perf/006.xml: * svg/hixie/perf/007.xml: * svg/hixie/perf/resources/smallcats.gif: Added. * svg/repaint/container-repaint-expected.png: * svg/repaint/container-repaint.svg: * svg/repaint/filter-child-repaint.svg: * svg/repaint/image-href-change.svg: * svg/repaint/image-with-clip-path.svg: * svg/text/append-text-node-to-tspan.html: * svg/text/modify-text-node-in-tspan.html: * svg/text/remove-text-node-from-tspan.html: * svg/text/remove-tspan-from-text.html: * svg/text/text-text-05-t.svg: * svg/transforms/animated-path-inside-transformed-html.xhtml: * svg/zoom/page/absolute-sized-document-no-scrollbars.svg: * svg/zoom/page/absolute-sized-document-scrollbars.svg: * svg/zoom/page/relative-sized-document-scrollbars.svg: * svg/zoom/page/zoom-background-image-tiled.html: * svg/zoom/page/zoom-background-images.html: * svg/zoom/page/zoom-coords-viewattr-01-b.svg: * svg/zoom/page/zoom-foreignObject.svg: * svg/zoom/page/zoom-getBoundingClientRect.xhtml: * svg/zoom/page/zoom-hixie-mixed-008.xml: * svg/zoom/page/zoom-hixie-mixed-009.xml: * svg/zoom/page/zoom-hixie-rendering-model-004.xhtml: * svg/zoom/page/zoom-img-preserveAspectRatio-support-1.html: * svg/zoom/page/zoom-mask-with-percentages.svg: * svg/zoom/page/zoom-replaced-intrinsic-ratio-001.htm: * svg/zoom/page/zoom-svg-as-background-with-relative-size-and-viewBox.html: * svg/zoom/page/zoom-svg-as-background-with-relative-size.html: * svg/zoom/page/zoom-svg-as-image.html: * svg/zoom/page/zoom-svg-as-object.html: * svg/zoom/page/zoom-svg-as-relative-image.html: * svg/zoom/page/zoom-svg-float-border-padding.xml: * svg/zoom/page/zoom-svg-through-object-with-absolute-size-2.xhtml: * svg/zoom/page/zoom-svg-through-object-with-absolute-size.xhtml: * svg/zoom/page/zoom-svg-through-object-with-auto-size.html: * svg/zoom/page/zoom-svg-through-object-with-huge-size.xhtml: * svg/zoom/page/zoom-svg-through-object-with-override-size.html: * svg/zoom/page/zoom-svg-through-object-with-percentage-size.xhtml: * svg/zoom/page/zoom-svg-through-object-with-text.xhtml-disabled: * svg/zoom/page/zoom-zoom-coords.xhtml: * svg/zoom/resources/testPageZoom.js: (repaintTest): * svg/zoom/resources/testTextZoom.js: (repaintTest): * svg/zoom/text/absolute-sized-document-no-scrollbars.svg: * svg/zoom/text/absolute-sized-document-scrollbars.svg: * svg/zoom/text/relative-sized-document-scrollbars.svg: * svg/zoom/text/zoom-coords-viewattr-01-b.svg: * svg/zoom/text/zoom-foreignObject.svg: * svg/zoom/text/zoom-hixie-mixed-008.xml: * svg/zoom/text/zoom-hixie-mixed-009.xml: * svg/zoom/text/zoom-hixie-rendering-model-004.xhtml: * svg/zoom/text/zoom-svg-float-border-padding.xml: Canonical link: https://commits.webkit.org/94836@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@106918 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-02-07 11:19:19 +00:00
<head>
<script src="../../fast/repaint/resources/repaint.js"></script>
<script type="text/javascript">
function repaintTest() {
Use testRunner instead of layoutTestController in SVG tests https://bugs.webkit.org/show_bug.cgi?id=92898 Reviewed by Dirk Schulze. * svg/W3C-SVG-1.1-SE/paths-dom-02-f.svg: * svg/animations/animate-beginElementAt.svg: * svg/animations/animate-calcMode-spline-crash-bad-array-length.xhtml: * svg/animations/animate-linear-discrete-additive-b.svg: * svg/animations/animate-linear-discrete-additive-c.svg: * svg/animations/animate-linear-discrete-additive.svg: * svg/animations/animate-list-crash.svg: * svg/animations/animate-setcurrenttime.html: * svg/animations/animate-update-crash.xhtml: * svg/animations/animateColor-additive-2a.svg: * svg/animations/animateColor-additive-2b.svg: * svg/animations/animateColor-additive-2c.svg: * svg/animations/animateColor-additive-2d.svg: * svg/animations/animateMotion-additive-1.svg: * svg/animations/animateMotion-additive-2a.svg: * svg/animations/animateMotion-additive-2b.svg: * svg/animations/animateMotion-additive-2c.svg: * svg/animations/animateMotion-additive-2d.svg: * svg/animations/animateTransform-accumulation.svg: * svg/animations/animateTransform-by-scale-1.svg: * svg/animations/animateTransform-by-scale.svg: * svg/animations/animateTransform-from-by-from-to-comparision-expected.svg: * svg/animations/animateTransform-from-by-from-to-comparision.svg: * svg/animations/animateTransform-from-by-scale-additive-sum.svg: * svg/animations/animateTransform-from-by-scale.svg: * svg/animations/animateTransform-rotate-around-point.svg: * svg/animations/animateTransform-skewX.svg: * svg/animations/animateTransform-skewY.svg: * svg/animations/animateTransform-translate.svg: * svg/animations/dynamic-modify-attributename-crash.svg: * svg/animations/keypoints-mismatch.svg: * svg/animations/length-list-animation.svg: * svg/animations/list-wrapper-assertion.svg: * svg/animations/mozilla/animateMotion-by-1.svg: * svg/animations/mozilla/animateMotion-from-to-1-expected.svg: * svg/animations/mozilla/animateMotion-from-to-1.svg: * svg/animations/mozilla/animateMotion-mpath-pathLength-1.svg: * svg/animations/mozilla/animateMotion-mpath-targetChange-1.svg: * svg/animations/mozilla/animateMotion-to-overridden-1.svg: * svg/animations/multiple-animateTransform-additive-sum.svg: * svg/animations/multiple-begin-animation-discrete.svg: * svg/animations/multiple-begin-animation.svg: * svg/animations/path-animation.svg: * svg/animations/repeatDur-zero.xhtml: * svg/animations/repeating-path-animation.svg: * svg/animations/resources/SVGAnimationTestCase.js: (runAnimationTest): * svg/animations/smil-element-not-removed-crash.html: * svg/animations/smil-element-target-crash-main.html: * svg/animations/smil-leak-dynamically-added-element-instances.svg: * svg/animations/smil-leak-element-instances-noBaseValRef.svg: * svg/animations/smil-leak-element-instances.svg: * svg/animations/smil-leak-elements.svg: * svg/animations/svg-two-animate-elements-crash.svg: * svg/animations/svglength-animation-retarget-crash.html: * svg/animations/svglength-element-removed-crash.svg: * svg/as-background-image/animated-svg-as-background.html: * svg/as-background-image/svg-background-crash-on-refresh.html: * svg/as-image/animated-svg-as-image-no-fixed-intrinsic-size.html: * svg/as-image/animated-svg-as-image-same-image.html: * svg/as-image/animated-svg-as-image.html: * svg/as-image/animated-svg-repaints-completely-in-hidpi.html: * svg/as-image/drag-svg-as-image.html: * svg/as-image/image-respects-deviceScaleFactor.html: * svg/as-image/image-respects-pageScaleFactor-change.html: * svg/as-image/svg-image-leak-cached-data.html: * svg/as-image/svg-image-leak-loader.html: * svg/as-image/svg-nested.html: * svg/as-object/embedded-svg-immediate-offsetWidth-query.html: * svg/as-object/embedded-svg-size-changes-no-layout-triggers.html: * svg/as-object/embedded-svg-size-changes.html: * svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-1.html: * svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-2.html: * svg/as-object/nested-embedded-svg-size-changes.html: * svg/as-object/resources/embedded-svg-size-changes-no-layout-triggers.svg: * svg/as-object/resources/nested-embedded-svg-size-changes-target-no-layout-triggers-1.html: * svg/carto.net/frameless-svg-parse-error.html: * svg/carto.net/window.svg: * svg/css/crash-css-generated-content.xhtml: * svg/css/cursor-image-replace.svg: * svg/css/cursor-replace.svg: * svg/css/getComputedStyle-basic.xhtml: * svg/css/invalid-color-crash.svg: * svg/css/multiple-cursors-crash.html: * svg/css/script-tests/svg-attribute-length-parsing.js: * svg/css/script-tests/svg-attribute-parser-mode.js: * svg/css/style-change-crash.html: * svg/css/svg-ellipse-render-crash.html: * svg/custom/acid3-test-77.html: * svg/custom/anchor-on-use.svg: * svg/custom/animate-disallowed-mask-element.svg: * svg/custom/animate-disallowed-use-element.svg: * 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/animate-use-crash.xhtml: * svg/custom/assert-empty-layout-attributes.svg: * svg/custom/bbox-of-g-in-symbol.svg: * svg/custom/boundingBox.html: * svg/custom/bug78700.svg: * svg/custom/bug78807.svg: * svg/custom/bug78838.html: * svg/custom/bug79798.html: * svg/custom/bug86119.html: * svg/custom/bug86392.html: * svg/custom/bug86781.html: * svg/custom/click-internal-anchor-with-use-crash.xhtml: * svg/custom/crash-inline-container-client.html: * svg/custom/crash-text-in-textpath.svg: * svg/custom/crash-textPath-attributes.html: * svg/custom/delete-modified-text-in-defs-crash.svg: * svg/custom/delete-text-crash.html: * svg/custom/delete-text-innerText-crash.html: * svg/custom/detached-outermost-svg-crash.html: * svg/custom/disallowed-text-content-rendering.svg: * svg/custom/display-table-caption-foreignObject.svg: * svg/custom/display-table-caption-inherit-foreignObject.xhtml: * svg/custom/display-table-caption-inherit-text.xhtml: * svg/custom/display-table-caption-text.svg: * svg/custom/element-instance-held-by-js-crash.svg: * svg/custom/embedded-svg-allowed-in-dashboard.xml: * svg/custom/empty-className-baseVal-crash.html: * svg/custom/filter-on-svgimage.svg: * svg/custom/font-face-move.svg: * svg/custom/font-face-name-without-name-attr.svg: * svg/custom/font-face-not-in-document.svg: * svg/custom/font-platformDestroy-crash.svg: * svg/custom/foreignObject-crash-on-hover.xml: * svg/custom/foreignobject-crash-with-absolute-positioned-children.svg: * svg/custom/frame-getSVGDocument.html: * svg/custom/g-outside-svg.html: * svg/custom/get-text-element-transform-crash.html: * svg/custom/getBBox-empty-container.html: * svg/custom/getBBox-js.svg: * svg/custom/getBBox-path.svg: * svg/custom/getBBox-perpendicular-path.svg: * svg/custom/getscreenctm-in-mixed-content2.xhtml: * svg/custom/gradient-attr-update.svg: * svg/custom/gradient-stop-display-none-crash.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/image-base-uri.svg: * svg/custom/image-clipped-hit.svg: * svg/custom/image-rescale-scroll.html: * svg/custom/image-with-prefix-in-webarchive-expected.webarchive: * svg/custom/image-with-prefix-in-webarchive.svg: * svg/custom/insertItemBefore-from-non-list-origin.svg: * svg/custom/intersection-list-clipping.svg: * svg/custom/intersection-list-crash.svg: * svg/custom/intersection-list-nested-svg.svg: * svg/custom/intersection-list-null.svg: * svg/custom/invalid-gradient-with-xlink.svg: * svg/custom/invalid-paint-shape-mask.svg: * 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-svg-constructors.svg: * svg/custom/js-update-container2.svg: * svg/custom/js-update-image-and-display.svg: * svg/custom/js-update-image-and-display2.svg: * svg/custom/js-update-image-and-display3.svg: * svg/custom/layout-loop.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/linking-uri-01-b.svg: * svg/custom/loadevents-capturing.svg: * svg/custom/loadevents-externalresourcesrequired-displaynone.svg: * svg/custom/loadevents-externalresourcesrequired.svg: * svg/custom/loadevents-normal-displaynone.svg: * svg/custom/loadevents-normal.svg: * svg/custom/manually-parsed-embedded-svg-allowed-in-dashboard.html: * svg/custom/manually-parsed-svg-allowed-in-dashboard.html: * svg/custom/marker-getPropertyValue.svg: * svg/custom/mask-changes.svg: * svg/custom/mask-invalidation.svg: * svg/custom/mouse-move-on-svg-container-standalone.svg: * svg/custom/mouse-move-on-svg-container.xhtml: * svg/custom/mouse-move-on-svg-root-standalone.svg: * svg/custom/mouse-move-on-svg-root.xhtml: * svg/custom/multiple-title-elements.svg: * svg/custom/new-image-is-html-element.svg: * svg/custom/path-getPresentationAttribute-crash.html: * svg/custom/path-getTotalLength-on-big-segment-crash.svg: * svg/custom/path-getTotalLength.svg: * svg/custom/pending-resource-after-removal.xhtml: * svg/custom/pending-resource-leak-2.svg: * svg/custom/pending-resource-leak-3.svg: * svg/custom/pending-resource-leak.svg: * svg/custom/pointer-events-image-css-transform.svg: * svg/custom/pointer-events-image.svg: * svg/custom/pointer-events-invalid-fill.svg: * svg/custom/pointer-events-on-rounded-rect.xhtml: * svg/custom/pointer-events-on-svg-with-pointer.xhtml: * svg/custom/pointer-events-on-svg-without-pointer.xhtml: * svg/custom/pointer-events-text-css-transform.svg: * svg/custom/pointer-events-text.svg: * svg/custom/pointer-events-with-linecaps-and-miterlimits.xhtml: * svg/custom/poly-points-attribute-changes.svg: * svg/custom/polyline-hittest.svg: * svg/custom/polyline-points-crash.html: * svg/custom/prevent-default.svg: * svg/custom/recursive-use.svg: * svg/custom/recursive-use2.svg: * svg/custom/repaint-moving-svg-and-div.xhtml: * svg/custom/resource-client-removal.svg: * svg/custom/resources/focus-event-handling-keyboard.js: * svg/custom/resources/focus-event-handling.js: * svg/custom/resources/link-target.html: * svg/custom/resources/linkingCircle-f.svg: * svg/custom/resources/svgsvgelement-ctm.js: * 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/scroll-to-svg-element-assertion.html: * svg/custom/scrolling-embedded-svg-file-image-repaint-problem.html: * svg/custom/stop-crash.svg: * svg/custom/stroke-width-click.svg: * svg/custom/svg-allowed-in-dashboard-object.html: * svg/custom/svg-features.html: * svg/custom/svg-fonts-in-html-linebreaks.html: * svg/custom/svg-fonts-no-latin-glyph.html: * svg/custom/svg-getelementid.xhtml: * svg/custom/svg-parse-overflow-1.html: * svg/custom/svg-parse-overflow-2.html: * svg/custom/svg-parse-overflow-3.html: * svg/custom/svg-parse-overflow-4.html: * svg/custom/svg-parse-overflow-5.html: * svg/custom/svg-use-style-float-crash.svg: * svg/custom/svg-width-intrinsic-crash.html: * svg/custom/symbol-viewport-element-crash.svg: * svg/custom/text-node-in-text-invalidated.svg: * svg/custom/text-tref-03-b-dynamic.svg: * svg/custom/text-tref-03-b-dynamic2.svg: * svg/custom/textPath-assert.svg: * svg/custom/textPath-set-id.svg: * svg/custom/tiling-regular-hexagonal-crash.svg: * svg/custom/tref-clone-crash.html: * svg/custom/tref-shadowdom.html: * svg/custom/use-animation-in-fill.html: * svg/custom/use-crash-in-non-wellformed-document.svg: * svg/custom/use-crash-pending-resource.svg: * svg/custom/use-crash-using-children-before-destroy.svg: * svg/custom/use-crash-when-href-change.svg: * svg/custom/use-detach.svg: * svg/custom/use-display-none.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-external-crash.svg: * svg/custom/use-instanceRoot-as-event-target.xhtml: * svg/custom/use-instanceRoot-event-listener-liveness.xhtml: * svg/custom/use-instanceRoot-with-use-removed.svg: * svg/custom/use-invalid-font-face.svg: * svg/custom/use-invalid-html.xhtml: * svg/custom/use-invalid-pattern.svg: * svg/custom/use-invalid-style.svg: * svg/custom/use-move-to-offset.svg: * svg/custom/use-multiple-on-nested-disallowed-font.html: * svg/custom/use-mutation-event-crash.svg: * svg/custom/use-nested-children.svg: * svg/custom/use-nested-disallowed-target.svg: * svg/custom/use-nested-missing-target-added.svg: * svg/custom/use-nested-missing-target-removed.svg: * svg/custom/use-nested-missing-target.svg: * svg/custom/use-nested-notarget.svg: * svg/custom/use-non-existing-symbol-crash.svg: * svg/custom/use-on-use-with-child-and-empty-target.svg: * svg/custom/use-on-use-with-child.svg: * svg/custom/use-referencing-style-crash.svg: * svg/custom/use-shadow-root-parent-removal.svg: * svg/custom/use-tref-crash.svg: * svg/custom/webkit-transform-crash.html: * svg/custom/xlink-prefix-in-attributes.html: * svg/custom/xlink-to-invalid-gradient.svg: * svg/dom/SVGPathSegList-xml-dom-synchronization.xhtml: * svg/dom/SVGPolygonElement-baseVal-list-removal-crash.html: * svg/dom/SVGScriptElement/script-async-attr.svg: * svg/dom/SVGScriptElement/script-change-externalResourcesRequired-while-loading.svg: * svg/dom/SVGScriptElement/script-clone-rerun-self.svg: * svg/dom/SVGScriptElement/script-clone-rerun.svg: * svg/dom/SVGScriptElement/script-load-and-error-events.svg: * svg/dom/SVGScriptElement/script-onerror-bubbling.svg: * svg/dom/SVGScriptElement/script-reexecution.svg: * svg/dom/SVGScriptElement/script-set-href.svg: * svg/dom/SVGStyledElement-pendingResource-crash.html: * svg/dom/SVGTransformList-empty-list-consolidation.html: * svg/dom/animated-tearoff-equality.xhtml: * svg/dom/animated-tearoff-lifespan.xhtml: * svg/dom/baseVal-animVal-crash.html: * svg/dom/baseVal-animVal-list-crash.html: * svg/dom/frame-related-api-during-load.html: * svg/dom/parent-view-layout-crash.html: * svg/dom/path-marker-removed-crash.svg: * svg/dom/resources/viewspec-parser.js: (continueFuzzing.else.script.onload): (continueFuzzing): * svg/dom/script-tests/SVGViewSpec.js: (completeTest.script.onload): (completeTest): * svg/dom/smil-methods.svg: * svg/dom/stylesheet-candidate-node-crash-main.html: * svg/dom/svg-element-attribute-js-null.xhtml: * svg/dom/symbol-embeddedAnimation.svg: * svg/dom/use-style-recalc-script-execute-crash.html: * svg/dom/use-transform.svg: * svg/dom/viewport-container-crash.svg: * svg/dom/vkern-element-crash.html: * svg/dynamic-updates/resources/SVGTestCase.js: (createSVGTestCase): (embedSVGTestCase): (completeTest.script.onload): (completeTest): * svg/dynamic-updates/resources/linkTarget.svg: * svg/filters/feBlend-invalid-mode.xhtml: * svg/filters/feColorMatrix-invalid-value.svg: * svg/filters/feComponentTransfer-style-crash.xhtml: * svg/filters/feDisplacementMap-crash-test.xhtml: * svg/filters/feImage-animated-transform-on-target-rect.svg: * svg/filters/feImage-target-reappend-to-document.svg: * svg/filters/feImage-zero-size-crash.svg: * svg/filters/feMorphology-invalid-radius.svg: * svg/filters/feMorphology-zero-radius.svg: * svg/filters/filter-after-transform-crash.svg: * svg/filters/reparent-animated-filter-target.html: * svg/filters/svg-transform-blur-crash.svg: * svg/foreignObject/absolute-position-foreign-object-child-crash.html: * svg/foreignObject/fO-fixed-position-crash.html: * svg/hittest/foreign-object-background.svg: * svg/hittest/svg-ellipse-non-scale-stroke.xhtml: * svg/hittest/svg-ellipse-rect-stroke.xhtml: * svg/hittest/svg-ellipse.xhtml: * svg/hittest/svg-inside-display-table.xhtml: * svg/hittest/svg-inside-table.xhtml: * svg/hittest/svg-padding.xhtml: * svg/hittest/svg-shapes-non-scale-stroke.html: * svg/hittest/svg-small-path.xhtml: * svg/hittest/svg-small-viewbox.xhtml: * svg/hittest/zero-length-butt-cap-path.xhtml: * svg/hittest/zero-length-round-cap-path.xhtml: * svg/hittest/zero-length-square-cap-path.xhtml: * svg/hixie/dynamic/001.xml: * svg/hixie/links/003.xml: * svg/hixie/perf/001.xml: * svg/hixie/perf/002.xml: * svg/hixie/perf/003.xml: * svg/hixie/perf/004.xml: * svg/hixie/perf/005.xml: * svg/hixie/perf/006.xml: * svg/hixie/perf/007.xml: * svg/in-html/script-external.html: * svg/in-html/script-nested.html: * svg/in-html/script-write.html: * svg/in-html/script.html: * svg/in-html/svg-assert-failure-percentage.html: * svg/path-arc-invalid.html: * svg/repaint/filter-repaint.svg: * svg/repaint/image-href-change.svg: * svg/repaint/image-with-clip-path.svg: * svg/repaint/repainting-after-animation-element-removal.svg: * svg/text/add-tspan-position-bug.html: * svg/text/caret-in-svg-text.xhtml: * svg/text/clear-floats-crash.svg: * svg/text/font-size-null-assertion.svg: * svg/text/font-size-too-large-crash.svg: * svg/text/foreignObject-text-clipping-bug.xml: * svg/text/glyphref-renderer-create-crash.html: * svg/text/highcharts-assertion.html: * svg/text/inline-text-destroy-attributes-crash.xhtml: * svg/text/modify-tspan-position-bug.html: * svg/text/resources/SelectionTestCase.js: * svg/text/select-text-svgfont.html: * svg/text/selection-doubleclick.svg: * svg/text/selection-tripleclick.svg: * svg/text/svg-rtl-text-crash.html: * svg/text/svg-zoom-large-value.xhtml: * svg/text/text-align-01-b.svg: * svg/text/text-align-02-b.svg: * svg/text/text-align-03-b.svg: * svg/text/text-align-04-b.svg: * svg/text/text-align-05-b.svg: * svg/text/text-align-06-b.svg: * svg/text/text-altglyph-01-b.svg: * svg/text/text-assert.svg: * svg/text/text-block-child-crash.xhtml: * svg/text/text-deco-01-b.svg: * svg/text/text-font-anonymous-parent.xhtml: * svg/text/text-font-invalid.html: * svg/text/text-font-uri-invalid.svg: * svg/text/text-fonts-01-t.svg: * svg/text/text-fonts-02-t.svg: * svg/text/text-intro-05-t.svg: * svg/text/text-path-01-b.svg: * svg/text/text-positioning-remove-child-crash.svg: * svg/text/text-property-with-display-none.html: * svg/text/text-spacing-01-b.svg: * svg/text/text-style-invalid.svg: * svg/text/text-style-recalc-crash.html: * svg/text/text-text-01-b.svg: * svg/text/text-text-03-b.svg: * svg/text/text-text-04-t.svg: * svg/text/text-text-05-t.svg: * svg/text/text-text-06-t.svg: * svg/text/text-text-07-t.svg: * svg/text/text-text-08-b.svg: * svg/text/text-tref-01-b.svg: * svg/text/text-tselect-01-b.svg: * svg/text/text-tselect-02-f.svg: * svg/text/text-tspan-01-b.svg: * svg/text/text-ws-01-t.svg: * svg/text/text-ws-02-t.svg: * svg/text/textPathBoundsBug.svg: * svg/text/textpath-reference-crash.html: * svg/text/tref-event-listener-crash.svg: * svg/text/tspan-getComputedTextLength.svg: * svg/transforms/percent-transform-values.xhtml: * svg/transforms/transform-origin-presentation-attribute.xhtml: * svg/webarchive/svg-cursor-subresources-expected.webarchive: * svg/webarchive/svg-cursor-subresources.svg: * svg/webarchive/svg-feimage-subresources-expected.webarchive: * svg/webarchive/svg-feimage-subresources.svg: * svg/webarchive/svg-script-subresouces-expected.webarchive: * svg/webarchive/svg-script-subresouces.svg: * svg/zoom/page/zoom-getBoundingClientRect.xhtml: * svg/zoom/page/zoom-zoom-coords.xhtml: * svg/zoom/resources/testPageZoom.js: (repaintTest): (completeDynamicTest.script.onload): (completeDynamicTest): * svg/zoom/resources/testTextZoom.js: (repaintTest): Canonical link: https://commits.webkit.org/110751@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@124380 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-08-01 23:05:16 +00:00
if (window.testRunner)
testRunner.waitUntilDone();
Rewrite SVG tests to make extensive use of display() in repaint tests https://bugs.webkit.org/show_bug.cgi?id=77736 Reviewed by Andreas Kling. Convert all tests in svg/ (except svg/custom & svg/dynamic-updates) that exercise repainting to use the fast/repaint/resources/repaint.js harness, which forces a layout, and calls layoutTestController.display() before executing the actual repaint test, so that repaint rectangles are properly tracked and shown (white areas that are redrawn, on top of the gray background, painted over the web view after the initial painting). Previously SVG tests used to work like this: (using an HTML example, but it doesn't matter) <html><body><svg><rect/><script>function change() { rect.setAttribute(...); layoutTestController.notifyDone(); } setTimeout(change, 0); </script></svg></body></html> We expected that the initial painting was done, before change() as called. This is unreliable for various reasons: - the timeout is not guaranteed to fire after the document loaded, it may happen inbetween on eg. a slow connection. - nor is it guaranteed that the document has painted initially before we enter change(). This leads to the current regressions -- if we break repainting, we can't see it in the current layout tests, as the initial painting always happens after change() executed in trunk, at least on a fast machine. In order to make repaint testing reliable we have to use following scheme: <html><body onload="runRepaintTest()"><svg><rect/><script>function repaintTest() { rect.setAttribute(...); }</script></svg></body></html> runRepaintTest() is provided by the repaint.js harness and does: if (window.layoutTestController) { document.body.offsetTop; layoutTestController.display(); repaintTest(); } else { setTimeout(repaintTest, 100); } Using this harness outside of DRT allows to test SVG repainting tests in the browser as well, as the repainting changes aren't immediately fired (0ms timer) but instead delayed by 100ms, so a visual "flash" is visible, if something changes. For DRT it does two things. First it forces Document::updateLayout() to be called, and then forces the web view to paint immediately, and then it starts tracking any repaint rects, that are fired _after_ the initial painting, which are then highlighted in the pixel test dump later on. Using display() is the only way to get reliable painting results across DRT/WebKitTestRunner, and to get rid of the flakiness. All *.xml/*.html/*.htm/*.xhtml tests which excersise repainting can be moved to use runRepaintTest() from repaint.js. <body> needs to be changed to <body onload="runRepaintTest()">, and the timeouts & waitUntilDone/notifyDone calls can be removed from the tests, leading to much nicer testcases, removing lots of boilerplate. Pure *.svg tests unfortunately can't use <svg onload="runRepaintTest()"> at the moment, due timing differences between the HTML load and the SVGLoad event, that's out of scope for this bug report. To remove any hacks from the testcases themselves, I centralized following work-around in a new function in repaint.js, and let all *.svg tests use it. function runSVGRepaintTest() { if (window.layoutTestController) { layoutTestController.waitUntilDone(); setTimeout(runRepaintTest, 0); } else runRepaintTest(); } runRepaintTest() has to be called from a timer at the moment, as the SVGLoad event fires earlier as HTML load event. Before that is fixed, we have to use <svg onload="runSVGRepaintTest()"> instead of <svg onload="runRepaintTest()"> and append: layoutTestController.notifyDone() to the repaintTest() functions in the testcases. That should explain the testcase differences between pure-SVG and non-pure-SVG tests, and why I treated them differently. This approach is unfortunately as flakey as the old, so to make pure *.svg tests test repainting reliable, the bug needs to be fixed. Note that svg/custom, and svg/dynamic-updates will be fixed in another chunk, as they also require large amounts of rebaselines. * fast/repaint/resources/repaint.js: (runRepaintTest): (runSVGRepaintTest): * platform/chromium/test_expectations.txt: * platform/mac/svg/as-background-image/animated-svg-as-background-expected.png: * platform/mac/svg/as-image/animated-svg-as-image-expected.png: * platform/mac/svg/as-image/animated-svg-as-image-no-fixed-intrinsic-size-expected.png: * platform/mac/svg/as-image/animated-svg-as-image-same-image-expected.png: * platform/mac/svg/as-image/svg-image-change-content-size-expected.png: * platform/mac/svg/as-object/deep-nested-embedded-svg-size-changes-no-layout-triggers-1-expected.png: * platform/mac/svg/as-object/deep-nested-embedded-svg-size-changes-no-layout-triggers-1-expected.txt: * platform/mac/svg/as-object/deep-nested-embedded-svg-size-changes-no-layout-triggers-2-expected.png: * platform/mac/svg/as-object/deep-nested-embedded-svg-size-changes-no-layout-triggers-2-expected.txt: * platform/mac/svg/as-object/embedded-svg-immediate-offsetWidth-query-expected.png: * platform/mac/svg/as-object/embedded-svg-size-changes-expected.png: * platform/mac/svg/as-object/embedded-svg-size-changes-no-layout-triggers-expected.png: * platform/mac/svg/as-object/embedded-svg-size-changes-no-layout-triggers-expected.txt: * platform/mac/svg/as-object/nested-embedded-svg-size-changes-expected.png: * platform/mac/svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-1-expected.png: * platform/mac/svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-1-expected.txt: * platform/mac/svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-2-expected.png: * platform/mac/svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-2-expected.txt: * platform/mac/svg/carto.net/tabgroup-expected.png: * platform/mac/svg/carto.net/tabgroup-expected.txt: * platform/mac/svg/carto.net/window-expected.png: * platform/mac/svg/carto.net/window-expected.txt: * platform/mac/svg/css/shadow-changes-expected.png: * platform/mac/svg/dom/SVGPathSegList-segment-modification-expected.png: * platform/mac/svg/dom/SVGPathSegList-segment-modification-expected.txt: * platform/mac/svg/dom/SVGPathSegList-xml-dom-synchronization-expected.png: * platform/mac/svg/dom/SVGPathSegList-xml-dom-synchronization2-expected.png: * platform/mac/svg/dom/SVGRectElement/rect-modify-rx-expected.png: * platform/mac/svg/filters/filter-refresh-expected.png: * platform/mac/svg/filters/filter-width-update-expected.png: * platform/mac/svg/filters/filter-width-update-expected.txt: * platform/mac/svg/filters/invalidate-on-child-layout-expected.png: * platform/mac/svg/hixie/perf/001-expected.png: * platform/mac/svg/hixie/perf/002-expected.png: * platform/mac/svg/hixie/perf/003-expected.png: * platform/mac/svg/hixie/perf/003-expected.txt: * platform/mac/svg/hixie/perf/004-expected.png: * platform/mac/svg/hixie/perf/004-expected.txt: * platform/mac/svg/hixie/perf/005-expected.png: * platform/mac/svg/hixie/perf/005-expected.txt: * platform/mac/svg/hixie/perf/006-expected.png: * platform/mac/svg/hixie/perf/006-expected.txt: * platform/mac/svg/hixie/perf/007-expected.png: * platform/mac/svg/hixie/perf/007-expected.txt: * platform/mac/svg/repaint/filter-child-repaint-expected.png: * platform/mac/svg/repaint/image-href-change-expected.png: * platform/mac/svg/repaint/image-with-clip-path-expected.png: * platform/mac/svg/text/append-text-node-to-tspan-expected.png: * platform/mac/svg/text/modify-text-node-in-tspan-expected.png: * platform/mac/svg/text/remove-text-node-from-tspan-expected.png: * platform/mac/svg/text/remove-tspan-from-text-expected.png: * platform/mac/svg/text/text-text-05-t-expected.png: * platform/mac/svg/text/text-text-05-t-expected.txt: * platform/mac/svg/transforms/animated-path-inside-transformed-html-expected.png: * platform/mac/svg/zoom/page/absolute-sized-document-no-scrollbars-expected.png: * platform/mac/svg/zoom/page/relative-sized-document-scrollbars-expected.png: * platform/mac/svg/zoom/page/zoom-background-images-expected.txt: * platform/mac/svg/zoom/page/zoom-foreignObject-expected.png: * platform/mac/svg/zoom/page/zoom-hixie-mixed-008-expected.txt: * platform/mac/svg/zoom/page/zoom-hixie-rendering-model-004-expected.png: * platform/mac/svg/zoom/page/zoom-hixie-rendering-model-004-expected.txt: * platform/mac/svg/zoom/page/zoom-mask-with-percentages-expected.png: * platform/mac/svg/zoom/page/zoom-svg-as-background-with-relative-size-and-viewBox-expected.png: * platform/mac/svg/zoom/page/zoom-svg-as-background-with-relative-size-expected.png: * platform/mac/svg/zoom/page/zoom-svg-as-image-expected.png: * platform/mac/svg/zoom/page/zoom-svg-as-object-expected.png: * platform/mac/svg/zoom/page/zoom-svg-as-relative-image-expected.png: * 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/text/absolute-sized-document-no-scrollbars-expected.png: * platform/mac/svg/zoom/text/absolute-sized-document-scrollbars-expected.png: * platform/mac/svg/zoom/text/relative-sized-document-scrollbars-expected.png: * platform/mac/svg/zoom/text/zoom-foreignObject-expected.png: * platform/mac/svg/zoom/text/zoom-hixie-mixed-008-expected.png: * platform/mac/svg/zoom/text/zoom-hixie-mixed-008-expected.txt: * platform/mac/svg/zoom/text/zoom-hixie-mixed-009-expected.png: * platform/mac/svg/zoom/text/zoom-hixie-rendering-model-004-expected.png: * platform/mac/svg/zoom/text/zoom-hixie-rendering-model-004-expected.txt: * svg/as-background-image/animated-svg-as-background.html: * svg/as-background-image/resources/animated-rect-relative-size.svg: * svg/as-background-image/svg-as-background-5.html: * svg/as-background-image/svg-background-partial-redraw.html: * svg/as-image/animated-svg-as-image-no-fixed-intrinsic-size.html: * svg/as-image/animated-svg-as-image-same-image.html: * svg/as-image/animated-svg-as-image.html: * svg/as-image/resources/animated-rect-fixed-size-2.svg: Copied from LayoutTests/svg/as-image/resources/animated-rect-same-image.svg. * svg/as-image/resources/animated-rect-fixed-size.svg: * svg/as-image/resources/animated-rect-relative-size.svg: * svg/as-image/resources/animated-rect-same-image.svg: * svg/as-image/svg-image-change-content-size.xhtml: * svg/as-object/embedded-svg-immediate-offsetWidth-query.html: * svg/as-object/embedded-svg-size-changes-no-layout-triggers.html: * svg/as-object/embedded-svg-size-changes.html: * svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-1.html: * svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-2.html: * svg/as-object/nested-embedded-svg-size-changes.html: * svg/as-object/resources/embedded-svg-size-changes-no-layout-triggers.svg: * svg/as-object/resources/nested-embedded-svg-size-changes-target-no-layout-triggers-1.html: * svg/carto.net/tabgroup.svg: * svg/carto.net/window.svg: * svg/css/shadow-changes.svg: * svg/dom/SVGPathSegList-segment-modification.svg: * svg/dom/SVGPathSegList-xml-dom-synchronization.xhtml: * svg/dom/SVGPathSegList-xml-dom-synchronization2.xhtml: * svg/dom/SVGRectElement/rect-modify-rx.svg: * svg/filters/animate-fill-expected.png: * svg/filters/animate-fill.svg: * svg/filters/feImage-reference-invalidation-expected.png: * svg/filters/feImage-reference-invalidation.svg: * svg/filters/feImage-target-add-to-document-expected.png: * svg/filters/feImage-target-add-to-document.svg: * svg/filters/feImage-target-changes-id-expected.png: * svg/filters/feImage-target-changes-id.svg: * svg/filters/feImage-target-id-change-expected.png: * svg/filters/feImage-target-id-change.svg: * svg/filters/feImage-target-reappend-to-document-expected.png: * svg/filters/feImage-target-reappend-to-document.svg: * svg/filters/feImage-target-remove-from-document-expected.png: * svg/filters/feImage-target-remove-from-document.svg: * svg/filters/filter-refresh.svg: * svg/filters/filter-width-update.svg: * svg/filters/invalidate-on-child-layout.svg: * svg/hixie/perf/001.xml: * svg/hixie/perf/002.xml: * svg/hixie/perf/003.xml: * svg/hixie/perf/004.xml: * svg/hixie/perf/005.xml: * svg/hixie/perf/006.xml: * svg/hixie/perf/007.xml: * svg/hixie/perf/resources/smallcats.gif: Added. * svg/repaint/container-repaint-expected.png: * svg/repaint/container-repaint.svg: * svg/repaint/filter-child-repaint.svg: * svg/repaint/image-href-change.svg: * svg/repaint/image-with-clip-path.svg: * svg/text/append-text-node-to-tspan.html: * svg/text/modify-text-node-in-tspan.html: * svg/text/remove-text-node-from-tspan.html: * svg/text/remove-tspan-from-text.html: * svg/text/text-text-05-t.svg: * svg/transforms/animated-path-inside-transformed-html.xhtml: * svg/zoom/page/absolute-sized-document-no-scrollbars.svg: * svg/zoom/page/absolute-sized-document-scrollbars.svg: * svg/zoom/page/relative-sized-document-scrollbars.svg: * svg/zoom/page/zoom-background-image-tiled.html: * svg/zoom/page/zoom-background-images.html: * svg/zoom/page/zoom-coords-viewattr-01-b.svg: * svg/zoom/page/zoom-foreignObject.svg: * svg/zoom/page/zoom-getBoundingClientRect.xhtml: * svg/zoom/page/zoom-hixie-mixed-008.xml: * svg/zoom/page/zoom-hixie-mixed-009.xml: * svg/zoom/page/zoom-hixie-rendering-model-004.xhtml: * svg/zoom/page/zoom-img-preserveAspectRatio-support-1.html: * svg/zoom/page/zoom-mask-with-percentages.svg: * svg/zoom/page/zoom-replaced-intrinsic-ratio-001.htm: * svg/zoom/page/zoom-svg-as-background-with-relative-size-and-viewBox.html: * svg/zoom/page/zoom-svg-as-background-with-relative-size.html: * svg/zoom/page/zoom-svg-as-image.html: * svg/zoom/page/zoom-svg-as-object.html: * svg/zoom/page/zoom-svg-as-relative-image.html: * svg/zoom/page/zoom-svg-float-border-padding.xml: * svg/zoom/page/zoom-svg-through-object-with-absolute-size-2.xhtml: * svg/zoom/page/zoom-svg-through-object-with-absolute-size.xhtml: * svg/zoom/page/zoom-svg-through-object-with-auto-size.html: * svg/zoom/page/zoom-svg-through-object-with-huge-size.xhtml: * svg/zoom/page/zoom-svg-through-object-with-override-size.html: * svg/zoom/page/zoom-svg-through-object-with-percentage-size.xhtml: * svg/zoom/page/zoom-svg-through-object-with-text.xhtml-disabled: * svg/zoom/page/zoom-zoom-coords.xhtml: * svg/zoom/resources/testPageZoom.js: (repaintTest): * svg/zoom/resources/testTextZoom.js: (repaintTest): * svg/zoom/text/absolute-sized-document-no-scrollbars.svg: * svg/zoom/text/absolute-sized-document-scrollbars.svg: * svg/zoom/text/relative-sized-document-scrollbars.svg: * svg/zoom/text/zoom-coords-viewattr-01-b.svg: * svg/zoom/text/zoom-foreignObject.svg: * svg/zoom/text/zoom-hixie-mixed-008.xml: * svg/zoom/text/zoom-hixie-mixed-009.xml: * svg/zoom/text/zoom-hixie-rendering-model-004.xhtml: * svg/zoom/text/zoom-svg-float-border-padding.xml: Canonical link: https://commits.webkit.org/94836@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@106918 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-02-07 11:19:19 +00:00
var object1 = document.getElementsByTagName("object")[0];
object1.setAttribute("data", "resources/nested-embedded-svg-size-changes-target-no-layout-triggers-2.html");
object1.setAttribute("style", "border: 1px red solid; width: 400px; height: 200px");
}
2011-08-06 Nikolas Zimmermann <nzimmermann@rim.com> REGRESSION(87526): ASSERT(!needsLayout()) followed by graphical glitches on google charts (svg loaded in iframe) https://bugs.webkit.org/show_bug.cgi?id=64974 svg/zoom/page/zoom-svg-through-object-with-*.xhtml are flaky https://bugs.webkit.org/show_bug.cgi?id=63186 Reviewed by Zoltan Herczeg. Rollout r89484, which disabled some svg/zoom/page tests, to see whether the flakiness is gone now. Add several new tests in svg/as-object - covering bug 64974. * platform/mac/svg/as-object/deep-nested-embedded-svg-size-changes-no-layout-triggers-1-expected.png: Added. * platform/mac/svg/as-object/deep-nested-embedded-svg-size-changes-no-layout-triggers-1-expected.txt: Added. * platform/mac/svg/as-object/deep-nested-embedded-svg-size-changes-no-layout-triggers-2-expected.png: Added. * platform/mac/svg/as-object/deep-nested-embedded-svg-size-changes-no-layout-triggers-2-expected.txt: Added. * platform/mac/svg/as-object/embedded-svg-immediate-offsetWidth-query-expected.png: Added. * platform/mac/svg/as-object/embedded-svg-size-changes-expected.png: Added. * platform/mac/svg/as-object/embedded-svg-size-changes-no-layout-triggers-expected.png: Added. * platform/mac/svg/as-object/embedded-svg-size-changes-no-layout-triggers-expected.txt: Added. * platform/mac/svg/as-object/nested-embedded-svg-size-changes-expected.png: Added. * platform/mac/svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-1-expected.png: Added. * platform/mac/svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-1-expected.txt: Added. * platform/mac/svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-2-expected.png: Added. * platform/mac/svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-2-expected.txt: Added. * svg/as-object/deep-nested-embedded-svg-size-changes-no-layout-triggers-1.html: Added. * svg/as-object/deep-nested-embedded-svg-size-changes-no-layout-triggers-2.html: Added. * svg/as-object/embedded-svg-immediate-offsetWidth-query-expected.txt: Added. * svg/as-object/embedded-svg-immediate-offsetWidth-query.html: Added. * svg/as-object/embedded-svg-size-changes-expected.txt: Added. * svg/as-object/embedded-svg-size-changes-no-layout-triggers.html: Added. * svg/as-object/embedded-svg-size-changes.html: Added. * svg/as-object/nested-embedded-svg-size-changes-expected.txt: Added. * svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-1.html: Added. * svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-2.html: Added. * svg/as-object/nested-embedded-svg-size-changes.html: Added. * svg/as-object/resources: Added. * svg/as-object/resources/embedded-svg-size-changes-no-layout-triggers.svg: Added. * svg/as-object/resources/embedded-svg-size-changes.svg: Added. * svg/as-object/resources/nested-embedded-svg-size-changes-target-no-layout-triggers-1.html: Added. * svg/as-object/resources/nested-embedded-svg-size-changes-target-no-layout-triggers-2.html: Added. * svg/as-object/resources/nested-embedded-svg-size-changes-target.html: Added. * svg/zoom/page/zoom-svg-through-object-with-absolute-size-2.xhtml: Copied from LayoutTests/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2.xhtml-disabled. * svg/zoom/page/zoom-svg-through-object-with-absolute-size-2.xhtml-disabled: Removed. * svg/zoom/page/zoom-svg-through-object-with-absolute-size.xhtml: Copied from LayoutTests/svg/zoom/page/zoom-svg-through-object-with-absolute-size.xhtml-disabled. * svg/zoom/page/zoom-svg-through-object-with-absolute-size.xhtml-disabled: Removed. * svg/zoom/page/zoom-svg-through-object-with-auto-size.html: Copied from LayoutTests/svg/zoom/page/zoom-svg-through-object-with-auto-size.html-disabled. * svg/zoom/page/zoom-svg-through-object-with-auto-size.html-disabled: Removed. * svg/zoom/page/zoom-svg-through-object-with-huge-size.xhtml: Copied from LayoutTests/svg/zoom/page/zoom-svg-through-object-with-huge-size.xhtml-disabled. * svg/zoom/page/zoom-svg-through-object-with-huge-size.xhtml-disabled: Removed. * svg/zoom/page/zoom-svg-through-object-with-override-size.html: Copied from LayoutTests/svg/zoom/page/zoom-svg-through-object-with-override-size.html-disabled. * svg/zoom/page/zoom-svg-through-object-with-override-size.html-disabled: Removed. * svg/zoom/page/zoom-svg-through-object-with-percentage-size.xhtml: Copied from LayoutTests/svg/zoom/page/zoom-svg-through-object-with-percentage-size.xhtml-disabled. * svg/zoom/page/zoom-svg-through-object-with-percentage-size.xhtml-disabled: Removed. 2011-08-06 Nikolas Zimmermann <nzimmermann@rim.com> REGRESSION(87526): ASSERT(!needsLayout()) followed by graphical glitches on google charts (svg loaded in iframe) https://bugs.webkit.org/show_bug.cgi?id=64974 svg/zoom/page/zoom-svg-through-object-with-*.xhtml are flaky https://bugs.webkit.org/show_bug.cgi?id=63186 Reviewed by Zoltan Herczeg. Fix host <-> embedded document size negotiation race. The currently implemented solution relied on a specific order of paint/layout calls, which is broken. Consider rendering a document containing an object/iframe/embed referencing an external SVG file. When FrameView::layout() is called (associated with the outermost RenderView of the host document), it lays out the whole document, and afterwards performPostLayoutTasks() is called. This method then asks the Frames contentRenderer to update its widget positions. This triggers a call of the embedded documents FrameView::layout() method, which now lays out the embedded SVG documents tree through RenderSVGRoot::layout. And here's the bug: The size of the object/iframe replaced element, which hosts the embedded document may depend on the intrinsic size of the SVG. We tried to mark the embedded documents _ownerRenderer_ (the RenderPart) as "needs layout and pref width recalc" right from RenderSVGRoot::layout() and hoped that this would cause the whole document to be laid out again, now that the size of the embedded SVG document is known. As soon as the SVG document is laid out, the host document will be painted (flush deferred repaints) and an assertion ASSERTS(!needsLayout()) will be fired, as we modified the setNeedsLayout() state after the host document layout finished, right before painting. A proper fix is to only keep track in RenderSVGRoot whether it needs to negotiate the size with the host document, but not modify the layout state of the host document in any way. Let FrameView handle the size negotiation right in FrameView::layout(). Consider following document: <body><iframe src="some.svg"></body> After initial loading & parsing of the document, a FrameView exists for the main frame, and a sub-FrameView for the <iframe>. The external SVG document, may not be loaded yet at this point. That means when RenderIFrame::layout() tries to figure out its size (computeLogicalWidth/Height) - the RenderSVGRoot renderer of the external document hasn't been created yet (as the external document hasn't received data yet) - so it falls back to eg. 300x150 CSS default size (in the simplest case, where width/height are both auto). Suppose the external document now finished loading, the RenderSVGRoot is created and a global relayout is triggered starting from the main FrameView. As we already laid out the document once, needsLayout() is false for the main FrameView, so _only_ the child frame view that contains the RenderSVGRoot is now laid out, for the first time. After layout is done, the SVG document is fully laid out, though the RenderPart which embedded the SVG does NOT notice the SVG has been laid out, so it still carries the default 300x150 size (and needsLayout=false!). The fix is to retrigger layout of the parent frame view by marking the owner renderer of the frame view as "needs layout and pref widths recalc" and immediatiely performing a synchronous update of the layout. It's important to do it sync, as scripts depend on the result of the size negotiation (covered extensively with the new tests in svg/as-object). Reenable svg/zoom/page/zoom-svg-through-object* tests to see whether the flakiness is gone. Tests: svg/as-object/deep-nested-embedded-svg-size-changes-no-layout-triggers-1.html svg/as-object/deep-nested-embedded-svg-size-changes-no-layout-triggers-2.html svg/as-object/embedded-svg-immediate-offsetWidth-query.html svg/as-object/embedded-svg-size-changes-no-layout-triggers.html svg/as-object/embedded-svg-size-changes.html svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-1.html svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-2.html svg/as-object/nested-embedded-svg-size-changes.html svg/zoom/page/zoom-svg-through-object-with-absolute-size-2.xhtml svg/zoom/page/zoom-svg-through-object-with-absolute-size.xhtml svg/zoom/page/zoom-svg-through-object-with-auto-size.html svg/zoom/page/zoom-svg-through-object-with-huge-size.xhtml svg/zoom/page/zoom-svg-through-object-with-override-size.html svg/zoom/page/zoom-svg-through-object-with-percentage-size.xhtml * page/FrameView.cpp: (WebCore::FrameView::layout): Call forceLayoutParentViewIfNeeded() after layout finished. (WebCore::FrameView::forceLayoutParentViewIfNeeded): Added helper method. (WebCore::FrameView::embeddedContentBox): Moved from RenderPart to a more central place. * page/FrameView.h: * rendering/RenderPart.cpp: (WebCore::RenderPart::embeddedContentBox): Moved to FrameView. * rendering/svg/RenderSVGRoot.cpp: Rename m_didNegotiateSize to m_needsSizeNegotiationWithHostDocument. (WebCore::RenderSVGRoot::RenderSVGRoot): (WebCore::RenderSVGRoot::layout): Only figure out if we need neggotiation, don't actually do anything, let FrameView handle this. * rendering/svg/RenderSVGRoot.h: Remove incorrect negotiateSizeWithHostDocumentIfNeeded() logic. (WebCore::RenderSVGRoot::needsSizeNegotiationWithHostDocument): Added getter for m_needsSizeNegotiationWithHostDocument. (WebCore::RenderSVGRoot::scheduledSizeNegotiationWithHostDocument): Added safe way to clear m_needsSizeNegotiationWithHostDocument (asserts if it was false before). Canonical link: https://commits.webkit.org/81640@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@92545 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-08-06 08:25:44 +00:00
</script>
Rewrite SVG tests to make extensive use of display() in repaint tests https://bugs.webkit.org/show_bug.cgi?id=77736 Reviewed by Andreas Kling. Convert all tests in svg/ (except svg/custom & svg/dynamic-updates) that exercise repainting to use the fast/repaint/resources/repaint.js harness, which forces a layout, and calls layoutTestController.display() before executing the actual repaint test, so that repaint rectangles are properly tracked and shown (white areas that are redrawn, on top of the gray background, painted over the web view after the initial painting). Previously SVG tests used to work like this: (using an HTML example, but it doesn't matter) <html><body><svg><rect/><script>function change() { rect.setAttribute(...); layoutTestController.notifyDone(); } setTimeout(change, 0); </script></svg></body></html> We expected that the initial painting was done, before change() as called. This is unreliable for various reasons: - the timeout is not guaranteed to fire after the document loaded, it may happen inbetween on eg. a slow connection. - nor is it guaranteed that the document has painted initially before we enter change(). This leads to the current regressions -- if we break repainting, we can't see it in the current layout tests, as the initial painting always happens after change() executed in trunk, at least on a fast machine. In order to make repaint testing reliable we have to use following scheme: <html><body onload="runRepaintTest()"><svg><rect/><script>function repaintTest() { rect.setAttribute(...); }</script></svg></body></html> runRepaintTest() is provided by the repaint.js harness and does: if (window.layoutTestController) { document.body.offsetTop; layoutTestController.display(); repaintTest(); } else { setTimeout(repaintTest, 100); } Using this harness outside of DRT allows to test SVG repainting tests in the browser as well, as the repainting changes aren't immediately fired (0ms timer) but instead delayed by 100ms, so a visual "flash" is visible, if something changes. For DRT it does two things. First it forces Document::updateLayout() to be called, and then forces the web view to paint immediately, and then it starts tracking any repaint rects, that are fired _after_ the initial painting, which are then highlighted in the pixel test dump later on. Using display() is the only way to get reliable painting results across DRT/WebKitTestRunner, and to get rid of the flakiness. All *.xml/*.html/*.htm/*.xhtml tests which excersise repainting can be moved to use runRepaintTest() from repaint.js. <body> needs to be changed to <body onload="runRepaintTest()">, and the timeouts & waitUntilDone/notifyDone calls can be removed from the tests, leading to much nicer testcases, removing lots of boilerplate. Pure *.svg tests unfortunately can't use <svg onload="runRepaintTest()"> at the moment, due timing differences between the HTML load and the SVGLoad event, that's out of scope for this bug report. To remove any hacks from the testcases themselves, I centralized following work-around in a new function in repaint.js, and let all *.svg tests use it. function runSVGRepaintTest() { if (window.layoutTestController) { layoutTestController.waitUntilDone(); setTimeout(runRepaintTest, 0); } else runRepaintTest(); } runRepaintTest() has to be called from a timer at the moment, as the SVGLoad event fires earlier as HTML load event. Before that is fixed, we have to use <svg onload="runSVGRepaintTest()"> instead of <svg onload="runRepaintTest()"> and append: layoutTestController.notifyDone() to the repaintTest() functions in the testcases. That should explain the testcase differences between pure-SVG and non-pure-SVG tests, and why I treated them differently. This approach is unfortunately as flakey as the old, so to make pure *.svg tests test repainting reliable, the bug needs to be fixed. Note that svg/custom, and svg/dynamic-updates will be fixed in another chunk, as they also require large amounts of rebaselines. * fast/repaint/resources/repaint.js: (runRepaintTest): (runSVGRepaintTest): * platform/chromium/test_expectations.txt: * platform/mac/svg/as-background-image/animated-svg-as-background-expected.png: * platform/mac/svg/as-image/animated-svg-as-image-expected.png: * platform/mac/svg/as-image/animated-svg-as-image-no-fixed-intrinsic-size-expected.png: * platform/mac/svg/as-image/animated-svg-as-image-same-image-expected.png: * platform/mac/svg/as-image/svg-image-change-content-size-expected.png: * platform/mac/svg/as-object/deep-nested-embedded-svg-size-changes-no-layout-triggers-1-expected.png: * platform/mac/svg/as-object/deep-nested-embedded-svg-size-changes-no-layout-triggers-1-expected.txt: * platform/mac/svg/as-object/deep-nested-embedded-svg-size-changes-no-layout-triggers-2-expected.png: * platform/mac/svg/as-object/deep-nested-embedded-svg-size-changes-no-layout-triggers-2-expected.txt: * platform/mac/svg/as-object/embedded-svg-immediate-offsetWidth-query-expected.png: * platform/mac/svg/as-object/embedded-svg-size-changes-expected.png: * platform/mac/svg/as-object/embedded-svg-size-changes-no-layout-triggers-expected.png: * platform/mac/svg/as-object/embedded-svg-size-changes-no-layout-triggers-expected.txt: * platform/mac/svg/as-object/nested-embedded-svg-size-changes-expected.png: * platform/mac/svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-1-expected.png: * platform/mac/svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-1-expected.txt: * platform/mac/svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-2-expected.png: * platform/mac/svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-2-expected.txt: * platform/mac/svg/carto.net/tabgroup-expected.png: * platform/mac/svg/carto.net/tabgroup-expected.txt: * platform/mac/svg/carto.net/window-expected.png: * platform/mac/svg/carto.net/window-expected.txt: * platform/mac/svg/css/shadow-changes-expected.png: * platform/mac/svg/dom/SVGPathSegList-segment-modification-expected.png: * platform/mac/svg/dom/SVGPathSegList-segment-modification-expected.txt: * platform/mac/svg/dom/SVGPathSegList-xml-dom-synchronization-expected.png: * platform/mac/svg/dom/SVGPathSegList-xml-dom-synchronization2-expected.png: * platform/mac/svg/dom/SVGRectElement/rect-modify-rx-expected.png: * platform/mac/svg/filters/filter-refresh-expected.png: * platform/mac/svg/filters/filter-width-update-expected.png: * platform/mac/svg/filters/filter-width-update-expected.txt: * platform/mac/svg/filters/invalidate-on-child-layout-expected.png: * platform/mac/svg/hixie/perf/001-expected.png: * platform/mac/svg/hixie/perf/002-expected.png: * platform/mac/svg/hixie/perf/003-expected.png: * platform/mac/svg/hixie/perf/003-expected.txt: * platform/mac/svg/hixie/perf/004-expected.png: * platform/mac/svg/hixie/perf/004-expected.txt: * platform/mac/svg/hixie/perf/005-expected.png: * platform/mac/svg/hixie/perf/005-expected.txt: * platform/mac/svg/hixie/perf/006-expected.png: * platform/mac/svg/hixie/perf/006-expected.txt: * platform/mac/svg/hixie/perf/007-expected.png: * platform/mac/svg/hixie/perf/007-expected.txt: * platform/mac/svg/repaint/filter-child-repaint-expected.png: * platform/mac/svg/repaint/image-href-change-expected.png: * platform/mac/svg/repaint/image-with-clip-path-expected.png: * platform/mac/svg/text/append-text-node-to-tspan-expected.png: * platform/mac/svg/text/modify-text-node-in-tspan-expected.png: * platform/mac/svg/text/remove-text-node-from-tspan-expected.png: * platform/mac/svg/text/remove-tspan-from-text-expected.png: * platform/mac/svg/text/text-text-05-t-expected.png: * platform/mac/svg/text/text-text-05-t-expected.txt: * platform/mac/svg/transforms/animated-path-inside-transformed-html-expected.png: * platform/mac/svg/zoom/page/absolute-sized-document-no-scrollbars-expected.png: * platform/mac/svg/zoom/page/relative-sized-document-scrollbars-expected.png: * platform/mac/svg/zoom/page/zoom-background-images-expected.txt: * platform/mac/svg/zoom/page/zoom-foreignObject-expected.png: * platform/mac/svg/zoom/page/zoom-hixie-mixed-008-expected.txt: * platform/mac/svg/zoom/page/zoom-hixie-rendering-model-004-expected.png: * platform/mac/svg/zoom/page/zoom-hixie-rendering-model-004-expected.txt: * platform/mac/svg/zoom/page/zoom-mask-with-percentages-expected.png: * platform/mac/svg/zoom/page/zoom-svg-as-background-with-relative-size-and-viewBox-expected.png: * platform/mac/svg/zoom/page/zoom-svg-as-background-with-relative-size-expected.png: * platform/mac/svg/zoom/page/zoom-svg-as-image-expected.png: * platform/mac/svg/zoom/page/zoom-svg-as-object-expected.png: * platform/mac/svg/zoom/page/zoom-svg-as-relative-image-expected.png: * 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/text/absolute-sized-document-no-scrollbars-expected.png: * platform/mac/svg/zoom/text/absolute-sized-document-scrollbars-expected.png: * platform/mac/svg/zoom/text/relative-sized-document-scrollbars-expected.png: * platform/mac/svg/zoom/text/zoom-foreignObject-expected.png: * platform/mac/svg/zoom/text/zoom-hixie-mixed-008-expected.png: * platform/mac/svg/zoom/text/zoom-hixie-mixed-008-expected.txt: * platform/mac/svg/zoom/text/zoom-hixie-mixed-009-expected.png: * platform/mac/svg/zoom/text/zoom-hixie-rendering-model-004-expected.png: * platform/mac/svg/zoom/text/zoom-hixie-rendering-model-004-expected.txt: * svg/as-background-image/animated-svg-as-background.html: * svg/as-background-image/resources/animated-rect-relative-size.svg: * svg/as-background-image/svg-as-background-5.html: * svg/as-background-image/svg-background-partial-redraw.html: * svg/as-image/animated-svg-as-image-no-fixed-intrinsic-size.html: * svg/as-image/animated-svg-as-image-same-image.html: * svg/as-image/animated-svg-as-image.html: * svg/as-image/resources/animated-rect-fixed-size-2.svg: Copied from LayoutTests/svg/as-image/resources/animated-rect-same-image.svg. * svg/as-image/resources/animated-rect-fixed-size.svg: * svg/as-image/resources/animated-rect-relative-size.svg: * svg/as-image/resources/animated-rect-same-image.svg: * svg/as-image/svg-image-change-content-size.xhtml: * svg/as-object/embedded-svg-immediate-offsetWidth-query.html: * svg/as-object/embedded-svg-size-changes-no-layout-triggers.html: * svg/as-object/embedded-svg-size-changes.html: * svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-1.html: * svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-2.html: * svg/as-object/nested-embedded-svg-size-changes.html: * svg/as-object/resources/embedded-svg-size-changes-no-layout-triggers.svg: * svg/as-object/resources/nested-embedded-svg-size-changes-target-no-layout-triggers-1.html: * svg/carto.net/tabgroup.svg: * svg/carto.net/window.svg: * svg/css/shadow-changes.svg: * svg/dom/SVGPathSegList-segment-modification.svg: * svg/dom/SVGPathSegList-xml-dom-synchronization.xhtml: * svg/dom/SVGPathSegList-xml-dom-synchronization2.xhtml: * svg/dom/SVGRectElement/rect-modify-rx.svg: * svg/filters/animate-fill-expected.png: * svg/filters/animate-fill.svg: * svg/filters/feImage-reference-invalidation-expected.png: * svg/filters/feImage-reference-invalidation.svg: * svg/filters/feImage-target-add-to-document-expected.png: * svg/filters/feImage-target-add-to-document.svg: * svg/filters/feImage-target-changes-id-expected.png: * svg/filters/feImage-target-changes-id.svg: * svg/filters/feImage-target-id-change-expected.png: * svg/filters/feImage-target-id-change.svg: * svg/filters/feImage-target-reappend-to-document-expected.png: * svg/filters/feImage-target-reappend-to-document.svg: * svg/filters/feImage-target-remove-from-document-expected.png: * svg/filters/feImage-target-remove-from-document.svg: * svg/filters/filter-refresh.svg: * svg/filters/filter-width-update.svg: * svg/filters/invalidate-on-child-layout.svg: * svg/hixie/perf/001.xml: * svg/hixie/perf/002.xml: * svg/hixie/perf/003.xml: * svg/hixie/perf/004.xml: * svg/hixie/perf/005.xml: * svg/hixie/perf/006.xml: * svg/hixie/perf/007.xml: * svg/hixie/perf/resources/smallcats.gif: Added. * svg/repaint/container-repaint-expected.png: * svg/repaint/container-repaint.svg: * svg/repaint/filter-child-repaint.svg: * svg/repaint/image-href-change.svg: * svg/repaint/image-with-clip-path.svg: * svg/text/append-text-node-to-tspan.html: * svg/text/modify-text-node-in-tspan.html: * svg/text/remove-text-node-from-tspan.html: * svg/text/remove-tspan-from-text.html: * svg/text/text-text-05-t.svg: * svg/transforms/animated-path-inside-transformed-html.xhtml: * svg/zoom/page/absolute-sized-document-no-scrollbars.svg: * svg/zoom/page/absolute-sized-document-scrollbars.svg: * svg/zoom/page/relative-sized-document-scrollbars.svg: * svg/zoom/page/zoom-background-image-tiled.html: * svg/zoom/page/zoom-background-images.html: * svg/zoom/page/zoom-coords-viewattr-01-b.svg: * svg/zoom/page/zoom-foreignObject.svg: * svg/zoom/page/zoom-getBoundingClientRect.xhtml: * svg/zoom/page/zoom-hixie-mixed-008.xml: * svg/zoom/page/zoom-hixie-mixed-009.xml: * svg/zoom/page/zoom-hixie-rendering-model-004.xhtml: * svg/zoom/page/zoom-img-preserveAspectRatio-support-1.html: * svg/zoom/page/zoom-mask-with-percentages.svg: * svg/zoom/page/zoom-replaced-intrinsic-ratio-001.htm: * svg/zoom/page/zoom-svg-as-background-with-relative-size-and-viewBox.html: * svg/zoom/page/zoom-svg-as-background-with-relative-size.html: * svg/zoom/page/zoom-svg-as-image.html: * svg/zoom/page/zoom-svg-as-object.html: * svg/zoom/page/zoom-svg-as-relative-image.html: * svg/zoom/page/zoom-svg-float-border-padding.xml: * svg/zoom/page/zoom-svg-through-object-with-absolute-size-2.xhtml: * svg/zoom/page/zoom-svg-through-object-with-absolute-size.xhtml: * svg/zoom/page/zoom-svg-through-object-with-auto-size.html: * svg/zoom/page/zoom-svg-through-object-with-huge-size.xhtml: * svg/zoom/page/zoom-svg-through-object-with-override-size.html: * svg/zoom/page/zoom-svg-through-object-with-percentage-size.xhtml: * svg/zoom/page/zoom-svg-through-object-with-text.xhtml-disabled: * svg/zoom/page/zoom-zoom-coords.xhtml: * svg/zoom/resources/testPageZoom.js: (repaintTest): * svg/zoom/resources/testTextZoom.js: (repaintTest): * svg/zoom/text/absolute-sized-document-no-scrollbars.svg: * svg/zoom/text/absolute-sized-document-scrollbars.svg: * svg/zoom/text/relative-sized-document-scrollbars.svg: * svg/zoom/text/zoom-coords-viewattr-01-b.svg: * svg/zoom/text/zoom-foreignObject.svg: * svg/zoom/text/zoom-hixie-mixed-008.xml: * svg/zoom/text/zoom-hixie-mixed-009.xml: * svg/zoom/text/zoom-hixie-rendering-model-004.xhtml: * svg/zoom/text/zoom-svg-float-border-padding.xml: Canonical link: https://commits.webkit.org/94836@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@106918 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-02-07 11:19:19 +00:00
</head>
<body onload="runRepaintTest()" style="margin: 0px">
<!-- This test is the same as nested-embedded-svg-size-changes.html but doesn't do any query of the computed style to avoid triggering any layouts -->
<object></object>
2011-08-06 Nikolas Zimmermann <nzimmermann@rim.com> REGRESSION(87526): ASSERT(!needsLayout()) followed by graphical glitches on google charts (svg loaded in iframe) https://bugs.webkit.org/show_bug.cgi?id=64974 svg/zoom/page/zoom-svg-through-object-with-*.xhtml are flaky https://bugs.webkit.org/show_bug.cgi?id=63186 Reviewed by Zoltan Herczeg. Rollout r89484, which disabled some svg/zoom/page tests, to see whether the flakiness is gone now. Add several new tests in svg/as-object - covering bug 64974. * platform/mac/svg/as-object/deep-nested-embedded-svg-size-changes-no-layout-triggers-1-expected.png: Added. * platform/mac/svg/as-object/deep-nested-embedded-svg-size-changes-no-layout-triggers-1-expected.txt: Added. * platform/mac/svg/as-object/deep-nested-embedded-svg-size-changes-no-layout-triggers-2-expected.png: Added. * platform/mac/svg/as-object/deep-nested-embedded-svg-size-changes-no-layout-triggers-2-expected.txt: Added. * platform/mac/svg/as-object/embedded-svg-immediate-offsetWidth-query-expected.png: Added. * platform/mac/svg/as-object/embedded-svg-size-changes-expected.png: Added. * platform/mac/svg/as-object/embedded-svg-size-changes-no-layout-triggers-expected.png: Added. * platform/mac/svg/as-object/embedded-svg-size-changes-no-layout-triggers-expected.txt: Added. * platform/mac/svg/as-object/nested-embedded-svg-size-changes-expected.png: Added. * platform/mac/svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-1-expected.png: Added. * platform/mac/svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-1-expected.txt: Added. * platform/mac/svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-2-expected.png: Added. * platform/mac/svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-2-expected.txt: Added. * svg/as-object/deep-nested-embedded-svg-size-changes-no-layout-triggers-1.html: Added. * svg/as-object/deep-nested-embedded-svg-size-changes-no-layout-triggers-2.html: Added. * svg/as-object/embedded-svg-immediate-offsetWidth-query-expected.txt: Added. * svg/as-object/embedded-svg-immediate-offsetWidth-query.html: Added. * svg/as-object/embedded-svg-size-changes-expected.txt: Added. * svg/as-object/embedded-svg-size-changes-no-layout-triggers.html: Added. * svg/as-object/embedded-svg-size-changes.html: Added. * svg/as-object/nested-embedded-svg-size-changes-expected.txt: Added. * svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-1.html: Added. * svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-2.html: Added. * svg/as-object/nested-embedded-svg-size-changes.html: Added. * svg/as-object/resources: Added. * svg/as-object/resources/embedded-svg-size-changes-no-layout-triggers.svg: Added. * svg/as-object/resources/embedded-svg-size-changes.svg: Added. * svg/as-object/resources/nested-embedded-svg-size-changes-target-no-layout-triggers-1.html: Added. * svg/as-object/resources/nested-embedded-svg-size-changes-target-no-layout-triggers-2.html: Added. * svg/as-object/resources/nested-embedded-svg-size-changes-target.html: Added. * svg/zoom/page/zoom-svg-through-object-with-absolute-size-2.xhtml: Copied from LayoutTests/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2.xhtml-disabled. * svg/zoom/page/zoom-svg-through-object-with-absolute-size-2.xhtml-disabled: Removed. * svg/zoom/page/zoom-svg-through-object-with-absolute-size.xhtml: Copied from LayoutTests/svg/zoom/page/zoom-svg-through-object-with-absolute-size.xhtml-disabled. * svg/zoom/page/zoom-svg-through-object-with-absolute-size.xhtml-disabled: Removed. * svg/zoom/page/zoom-svg-through-object-with-auto-size.html: Copied from LayoutTests/svg/zoom/page/zoom-svg-through-object-with-auto-size.html-disabled. * svg/zoom/page/zoom-svg-through-object-with-auto-size.html-disabled: Removed. * svg/zoom/page/zoom-svg-through-object-with-huge-size.xhtml: Copied from LayoutTests/svg/zoom/page/zoom-svg-through-object-with-huge-size.xhtml-disabled. * svg/zoom/page/zoom-svg-through-object-with-huge-size.xhtml-disabled: Removed. * svg/zoom/page/zoom-svg-through-object-with-override-size.html: Copied from LayoutTests/svg/zoom/page/zoom-svg-through-object-with-override-size.html-disabled. * svg/zoom/page/zoom-svg-through-object-with-override-size.html-disabled: Removed. * svg/zoom/page/zoom-svg-through-object-with-percentage-size.xhtml: Copied from LayoutTests/svg/zoom/page/zoom-svg-through-object-with-percentage-size.xhtml-disabled. * svg/zoom/page/zoom-svg-through-object-with-percentage-size.xhtml-disabled: Removed. 2011-08-06 Nikolas Zimmermann <nzimmermann@rim.com> REGRESSION(87526): ASSERT(!needsLayout()) followed by graphical glitches on google charts (svg loaded in iframe) https://bugs.webkit.org/show_bug.cgi?id=64974 svg/zoom/page/zoom-svg-through-object-with-*.xhtml are flaky https://bugs.webkit.org/show_bug.cgi?id=63186 Reviewed by Zoltan Herczeg. Fix host <-> embedded document size negotiation race. The currently implemented solution relied on a specific order of paint/layout calls, which is broken. Consider rendering a document containing an object/iframe/embed referencing an external SVG file. When FrameView::layout() is called (associated with the outermost RenderView of the host document), it lays out the whole document, and afterwards performPostLayoutTasks() is called. This method then asks the Frames contentRenderer to update its widget positions. This triggers a call of the embedded documents FrameView::layout() method, which now lays out the embedded SVG documents tree through RenderSVGRoot::layout. And here's the bug: The size of the object/iframe replaced element, which hosts the embedded document may depend on the intrinsic size of the SVG. We tried to mark the embedded documents _ownerRenderer_ (the RenderPart) as "needs layout and pref width recalc" right from RenderSVGRoot::layout() and hoped that this would cause the whole document to be laid out again, now that the size of the embedded SVG document is known. As soon as the SVG document is laid out, the host document will be painted (flush deferred repaints) and an assertion ASSERTS(!needsLayout()) will be fired, as we modified the setNeedsLayout() state after the host document layout finished, right before painting. A proper fix is to only keep track in RenderSVGRoot whether it needs to negotiate the size with the host document, but not modify the layout state of the host document in any way. Let FrameView handle the size negotiation right in FrameView::layout(). Consider following document: <body><iframe src="some.svg"></body> After initial loading & parsing of the document, a FrameView exists for the main frame, and a sub-FrameView for the <iframe>. The external SVG document, may not be loaded yet at this point. That means when RenderIFrame::layout() tries to figure out its size (computeLogicalWidth/Height) - the RenderSVGRoot renderer of the external document hasn't been created yet (as the external document hasn't received data yet) - so it falls back to eg. 300x150 CSS default size (in the simplest case, where width/height are both auto). Suppose the external document now finished loading, the RenderSVGRoot is created and a global relayout is triggered starting from the main FrameView. As we already laid out the document once, needsLayout() is false for the main FrameView, so _only_ the child frame view that contains the RenderSVGRoot is now laid out, for the first time. After layout is done, the SVG document is fully laid out, though the RenderPart which embedded the SVG does NOT notice the SVG has been laid out, so it still carries the default 300x150 size (and needsLayout=false!). The fix is to retrigger layout of the parent frame view by marking the owner renderer of the frame view as "needs layout and pref widths recalc" and immediatiely performing a synchronous update of the layout. It's important to do it sync, as scripts depend on the result of the size negotiation (covered extensively with the new tests in svg/as-object). Reenable svg/zoom/page/zoom-svg-through-object* tests to see whether the flakiness is gone. Tests: svg/as-object/deep-nested-embedded-svg-size-changes-no-layout-triggers-1.html svg/as-object/deep-nested-embedded-svg-size-changes-no-layout-triggers-2.html svg/as-object/embedded-svg-immediate-offsetWidth-query.html svg/as-object/embedded-svg-size-changes-no-layout-triggers.html svg/as-object/embedded-svg-size-changes.html svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-1.html svg/as-object/nested-embedded-svg-size-changes-no-layout-triggers-2.html svg/as-object/nested-embedded-svg-size-changes.html svg/zoom/page/zoom-svg-through-object-with-absolute-size-2.xhtml svg/zoom/page/zoom-svg-through-object-with-absolute-size.xhtml svg/zoom/page/zoom-svg-through-object-with-auto-size.html svg/zoom/page/zoom-svg-through-object-with-huge-size.xhtml svg/zoom/page/zoom-svg-through-object-with-override-size.html svg/zoom/page/zoom-svg-through-object-with-percentage-size.xhtml * page/FrameView.cpp: (WebCore::FrameView::layout): Call forceLayoutParentViewIfNeeded() after layout finished. (WebCore::FrameView::forceLayoutParentViewIfNeeded): Added helper method. (WebCore::FrameView::embeddedContentBox): Moved from RenderPart to a more central place. * page/FrameView.h: * rendering/RenderPart.cpp: (WebCore::RenderPart::embeddedContentBox): Moved to FrameView. * rendering/svg/RenderSVGRoot.cpp: Rename m_didNegotiateSize to m_needsSizeNegotiationWithHostDocument. (WebCore::RenderSVGRoot::RenderSVGRoot): (WebCore::RenderSVGRoot::layout): Only figure out if we need neggotiation, don't actually do anything, let FrameView handle this. * rendering/svg/RenderSVGRoot.h: Remove incorrect negotiateSizeWithHostDocumentIfNeeded() logic. (WebCore::RenderSVGRoot::needsSizeNegotiationWithHostDocument): Added getter for m_needsSizeNegotiationWithHostDocument. (WebCore::RenderSVGRoot::scheduledSizeNegotiationWithHostDocument): Added safe way to clear m_needsSizeNegotiationWithHostDocument (asserts if it was false before). Canonical link: https://commits.webkit.org/81640@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@92545 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-08-06 08:25:44 +00:00
</body>
</html>