Summary: | userSpaceOnUse patterns are not stroked for empty object bounding box elements | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Florin Malita <fmalita> | ||||||||||||||||
Component: | SVG | Assignee: | Florin Malita <fmalita> | ||||||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||||||
Severity: | Normal | CC: | bfulgham, commit-queue, d-r, eric, krit, ojan.autocc, pdr, sabouhallawa, schenney, webkit.review.bot, zimmermann | ||||||||||||||||
Priority: | P2 | ||||||||||||||||||
Version: | 528+ (Nightly build) | ||||||||||||||||||
Hardware: | Unspecified | ||||||||||||||||||
OS: | Unspecified | ||||||||||||||||||
Attachments: |
|
Description
Florin Malita
2013-02-13 15:40:25 PST
Created attachment 188202 [details]
Patch
Comment on attachment 188202 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=188202&action=review We will also need to make this same change in RenderSVGResourceGradient, and possible elsewhere as well. > Source/WebCore/rendering/svg/RenderSVGResourcePattern.cpp:78 > + FloatRect objectBoundingBox = object->objectBoundingBox(); Is this local variable needed? (In reply to comment #2) > (From update of attachment 188202 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=188202&action=review > > We will also need to make this same change in RenderSVGResourceGradient, and possible elsewhere as well. Gradients are OK and probably all other resource renderers. This was introduced recently, most likely by a change by yours truly :) > > > Source/WebCore/rendering/svg/RenderSVGResourcePattern.cpp:78 > > + FloatRect objectBoundingBox = object->objectBoundingBox(); > > Is this local variable needed? Nope, we can fold. Created attachment 188396 [details]
Patch
Updated per comments.
Comment on attachment 188396 [details]
Patch
This patch no longer applies cleanly. For that reason, r-.
The attached test case is confusing. It does not display on any browser. The test also includes patternUnits='userSpaceOnUse' while the bug is about patternUnits == 'objectBoundingBox'. It also include mask which is not related to this bug. Created attachment 274697 [details]
test case
The attaches "test case" does not display correctly in WebKit but it does display correctly in FireFox and Chrome. Created attachment 274705 [details]
Patch
I prefer to call collectPatternAttributes() from RenderSVGResourcePattern::applyResource() instead of leaving it in RenderSVGResourcePattern::buildPattern() because I think it is hard to track this side effect of buildPattern(). The function name does not say it is also ensuring the pattern attributes are collected. applyResource() is the only caller to buildPattern(). Also m_attributes is only used by applyResource() and buildPattern(). Comment on attachment 274705 [details] Patch Attachment 274705 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/1023244 New failing tests: svg/custom/pattern-units-fill-stroke.svg Created attachment 274715 [details]
Archive of layout-test-results from ews121 for ios-simulator-wk2
The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews121 Port: ios-simulator-wk2 Platform: Mac OS X 10.10.5
Created attachment 274716 [details]
Patch
Comment on attachment 274716 [details]
Patch
r=me
Comment on attachment 274716 [details] Patch Clearing flags on attachment: 274716 Committed r198574: <http://trac.webkit.org/changeset/198574> All reviewed patches have been landed. Closing bug. |