I noticed this while looking at unused variable warnings.
It turns out this has no effect because the only collection that ever gets passed false for caseSensitive is the anchors collection. A much better way to do that would be to add a findAnchor function to Document for the two call sites that need it.
Created attachment 26426 [details] patch
Comment on attachment 26426 [details] patch r=me!
http://trac.webkit.org/changeset/39603
Comment on attachment 26426 [details] patch > +Element* Document::findAnchor(const String& name) > +{ > + if (name.isEmpty()) > + return 0; > + if (Element* element = getElementById(name)) > + return element; Couldn't this return something other than an anchor element?
(In reply to comment #5) > Couldn't this return something other than an anchor element? Yes. This function finds an "anchor", which is the site that a "#xxx" fragment navigates to; nowadays that can be any element with an ID although historically it could only be an anchor element. If this function returned only anchor elements, I would have made its return type be HTMLAnchorElement instead of Element.