Bug 60765

Summary: Web Inspector: console.log(XMLDocument) should be case preserving
Product: WebKit Reporter: Malte Ubl <malte>
Component: Web Inspector (Deprecated)Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: apavlov, bweinstein, commit-queue, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch none

Description Malte Ubl 2011-05-13 06:55:22 PDT
console.log(document) results in a nice tree view of the document. All tag names are lower cased. This is cool for HTML but can be bad for XML.
E.g. when inspecting the result of xhr.responseXML.

My actual problem was that I used document.querySelectorAll on the documents. With XMLDocuments querySelectorAll is case sensitive for tag names. It can be really tough to understand why queries don't match when the tree view that you use to construct the query is all lower cased.
Comment 1 tonistiigi 2011-05-20 04:55:39 PDT
Created attachment 94200 [details]
Patch

I switched the XML check from MIME type to xmlVersion property. Previous only worked if the main document was XML file, now it actually checks the object that is being debugged.
Comment 2 WebKit Commit Bot 2011-05-20 06:50:05 PDT
Comment on attachment 94200 [details]
Patch

Clearing flags on attachment: 94200

Committed r86948: <http://trac.webkit.org/changeset/86948>
Comment 3 WebKit Commit Bot 2011-05-20 06:50:09 PDT
All reviewed patches have been landed.  Closing bug.