Bug 271958

Summary: Web Inspector: attributes prettification of the HTML code
Product: WebKit Reporter: Karl Dubost <karlcow>
Component: Web InspectorAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: inspector-bugzilla-changes, qianlangchen, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: All   
OS: All   
See Also: https://bugs.webkit.org/show_bug.cgi?id=247661
https://bugs.webkit.org/show_bug.cgi?id=271924
Attachments:
Description Flags
prettified code + Web Inspector: Elements
none
Copy HTML none

Karl Dubost
Reported 2024-03-31 22:11:14 PDT
Created attachment 470693 [details] prettified code + Web Inspector: Elements 1. Go to a site with HTML with a number of attributes. 2. Look at the layout in Web Inspector: Elements. Result: Elements are presented as a tree, but attributes are not prettified/beautified. It would be great to have this kind of layout: <div class="vp-video-wrapper content-area-sibling-enabled" data-content-area-sibling-eligible=""> <div class="vp-video"> <div class="vp-telecine"> <video preload="" tabindex="-1" autopictureinpicture="" src="blob:https://vimeo.com/0d0c2d74-88de-484b-8370-c3bcff93fc89" style=""></video> </div> </div> <div class="vp-preview vp-preview-invisible" id="vp-preview" data-thumb="https://i.vimeocdn.com/video/1778321883-34ccc6ed64431a7c83e1063516881c26afa69b0066b99778877355f086a1a02d-d?mw=960&amp;mh=540" data-thumb-width="960"></div> </div> A potential side benefit would be to be able to specify a breakpoint on modification of the value of a specific attribute.
Attachments
prettified code + Web Inspector: Elements (371.47 KB, image/png)
2024-03-31 22:11 PDT, Karl Dubost
no flags
Copy HTML (92.71 KB, image/png)
2024-03-31 22:14 PDT, Karl Dubost
no flags
Radar WebKit Bug Importer
Comment 1 2024-03-31 22:11:22 PDT
Karl Dubost
Comment 2 2024-03-31 22:14:14 PDT
Created attachment 470694 [details] Copy HTML To note that the feature: Copy HTML from the contextual menu creates a non-prettified version of the code too. (There is another bug: bug 247661 for giving the option to copy/paste a prettified version of the code.) <div class="vp-video-wrapper content-area-sibling-enabled" data-content-area-sibling-eligible=""><div class="vp-video"><div class="vp-telecine"><video preload="" tabindex="-1" autopictureinpicture="" src="blob:https://vimeo.com/0d0c2d74-88de-484b-8370-c3bcff93fc89" style=""></video></div></div><div class="vp-preview vp-preview-invisible" id="vp-preview" data-thumb="https://i.vimeocdn.com/video/1778321883-34ccc6ed64431a7c83e1063516881c26afa69b0066b99778877355f086a1a02d-d?mw=960&amp;mh=540" data-thumb-width="960"></div></div>
Note You need to log in before you can comment on or make changes to this bug.