haikuwebkit/LayoutTests/svg/overflow/overflow-on-outermost-svg-e...

16 lines
789 B
XML
Raw Permalink Normal View History

2010-02-09 Nikolas Zimmermann <nzimmermann@rim.com> Reviewed by Dirk Schulze. No scroll bars are displayed for standalone SVG image https://bugs.webkit.org/show_bug.cgi?id=11225 Height and width defined for svg element are not honored https://bugs.webkit.org/show_bug.cgi?id=24033 SVG file does not pan and has no scroll bars https://bugs.webkit.org/show_bug.cgi?id=24448 Adapt to SVG 1.1 errata to change the overflow handling: Replace "svg { overflow: hidden }" by "svg:not(:root) { overflow: hidden }" to allow standalone SVG documents to contain scrolllbars. Agreed by SVG WG to make this the default behaviour, already implemented by Opera & FireFox (partial support). Add new tests in svg/overflow covering all special SVG css overflow handling rules on inner/outer svg elements. Tests: svg/overflow/overflow-on-inner-svg-element-defaults.svg svg/overflow/overflow-on-inner-svg-element.svg svg/overflow/overflow-on-outermost-svg-element-defaults.svg svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-1.svg svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-2.svg svg/overflow/overflow-on-outermost-svg-element-ignore-attribute-3.svg svg/overflow/overflow-on-outermost-svg-element-in-xhtml-auto.xhtml svg/overflow/overflow-on-outermost-svg-element-in-xhtml-defaults.xhtml svg/overflow/overflow-on-outermost-svg-element-in-xhtml-hidden.xhtml svg/overflow/overflow-on-outermost-svg-element-in-xhtml-scroll.xhtml svg/overflow/overflow-on-outermost-svg-element-in-xhtml-visible.xhtml * css/svg.css: Change default <svg> overflow rule to only apply to inner <svg> elements. * page/FrameView.cpp: (WebCore::FrameView::layout): Only apply overflow rules for non-standalone SVG documents. * rendering/RenderSVGRoot.cpp: Remove all calls to isOverflowHidden - it's always the case for the outermost SVG element, see spec + errata. (WebCore::RenderSVGRoot::paint): Always clip to initial viewport size. (WebCore::RenderSVGRoot::computeRectForRepaint): Ditto. (WebCore::RenderSVGRoot::nodeAtPoint): Simplify. * rendering/RenderSVGViewportContainer.cpp: (WebCore::RenderSVGViewportContainer::applyViewportClip): Use isOverflowHidden() instead of a manual oveflow query and clip in float precision. * rendering/SVGRenderSupport.cpp: (WebCore::SVGRenderBase::isOverflowHidden): Simplify implementation, assure the function is not called anymore for RenderSVGRoot objects. Canonical link: https://commits.webkit.org/45864@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@54551 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-02-09 16:08:18 +00:00
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
<!--
Verify default overflow rules for the outermost <svg> element.
You should see scrollbars, as the content is larger then the viewport.
Spec reference:
When an outermost SVG 'svg' element is stand-alone or embedded inline within a parent XML grammar which
does not use CSS layout [CSS2-LAYOUT] or XSL formatting [XSL], the 'overflow' property on the outermost
'svg' element is ignored for the purposes of visual rendering and the initial clipping path is set to
the bounds of the initial viewport.
-->
<svg xmlns="http://www.w3.org/2000/svg" width="4000" height="4000">
<rect width="4000" height="4000" fill="green"/>
</svg>