Bug 3914

Summary: Remove all dynamic_cast from KDOM
Product: WebKit Reporter: Eric Seidel (no email) <eric>
Component: SVGAssignee: Eric Seidel (no email) <eric>
Status: RESOLVED DUPLICATE    
Severity: Normal    
Priority: P4    
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
Removes many (but not all) dynamic_casts from kdom/ksvg2
none
Removes many (but not all) dynamic_casts from kdom/ksvg2
none
Various dynamic_cast fixes
none
Further dynamic_cast fixes none

Eric Seidel (no email)
Reported 2005-07-09 00:52:53 PDT
RTTI support needs to go from WebCore+SVG. In order to do that, we need to remove all dynamic_cast uses throughout kdom/ksvg2, etc.
Attachments
Removes many (but not all) dynamic_casts from kdom/ksvg2 (38.85 KB, patch)
2005-09-26 19:25 PDT, Eric Seidel (no email)
no flags
Removes many (but not all) dynamic_casts from kdom/ksvg2 (33.66 KB, patch)
2005-09-27 01:03 PDT, Eric Seidel (no email)
no flags
Various dynamic_cast fixes (79.18 KB, patch)
2005-10-09 13:44 PDT, Rob Buis
no flags
Further dynamic_cast fixes (2.42 KB, patch)
2005-10-20 13:53 PDT, Rob Buis
no flags
Eric Seidel (no email)
Comment 1 2005-08-28 02:47:51 PDT
ben is working on this.
Eric Seidel (no email)
Comment 2 2005-09-26 19:25:48 PDT
Created attachment 4056 [details] Removes many (but not all) dynamic_casts from kdom/ksvg2 There are 3 more types to remove: SVGLocateable SVGTests DOMBridge
Eric Seidel (no email)
Comment 3 2005-09-26 19:26:36 PDT
Comment on attachment 4056 [details] Removes many (but not all) dynamic_casts from kdom/ksvg2 Ignore the WebCore.xcodeproj changes, those will be removed before landing.
Eric Seidel (no email)
Comment 4 2005-09-27 01:03:06 PDT
Created attachment 4058 [details] Removes many (but not all) dynamic_casts from kdom/ksvg2 A couple fixes (including a crasher).
Eric Seidel (no email)
Comment 5 2005-09-27 01:04:34 PDT
Comment on attachment 4058 [details] Removes many (but not all) dynamic_casts from kdom/ksvg2 Removes 19 use of dynamic_cast from kdom/ksvg2
Maciej Stachowiak
Comment 6 2005-09-27 20:56:50 PDT
Comment on attachment 4058 [details] Removes many (but not all) dynamic_casts from kdom/ksvg2 r=me
Rob Buis
Comment 7 2005-09-27 23:46:29 PDT
My first remarks: * Element element = document.getElementByID "foobar"); * - * DOMString href = element.getAttribute("href"); - * DOMString documentBase = element.baseURI(); + * DOMStringImpl href = element.getAttribute("href"); + * DOMStringImpl documentBase = element.baseURI(); * - * DOMString theCompleteURL(Helper::BuildURI(documentBase.handle(), href.handle()); + * DOMStringImpl theCompleteURL(Helper::BuildURI(documentBase.handle(), href.handle()); Why is that needed? RCS file: /cvs/root/SVGSupport/ksvg2/svg/SVGElementImpl.h,v retrieving revision 1.6 diff -p -u -r1.6 ksvg2/svg/SVGElementImpl.h --- ksvg2/svg/SVGElementImpl.h 8 Sep 2005 08:03:35 -0000 1.6 +++ ksvg2/svg/SVGElementImpl.h 27 Sep 2005 02:26:43 -0000 @@ -70,12 +70,16 @@ namespace KSVG virtual QString adjustViewportClipping() const { return QString::null; } SVGDocumentImpl *getDocument() const; + + virtual bool isStyled() const { return false; } + virtual bool isSVG() const { return false; } I think we need better names. Cheers, Rob.
Eric Seidel (no email)
Comment 8 2005-10-02 14:57:41 PDT
Comment on attachment 4058 [details] Removes many (but not all) dynamic_casts from kdom/ksvg2 Removing review+ flag to remove it from the "to commit" queue.
Rob Buis
Comment 9 2005-10-09 13:44:18 PDT
Created attachment 4269 [details] Various dynamic_cast fixes Most of the fixes are because adding two classes: SVGStyledTransformableElementImpl and SVGStyledLocatableElementImpl This works fine for most of the classes, but SVGTextElementImpl inheritance structure doesnt seem to fit in. In this patch it is not corrected, since it would mean duplicating code and I'd like to see a better solution thant that. Finally note that I did not really have the opportunity to do regression testing on the patch.
Rob Buis
Comment 10 2005-10-20 13:53:53 PDT
Created attachment 4429 [details] Further dynamic_cast fixes Hi, Here is a patch I needed to do after WildFox committed my previous dynamic_cast fixing patch, since it was work in progress and I advanced some more. This one and the previous one should give a clear picture of how the situation now is in ksvg2 svn. Cheers, Rob.
Eric Seidel (no email)
Comment 11 2005-11-17 12:52:00 PST
There are only 4 left after my most recent work on the DOM merger
Eric Seidel (no email)
Comment 12 2005-11-20 22:34:55 PST
This was done as part of 3249 *** This bug has been marked as a duplicate of 3249 ***
Note You need to log in before you can comment on or make changes to this bug.