Bug 137681

Summary: Web Inspector: Processing Instruction Nodes appear poorly in DOM Tree
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: Web InspectorAssignee: Joseph Pecoraro <joepeck>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, graouts, joepeck, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
[PATCH] Proposed Fix
timothy: review+
[IMAGE] Before
none
[IMAGE] After
none
[PATCH] Comments Addressed none

Description Joseph Pecoraro 2014-10-13 18:51:22 PDT
* SUMMARY
Web Inspector: Processing Instruction Nodes appear poorly in DOM Tree. We only see their node name. Not their data (attributes).

* STEPS TO REPRODUCE
1. Inspect <http://www.schillmania.com/content/entries/2004/10/24/application-xhtml+xml/>
2. View DOM Tree
  => processing instruction nodes display poorly and unstyled

* NOTES
The content is served with a "application/xhtml+xml" mime type and looks like:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/2009/2009.css" title="main" media="screen"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
	"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
....

NOTE: We don't even show the <?xml?> processing instruction in the UI. We probably should.
Comment 1 Radar WebKit Bug Importer 2014-10-13 18:51:34 PDT
<rdar://problem/18643248>
Comment 2 Joseph Pecoraro 2014-10-13 18:55:55 PDT
Created attachment 239769 [details]
[PATCH] Proposed Fix
Comment 3 Joseph Pecoraro 2014-10-13 18:59:49 PDT
Created attachment 239771 [details]
[IMAGE] Before
Comment 4 Joseph Pecoraro 2014-10-13 19:00:22 PDT
Created attachment 239772 [details]
[IMAGE] After
Comment 5 Timothy Hatcher 2014-10-13 21:03:59 PDT
Comment on attachment 239769 [details]
[PATCH] Proposed Fix

View in context: https://bugs.webkit.org/attachment.cgi?id=239769&action=review

> Source/WebInspectorUI/UserInterface/Models/DOMSearchMatchObject.js:117
> +        for (var i = 0; i < attributes.length; ++i) {

for of?
Comment 6 Joseph Pecoraro 2014-10-14 10:43:13 PDT
Created attachment 239806 [details]
[PATCH] Comments Addressed
Comment 7 WebKit Commit Bot 2014-10-14 10:53:35 PDT
Comment on attachment 239806 [details]
[PATCH] Comments Addressed

Clearing flags on attachment: 239806

Committed r174687: <http://trac.webkit.org/changeset/174687>
Comment 8 WebKit Commit Bot 2014-10-14 10:53:38 PDT
All reviewed patches have been landed.  Closing bug.