WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
63336
Convert SVGPath to SVGAnimatorFactory concept
https://bugs.webkit.org/show_bug.cgi?id=63336
Summary
Convert SVGPath to SVGAnimatorFactory concept
Dirk Schulze
Reported
2011-06-24 11:03:33 PDT
Convert SVGPath to SVGAnimatorFactory concept.
Attachments
SVGAnimatedPathAnimator
(22.33 KB, patch)
2011-06-24 11:04 PDT
,
Dirk Schulze
no flags
Details
Formatted Diff
Diff
Patch v2
(31.71 KB, patch)
2011-06-25 10:15 PDT
,
Nikolas Zimmermann
no flags
Details
Formatted Diff
Diff
Patch v3
(32.00 KB, patch)
2011-06-25 10:32 PDT
,
Nikolas Zimmermann
krit
: review-
webkit.review.bot
: commit-queue-
Details
Formatted Diff
Diff
Patch v4
(33.41 KB, patch)
2011-06-25 14:07 PDT
,
Nikolas Zimmermann
krit
: review+
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Dirk Schulze
Comment 1
2011-06-24 11:04:32 PDT
Created
attachment 98512
[details]
SVGAnimatedPathAnimator
Nikolas Zimmermann
Comment 2
2011-06-25 10:15:10 PDT
Created
attachment 98592
[details]
Patch v2
Nikolas Zimmermann
Comment 3
2011-06-25 10:29:10 PDT
Dirk have a look at "
https://bugs.webkit.org/attachment.cgi?oldid=98512&action=interdiff&newid=98592&headers=1
"
Nikolas Zimmermann
Comment 4
2011-06-25 10:32:39 PDT
Created
attachment 98595
[details]
Patch v3
WebKit Review Bot
Comment 5
2011-06-25 10:35:57 PDT
Attachment 98595
[details]
did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/CMakeLists.txt', u'Source/W..." exit_code: 1 Source/WebCore/svg/SVGAnimatedPath.cpp:42: The parameter type should use PassOwnPtr instead of OwnPtr. [readability/pass_ptr] [5] Source/WebCore/svg/SVGAnimatedPath.cpp:42: The parameter type should use PassOwnPtr instead of OwnPtr. [readability/pass_ptr] [5] Source/WebCore/svg/SVGAnimatedPath.cpp:72: The parameter type should use PassOwnPtr instead of OwnPtr. [readability/pass_ptr] [5] Source/WebCore/svg/SVGAnimatedPath.cpp:72: The parameter type should use PassOwnPtr instead of OwnPtr. [readability/pass_ptr] [5] Source/WebCore/svg/SVGAnimatedPath.cpp:77: The parameter type should use PassOwnPtr instead of OwnPtr. [readability/pass_ptr] [5] Source/WebCore/svg/SVGAnimatedPath.cpp:77: The parameter type should use PassOwnPtr instead of OwnPtr. [readability/pass_ptr] [5] Source/WebCore/svg/SVGAnimatedPath.cpp:77: The parameter type should use PassOwnPtr instead of OwnPtr. [readability/pass_ptr] [5] Source/WebCore/svg/SVGAnimatedPath.h:38: The parameter type should use PassOwnPtr instead of OwnPtr. [readability/pass_ptr] [5] Source/WebCore/svg/SVGAnimatedPath.h:38: The parameter type should use PassOwnPtr instead of OwnPtr. [readability/pass_ptr] [5] Source/WebCore/svg/SVGAnimatedPath.h:39: The parameter type should use PassOwnPtr instead of OwnPtr. [readability/pass_ptr] [5] Source/WebCore/svg/SVGAnimatedPath.h:39: The parameter type should use PassOwnPtr instead of OwnPtr. [readability/pass_ptr] [5] Source/WebCore/svg/SVGAnimatedPath.h:41: The parameter type should use PassOwnPtr instead of OwnPtr. [readability/pass_ptr] [5] Source/WebCore/svg/SVGAnimatedPath.h:41: The parameter type should use PassOwnPtr instead of OwnPtr. [readability/pass_ptr] [5] Source/WebCore/svg/SVGAnimatedPath.h:41: The parameter type should use PassOwnPtr instead of OwnPtr. [readability/pass_ptr] [5] Total errors found: 14 in 16 files If any of these errors are false positives, please file a bug against check-webkit-style.
WebKit Review Bot
Comment 6
2011-06-25 10:51:20 PDT
Comment on
attachment 98595
[details]
Patch v3
Attachment 98595
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/8933881
Rob Buis
Comment 7
2011-06-25 11:24:55 PDT
Comment on
attachment 98595
[details]
Patch v3 View in context:
https://bugs.webkit.org/attachment.cgi?id=98595&action=review
LGTM in general, nice to see lots of code removed here and one general concept being used. I'll leave it to kri for the real review since he is more familiar with this code.
> Source/WebCore/svg/SVGAnimatedPath.cpp:98 > + ASSERT(percentage >= 0);
Is that ASSERT useful? AFAICS percentage must be zero?
> Source/WebCore/svg/SVGAnimatedPath.cpp:114 > + if ((animationMode == FromToAnimation && percentage > 0.5) || animationMode == ToAnimation || percentage == 1)
But percentage == 1 already made an early exit above?
Dirk Schulze
Comment 8
2011-06-25 11:25:55 PDT
Comment on
attachment 98595
[details]
Patch v3 View in context:
https://bugs.webkit.org/attachment.cgi?id=98595&action=review
You forgot to edit WebCore.gyp. And please remove the unnecessary headers in SVGAnimateElement.h/.cpp. Patch looks great btw :-) r- because of the build failure and the includes.
> Source/WebCore/svg/SVGAnimatedPath.cpp:39 > +PassOwnPtr<SVGAnimatedType> SVGAnimatedPathAnimator::constructFromString(const String& string) > +{ > + OwnPtr<SVGPathByteStream> byteStream = SVGPathByteStream::create(); > + SVGPathParserFactory::self()->buildSVGPathByteStreamFromString(string, byteStream, UnalteredParsing); > + return SVGAnimatedType::createPath(byteStream.leakPtr());
Don't you think it might be more secure to release the OwnPtr<SVGPathByteStream> here and pass an PassOwnPtr? SVGAnimatedType::createPath might be used on other places in the future. We should make sure that the caller does not forget, that it hasn't the ownership anymore.
Dirk Schulze
Comment 9
2011-06-25 11:28:00 PDT
(In reply to
comment #7
)
> (From update of
attachment 98595
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=98595&action=review
> > LGTM in general, nice to see lots of code removed here and one general concept being used. I'll leave it to kri for the real review since he is more familiar with this code. > > > Source/WebCore/svg/SVGAnimatedPath.cpp:98 > > + ASSERT(percentage >= 0); > > Is that ASSERT useful? AFAICS percentage must be zero?
Good point! this gets already asserted in SVGAnimateElement.cpp
> > > Source/WebCore/svg/SVGAnimatedPath.cpp:114 > > + if ((animationMode == FromToAnimation && percentage > 0.5) || animationMode == ToAnimation || percentage == 1) > > But percentage == 1 already made an early exit above?
Second good point! :-)
Nikolas Zimmermann
Comment 10
2011-06-25 14:07:04 PDT
(In reply to
comment #8
)
> (From update of
attachment 98595
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=98595&action=review
> > You forgot to edit WebCore.gyp. And please remove the unnecessary headers in SVGAnimateElement.h/.cpp. Patch looks great btw :-) r- because of the build failure and the includes.
Fixed :-)
> > > Source/WebCore/svg/SVGAnimatedPath.cpp:39 > > +PassOwnPtr<SVGAnimatedType> SVGAnimatedPathAnimator::constructFromString(const String& string) > > +{ > > + OwnPtr<SVGPathByteStream> byteStream = SVGPathByteStream::create(); > > + SVGPathParserFactory::self()->buildSVGPathByteStreamFromString(string, byteStream, UnalteredParsing); > > + return SVGAnimatedType::createPath(byteStream.leakPtr()); > > Don't you think it might be more secure to release the OwnPtr<SVGPathByteStream> here and pass an PassOwnPtr? SVGAnimatedType::createPath might be used on other places in the future. We should make sure that the caller does not forget, that it hasn't the ownership anymore.
Okay.
Nikolas Zimmermann
Comment 11
2011-06-25 14:07:54 PDT
Created
attachment 98605
[details]
Patch v4 Fixed Robs / Dirks comments.
WebKit Review Bot
Comment 12
2011-06-25 14:10:31 PDT
Attachment 98605
[details]
did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/CMakeLists.txt', u'Source/W..." exit_code: 1 Source/WebCore/svg/SVGAnimatedPath.cpp:48: The parameter type should use PassOwnPtr instead of OwnPtr. [readability/pass_ptr] [5] Source/WebCore/svg/SVGAnimatedPath.cpp:48: The parameter type should use PassOwnPtr instead of OwnPtr. [readability/pass_ptr] [5] Source/WebCore/svg/SVGAnimatedPath.cpp:72: The parameter type should use PassOwnPtr instead of OwnPtr. [readability/pass_ptr] [5] Source/WebCore/svg/SVGAnimatedPath.cpp:72: The parameter type should use PassOwnPtr instead of OwnPtr. [readability/pass_ptr] [5] Source/WebCore/svg/SVGAnimatedPath.cpp:77: The parameter type should use PassOwnPtr instead of OwnPtr. [readability/pass_ptr] [5] Source/WebCore/svg/SVGAnimatedPath.cpp:77: The parameter type should use PassOwnPtr instead of OwnPtr. [readability/pass_ptr] [5] Source/WebCore/svg/SVGAnimatedPath.cpp:77: The parameter type should use PassOwnPtr instead of OwnPtr. [readability/pass_ptr] [5] Source/WebCore/svg/SVGAnimatedPath.h:38: The parameter type should use PassOwnPtr instead of OwnPtr. [readability/pass_ptr] [5] Source/WebCore/svg/SVGAnimatedPath.h:38: The parameter type should use PassOwnPtr instead of OwnPtr. [readability/pass_ptr] [5] Source/WebCore/svg/SVGAnimatedPath.h:39: The parameter type should use PassOwnPtr instead of OwnPtr. [readability/pass_ptr] [5] Source/WebCore/svg/SVGAnimatedPath.h:39: The parameter type should use PassOwnPtr instead of OwnPtr. [readability/pass_ptr] [5] Source/WebCore/svg/SVGAnimatedPath.h:41: The parameter type should use PassOwnPtr instead of OwnPtr. [readability/pass_ptr] [5] Source/WebCore/svg/SVGAnimatedPath.h:41: The parameter type should use PassOwnPtr instead of OwnPtr. [readability/pass_ptr] [5] Source/WebCore/svg/SVGAnimatedPath.h:41: The parameter type should use PassOwnPtr instead of OwnPtr. [readability/pass_ptr] [5] Total errors found: 14 in 18 files If any of these errors are false positives, please file a bug against check-webkit-style.
Dirk Schulze
Comment 13
2011-06-25 14:31:23 PDT
Comment on
attachment 98605
[details]
Patch v4 View in context:
https://bugs.webkit.org/attachment.cgi?id=98605&action=review
r=me with comments.
> Source/WebCore/svg/SVGAnimateElement.h:74 >
You forgot to remove #include "SVGPathByteStream.h"
> Source/WebCore/svg/SVGAnimatedPath.cpp:121 > + // No paced animations for strings.
Hehe, not strings but SVGPathSegLists :) Please fix the comment. Make it to a FIXME, Opera supports it.
Nikolas Zimmermann
Comment 14
2011-06-25 14:37:11 PDT
Landed in
r89749
.
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