Bug 199588

Summary: Web Inspector: REGRESSION: Elements: pasting in the Styles sidebar adds a text node to the DOM tree
Product: WebKit Reporter: Devin Rousso <hi>
Component: Web InspectorAssignee: Devin Rousso <hi>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, hi, inspector-bugzilla-changes, joepeck, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch none

Description Devin Rousso 2019-07-08 14:10:27 PDT
# STEPS TO REPRODUCE:
1. copy "foo"
2. inspect any page
3. select the inline style of any node in the Elements tab
4. start adding a new property in the inline style
5. paste
 => "foo" added as a sibling of the currently selected node in the DOM tree
Comment 1 Devin Rousso 2019-07-08 14:13:20 PDT
(In reply to Devin Rousso from comment #0)
> 1. copy "foo"
Actually, you need to copy something that would instead be rendered as a CSS property (or multiple): "foo:".
Comment 2 Devin Rousso 2019-07-08 14:19:21 PDT
Created attachment 373664 [details]
Patch
Comment 3 Joseph Pecoraro 2019-07-08 14:33:47 PDT
Comment on attachment 373664 [details]
Patch

rs=me

Should this be the case for other events then? WI._copy?
Comment 4 Devin Rousso 2019-07-08 14:35:28 PDT
Comment on attachment 373664 [details]
Patch

(In reply to Joseph Pecoraro from comment #3)
> Should this be the case for other events then? WI._copy?
I'd say yes, but in the interest of avoiding regressions, I'd rather not.  Also, the default functionality of a "copy" won't modify the DOM like "paste" would, so there's less "risk" there of multiple things acting on the same "copy".
Comment 5 WebKit Commit Bot 2019-07-08 17:27:12 PDT
Comment on attachment 373664 [details]
Patch

Clearing flags on attachment: 373664

Committed r247241: <https://trac.webkit.org/changeset/247241>
Comment 6 WebKit Commit Bot 2019-07-08 17:27:14 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Radar WebKit Bug Importer 2019-07-08 17:28:17 PDT
<rdar://problem/52806667>