-
commit-queue@webkit.org authored
https://bugs.webkit.org/show_bug.cgi?id=120284 Patch by Tamas Gergely <tgergely.u-szeged@partner.samsung.com> on 2013-12-18 Reviewed by Philip Rogers. Source/WebCore: Added handling of root <svg> elements. Blink merge: https://chromium.googlesource.com/chromium/blink/+/a7dedf81eb7008276bb6854f0e46465e039788f8 SVGLengthContext::determineViewport() currently asserts that we're not resolving lengths for the topmost element, but there's nothing to prevent such calls. The patch updates determineViewport() to handle root elements geracefully (using their current viewport). It also changes the signature slightly to operate directly on a FloatSize, reducing some of the boiler-plate client code. Tests: svg/custom/svg-length-value-handled.svg svg/dom/svg-root-lengths.html * svg/SVGLengthContext.cpp: (WebCore::SVGLengthContext::convertValueFromUserUnitsToPercentage): (WebCore::SVGLengthContext::convertValueFromPercentageToUserUnits): (WebCore::SVGLengthContext::determineViewport): * svg/SVGLengthContext.h: * svg/graphics/filters/SVGFEImage.cpp: (WebCore::FEImage::platformApplySoftware): LayoutTests: Added tests of handling root <svg> elements. Blink merge: https://chromium.googlesource.com/chromium/blink/+/a7dedf81eb7008276bb6854f0e46465e039788f8 * svg/custom/svg-length-value-handled-expected.txt: Added. * svg/custom/svg-length-value-handled.svg: Added. Tests whether root svg elements sizes are handled. * svg/dom/svg-root-lengths-expected.txt: Added. * svg/dom/svg-root-lengths.html: Added. Tests the correct handling of root svg elements sizes. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160774 268f45cc-cd09-0410-ab3c-d52691b4dbfc
91c4b42c