userSpaceOnUse patterns are not stroked for empty object bounding box elements
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Mar 2016 03:28:09 +0000 (03:28 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Mar 2016 03:28:09 +0000 (03:28 +0000)
commit5036b5f75cf9b840e14698787b1be84d16c343f8
treefc74cc1b199d5c81f71c24828f551189d8a96e8a
parent905a9cba17c25057352d268f1f30c19c88ac932f
userSpaceOnUse patterns are not stroked for empty object bounding box elements
https://bugs.webkit.org/show_bug.cgi?id=109758

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2016-03-22
Reviewed by Brent Fulgham.
Source/WebCore:

Checking whether the patternUnits is objectBoundingBox needs to be done
after calling collectPatternAttributes(). Otherwise the default value
will be always checked which is 'objectBoundingBox'.

Tests: svg/custom/pattern-units-fill-stroke.svg

* rendering/svg/RenderSVGResourcePattern.cpp:
(WebCore::RenderSVGResourcePattern::buildPattern):
(WebCore::RenderSVGResourcePattern::applyResource):

LayoutTests:

Ensure the SVG pattern is drawn correctly if it is used as a stroke for
empty objectBoundingBox elements.

* svg/custom/pattern-units-fill-stroke-expected.svg: Added.
* svg/custom/pattern-units-fill-stroke.svg: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@198574 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/svg/custom/pattern-units-fill-stroke-expected.svg [new file with mode: 0644]
LayoutTests/svg/custom/pattern-units-fill-stroke.svg [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/svg/RenderSVGResourcePattern.cpp