Bug 199052 - Web Inspector: Edit -> Tag doesn't do anything for html, head, and body elements
Summary: Web Inspector: Edit -> Tag doesn't do anything for html, head, and body elements
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Devin Rousso
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-06-19 18:35 PDT by Nikita Vasilyev
Modified: 2019-06-20 15:45 PDT (History)
5 users (show)

See Also:


Attachments
Patch (5.35 KB, patch)
2019-06-20 10:24 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff
Patch (5.33 KB, patch)
2019-06-20 15:12 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nikita Vasilyev 2019-06-19 18:35:17 PDT
Steps:
1. Open https://webkit.org
2. Inspect <body>
3. Right click on <body>
4. Select "Edit -> Tag"

Actual:
Nothing happens.

Expected:
Either start editing "body" or disable (gray out) the "Tag" menu item.
Comment 1 Radar WebKit Bug Importer 2019-06-19 18:40:16 PDT
<rdar://problem/51923906>
Comment 2 Devin Rousso 2019-06-20 10:24:24 PDT
Created attachment 372566 [details]
Patch
Comment 3 Matt Baker 2019-06-20 13:21:28 PDT
Comment on attachment 372566 [details]
Patch

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

r=me

> Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js:801
> +            if (!DOMTreeElement.EditTagBlacklist.has(this.representedObject.nodeNameInCorrectCase())) {

Nit: I'd move `let tagNameNode = event.target.closest(".html-tag-name");` (line 746 above) to here to where it is used.
Comment 4 Devin Rousso 2019-06-20 15:12:20 PDT
Created attachment 372591 [details]
Patch
Comment 5 WebKit Commit Bot 2019-06-20 15:45:23 PDT
Comment on attachment 372591 [details]
Patch

Clearing flags on attachment: 372591

Committed r246658: <https://trac.webkit.org/changeset/246658>
Comment 6 WebKit Commit Bot 2019-06-20 15:45:24 PDT
All reviewed patches have been landed.  Closing bug.