Summary: | Redundant isElement checks in NodeLists | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | David Smith <catfish.man> | ||||
Component: | WebCore Misc. | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Trivial | ||||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Mac | ||||||
OS: | OS X 10.5 | ||||||
Attachments: |
|
Description
David Smith
2007-12-17 11:00:58 PST
Created attachment 17966 [details]
Patch. Passes run-webkit-tests
Comment on attachment 17966 [details]
Patch. Passes run-webkit-tests
If the parameters are really guaranteed to be Element, then the function's signature needs to change to Element* -- the patch is fine, but doesn't go far enough.
(In reply to comment #2) > (From update of attachment 17966 [details] [edit]) > If the parameters are really guaranteed to be Element, then the function's > signature needs to change to Element* -- the patch is fine, but doesn't go far > enough. > It seemed odd/bad to me to be declaring stuff that takes an Element* in Node.h. Is this not a problem? Comment on attachment 17966 [details]
Patch. Passes run-webkit-tests
It makes little sense to me to have an ASSERT for a specific subclass when the method signature expects the base class. The better way to change this is to change the message signature, and then the callers to static_cast when necessary.
This was fixed at some point. |