Bug 33736 - Inspector: Allow selection and copy of element panel contents
Summary: Inspector: Allow selection and copy of element panel contents
Status: RESOLVED WORKSFORME
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 17777
  Show dependency treegraph
 
Reported: 2010-01-15 13:52 PST by Daniel Bates
Modified: 2010-01-15 14:19 PST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Bates 2010-01-15 13:52:46 PST
We should allow selection and copying of the markup content in the elements panel.

Unlike View Source, the elements panel is capable of showing the hierarchy of programmatically generated DOM elements. When debugging a JavaScript application that generates such elements, it would be beneficial be able to copy such markup of the structure.

Also, we should be able to right click on a particular node and be able to either copy that the markup for that node or copy the markup for that node and its children.
Comment 1 Joseph Pecoraro 2010-01-15 13:58:29 PST
> We should allow selection and copying of the markup content in
> the elements panel.

That should already be possible. The copy shortcut copies the element's outerHTML, which includes both the element and its contents.

> Also, we should be able to right click on a particular node and be
> able to either copy that the markup for that node or copy the markup
> for that node and its children.

This should also be possible. "Copy as HTML" shows up in my right click menu.


Am I overlooking something?
Comment 2 Timothy Hatcher 2010-01-15 14:00:19 PST
You can already copy a node and its contents. Select it and Command - C. The context menu option "Copy as HTML" works too.

As far as arbitrary text selection, this is something we don't want to do. We want this to be  tree hierarchy and need node level selection so the sidebar can reflect properties about that selected node. Text selection does not work with this outline list model.
Comment 3 Daniel Bates 2010-01-15 14:19:46 PST
There is no such "Copy as HTML" when I right click on a node using Windows Safari 4.0.4. And neither selecting "copy" from the contextual menu nor Cntrl-C works (nothing is copied).

I tried to grab the last nightly, but for some reason the executable in the nightly does not work for me. That is, it opens Safari 4.0.4 but not with the latest WebKit. So, I will need to wait until I get home to test.