WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
99870
Incorrect pattern scaling
https://bugs.webkit.org/show_bug.cgi?id=99870
Summary
Incorrect pattern scaling
Florin Malita
Reported
2012-10-19 14:20:29 PDT
Created
attachment 169693
[details]
"Wobbly" pattern scaling SVG patterns do not scale smoothly with arbitrary factors. Certain values cause the pattern to shift around visibly. Chromium issue:
http://code.google.com/p/chromium/issues/detail?id=125638
Attachments
"Wobbly" pattern scaling
(4.63 KB, text/html)
2012-10-19 14:20 PDT
,
Florin Malita
no flags
Details
Patch
(321.56 KB, patch)
2012-10-19 15:06 PDT
,
Florin Malita
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Dirk Schulze
Comment 1
2012-10-19 14:23:02 PDT
And repaint issues as well.
Florin Malita
Comment 2
2012-10-19 14:24:08 PDT
(In reply to
comment #1
)
> And repaint issues as well.
Yes, that too. I'd like to handle that as a separate bug though.
Florin Malita
Comment 3
2012-10-19 15:06:08 PDT
Created
attachment 169704
[details]
Patch
Dirk Schulze
Comment 4
2012-10-19 15:15:45 PDT
Comment on
attachment 169704
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=169704&action=review
> Source/WebCore/rendering/svg/RenderSVGResourcePattern.cpp:131 > + patternData->transform.scale(tileBoundaries.width() / tileImageSize.width(), tileBoundaries.height() / tileImageSize.height());
I can't really tell if that is fully correct, even if it looks sane. I would like to have an easy example where you can see the wrong scaling behavior (sth. with red wrong, just green correct).
Florin Malita
Comment 5
2012-10-19 17:27:39 PDT
(In reply to
comment #4
)
> (From update of
attachment 169704
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=169704&action=review
> > > Source/WebCore/rendering/svg/RenderSVGResourcePattern.cpp:131 > > + patternData->transform.scale(tileBoundaries.width() / tileImageSize.width(), tileBoundaries.height() / tileImageSize.height()); > > I can't really tell if that is fully correct, even if it looks sane. I would like to have an easy example where you can see the wrong scaling behavior (sth. with red wrong, just green correct).
I tried making it a reftest initially, but there are subtle subpixel differences and couldn't make it work. Since this deals with pattern tile alignment, I can't really think of a way to make it turn red when misaligned... do you have any ideas? But if you open the added test in an unpatched build you can notice that the pattern doesn't align on the right side for all scales as it is supposed to (the shape size is a multiple of the pattern size). The pixel results capture this, and I guess I could add a comment explaining how it should look.
Dirk Schulze
Comment 6
2012-10-19 19:17:11 PDT
Can you add a pixel test then?
Florin Malita
Comment 7
2012-10-19 19:26:52 PDT
(In reply to
comment #6
)
> Can you add a pixel test then?
There is this one I was talking about added in the patch: svg/custom/pattern-scaling.svg (green/yellow squares pattern that should align on all rect edges) I only have Chromium/Linux results for it, but will add the rest as they become available. Do you think we need some more?
Dirk Schulze
Comment 8
2012-10-19 19:30:07 PDT
Comment on
attachment 169704
[details]
Patch I missed the new test, sorry. Looks fine for me.
WebKit Review Bot
Comment 9
2012-10-19 19:51:12 PDT
Comment on
attachment 169704
[details]
Patch Clearing flags on attachment: 169704 Committed
r131974
: <
http://trac.webkit.org/changeset/131974
>
WebKit Review Bot
Comment 10
2012-10-19 19:51:18 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug