Bug 136902

Summary: Have LiveNodeLists / HTMLCollections's elementMatches() take a reference
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: DOMAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, darin, rniwa, sam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Chris Dumez 2014-09-17 18:00:33 PDT
Have LiveNodeLists / HTMLCollections's elementMatches() take a const reference instead of a pointer. The Element argument can never be null.
Comment 1 Chris Dumez 2014-09-17 18:10:07 PDT
Created attachment 238276 [details]
Patch
Comment 2 Darin Adler 2014-09-18 09:28:13 PDT
Comment on attachment 238276 [details]
Patch

Seems fine. The choice of when to use const and when not to seems a little random, but everything in the patch seems to make things better, not worse.
Comment 3 WebKit Commit Bot 2014-09-18 09:32:50 PDT
Comment on attachment 238276 [details]
Patch

Clearing flags on attachment: 238276

Committed r173723: <http://trac.webkit.org/changeset/173723>
Comment 4 WebKit Commit Bot 2014-09-18 09:32:54 PDT
All reviewed patches have been landed.  Closing bug.
Comment 5 Chris Dumez 2014-09-18 10:19:33 PDT
(In reply to comment #2)
> (From update of attachment 238276 [details])
> Seems fine. The choice of when to use const and when not to seems a little random, but everything in the patch seems to make things better, not worse.

I made the argument const when possible, that is, everywhere except for the virtual elementMatches() because some of the implementation calls non-const getters on the Element.