RESOLVED FIXED 32511
Dragging an SVG image triggers assertion in DragController::startDrag()
https://bugs.webkit.org/show_bug.cgi?id=32511
Summary Dragging an SVG image triggers assertion in DragController::startDrag()
Andreas Kling
Reported 2009-12-14 05:34:37 PST
DragController.cpp:675: ASSERT(!image->filenameExtension().isEmpty()); SVGImage doesn't implement filenameExtension(), and the default implementation returns an empty string.
Attachments
Add SVGImage::filenameExtension() (1.33 KB, patch)
2009-12-14 05:40 PST, Andreas Kling
darin: review-
Add SVGImage::filenameExtension() + regression test (4.05 KB, patch)
2009-12-21 03:52 PST, Andreas Kling
no flags
Andreas Kling
Comment 1 2009-12-14 05:40:49 PST
Created attachment 44788 [details] Add SVGImage::filenameExtension()
WebKit Review Bot
Comment 2 2009-12-14 05:41:48 PST
style-queue ran check-webkit-style on attachment 44788 [details] without any errors.
Darin Adler
Comment 3 2009-12-14 09:45:47 PST
Comment on attachment 44788 [details] Add SVGImage::filenameExtension() Thanks, looks like the right fix. > + virtual String filenameExtension() const; Virtual functions like this one normally should be private rather than public. It's a programming error to call this function on a pointer known to be an SVGImage* so it's good to get a compiler error in that case. And a private member function still does just fine at overriding the base class. Can we make a regression test for this? Normally we require regression tests for all bug fixes, and we have quite a few dragging tests already, so it can probably be done. I'm going to say review-, but if you try and find we can't make a regression test then revise the ChangeLog to explain why, and then feel free to put this up for review again.
Andreas Kling
Comment 4 2009-12-21 03:52:02 PST
Created attachment 45319 [details] Add SVGImage::filenameExtension() + regression test Thanks for your comments! Here's the same patch with an added regression test. Please note that the test will only fail when compiled in debug mode, since the problem is a failing assertion.
WebKit Review Bot
Comment 5 2009-12-21 03:55:56 PST
style-queue ran check-webkit-style on attachment 45319 [details] without any errors.
Andreas Kling
Comment 6 2009-12-21 05:09:00 PST
Minor brain glitch, it's not actually the *same* patch, I made SVGImage::filenameExtension() private as per your suggestion.
WebKit Commit Bot
Comment 7 2009-12-21 10:58:31 PST
Comment on attachment 45319 [details] Add SVGImage::filenameExtension() + regression test Clearing flags on attachment: 45319 Committed r52448: <http://trac.webkit.org/changeset/52448>
WebKit Commit Bot
Comment 8 2009-12-21 10:58:36 PST
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.