Bug 199588 - Web Inspector: REGRESSION: Elements: pasting in the Styles sidebar adds a text node to the DOM tree
Summary: Web Inspector: REGRESSION: Elements: pasting in the Styles sidebar adds a tex...
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-07-08 14:10 PDT by Devin Rousso
Modified: 2019-07-08 17:28 PDT (History)
5 users (show)

See Also:


Attachments
Patch (1.46 KB, patch)
2019-07-08 14:19 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 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>