Bug 60765 - Web Inspector: console.log(XMLDocument) should be case preserving
Summary: Web Inspector: console.log(XMLDocument) should be case preserving
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-13 06:55 PDT by Malte Ubl
Modified: 2011-05-20 06:50 PDT (History)
11 users (show)

See Also:


Attachments
Patch (2.88 KB, patch)
2011-05-20 04:55 PDT, tonistiigi
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.