1. Open a page with empty script tag in head (<script></script>). 2. Bring up inspector on that page. 3. In head, there is an empty script element Expected: To show ending script tag Actual: No end tag will be seen if an element is empty (Upstreaming chromium bug)
Created attachment 48875 [details] [PATCH] Proposed solution
Created attachment 48878 [details] [IMAGE] Elements panel showing closing tags (with the patch applied)
Some comments based on the screenshot alone. The "…" should be black text. Some elements like img, input and link (there are more I think) do not need close tags, so we should not show them.
Look for HTMLTagStatus endTagRequirement() on the various elements in WebCore to know what ones prohibit end tags in HTML.
(In reply to comment #3) > Some comments based on the screenshot alone. > > The "…" should be black text. Done. > Some elements like img, input and link (there are more I think) do not need > close tags, so we should not show them. Done. Collected empty elements from HTML4 and HTML5 Draft.
Created attachment 48893 [details] [PATCH] Comments addressed
Created attachment 48894 [details] [IMAGE] Fixed "..." color and removed closing tags for elements that forbid them
Comment on attachment 48893 [details] [PATCH] Comments addressed > +WebInspector.ElementsTreeElement.ForbiddenClosingTagElements = { > + "area": 1, > + "base": 1, This should be an array that you call .keySet() on to get a object. That will let you have multiple tags on a line to take less vertical space. > this.treeOutline.updateSelection(); > + this.updateTitle(); You should call updateTitle before updateSelection. Since updateTitle might change the height of the row and updateSelection needs to ccount for the row height. > this.treeOutline.updateSelection(); > + this.updateTitle(); Ditto, you should call updateTitle before updateSelection.
> Done. Collected empty elements from HTML4 and HTML5 Draft. Will this only apply to HTML documents? All elements need to be closed in XML documents.
Created attachment 48987 [details] [PATCH] Closing tags always rendered for XML-type documents, tests re-baselined
Comment on attachment 48987 [details] [PATCH] Closing tags always rendered for XML-type documents, tests re-baselined Can we add a test for XHTML? > + this.isXMLMimeType = WebInspector.mainResource && WebInspector.mainResource.mimeType && !!WebInspector.mainResource.mimeType.match(/x(?:ht)?ml/i); _isXMLMimeType.
Created attachment 49075 [details] [PATCH] Comments addressed, test for XHTML added
Comment on attachment 49075 [details] [PATCH] Comments addressed, test for XHTML added Clearing flags on attachment: 49075 Committed r55016: <http://trac.webkit.org/changeset/55016>
All reviewed patches have been landed. Closing bug.
*** Bug 17071 has been marked as a duplicate of this bug. ***