Bug 213617

Summary: Web Inspector: Allow selecting text of Response (DOM Tree)
Product: WebKit Reporter: Nikita Vasilyev <nvasilyev>
Component: Web InspectorAssignee: Nikita Vasilyev <nvasilyev>
Status: RESOLVED FIXED    
Severity: Normal CC: inspector-bugzilla-changes, joepeck, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
[Video] With patch applied none

Description Nikita Vasilyev 2020-06-25 13:54:07 PDT
Steps:
0. Open https://webkit.org
1. Open Web Inspector
2. Open Network, select webkit.org
3. On the top right side, change "Response" to "Response (DOM Tree)"
4. Try selecting text in the content view. It doesn't work.
Comment 1 Nikita Vasilyev 2020-06-25 13:56:03 PDT
Created attachment 402806 [details]
Patch
Comment 2 Joseph Pecoraro 2020-06-25 14:06:30 PDT
Comment on attachment 402806 [details]
Patch

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

> Source/WebInspectorUI/UserInterface/Views/DOMTreeOutline.css:50
> +.tree-outline.dom.non-selectable {

Should we allow selecting text of something with a class "non-selectable"? Should that class just be removed?
Comment 3 Nikita Vasilyev 2020-06-25 14:26:11 PDT
Created attachment 402812 [details]
[Video] With patch applied

I see "non-selectable" was added for this new case that is different from TreeOutline selection in Elements. In Elements, it isn't text selection. It's treeOutline node selection, which is different.

I hope it clears things up.
Comment 4 Nikita Vasilyev 2020-06-25 14:57:18 PDT
(In reply to Joseph Pecoraro from comment #2)
> Comment on attachment 402806 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=402806&action=review
> 
> > Source/WebInspectorUI/UserInterface/Views/DOMTreeOutline.css:50
> > +.tree-outline.dom.non-selectable {
> 
> Should we allow selecting text of something with a class "non-selectable"?
> Should that class just be removed?

To answer your question:

No, because in Elements, we don't have "non-selectable" and it should not have `-webkit-user-select: text`.
Comment 5 Joseph Pecoraro 2020-07-02 15:46:43 PDT
Comment on attachment 402806 [details]
Patch

Sounds fine then.
Comment 6 EWS 2020-07-02 15:49:41 PDT
Committed r263872: <https://trac.webkit.org/changeset/263872>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 402806 [details].
Comment 7 Radar WebKit Bug Importer 2020-07-02 15:50:17 PDT
<rdar://problem/65054055>