WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
12054
Ability to serialize an element subtree (into clipboard?) from the DOM inspector
https://bugs.webkit.org/show_bug.cgi?id=12054
Summary
Ability to serialize an element subtree (into clipboard?) from the DOM inspector
Eric Seidel (no email)
Reported
2006-12-31 20:03:14 PST
Ability to serialize an element subtree (into clipboard?) from the DOM inspector This would be very useful when debugging SVGs. if a piece is not rendering (especially when it's rendered by javascript), the ability to just select that piece and serialize it to the clipboard would be very useful. Then I can paste it into a new file and debug.
Attachments
Patch
(4.73 KB, patch)
2007-11-09 23:54 PST
,
Timothy Hatcher
no flags
Details
Formatted Diff
Diff
Patch
(4.73 KB, patch)
2007-11-09 23:54 PST
,
Timothy Hatcher
mrowe
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Timothy Hatcher
Comment 1
2007-11-09 23:54:32 PST
Created
attachment 17165
[details]
Patch
Timothy Hatcher
Comment 2
2007-11-09 23:54:32 PST
Created
attachment 17166
[details]
Patch
Mark Rowe (bdash)
Comment 3
2007-11-10 00:00:33 PST
Comment on
attachment 17166
[details]
Patch r=me with the comment clarification Alexey mentioned in #webkit.
Adam Roben (:aroben)
Comment 4
2007-11-10 00:03:21 PST
Comment on
attachment 17166
[details]
Patch + and it's subtree is copied to the clipboard. If the node has no Typo: it's -> its + var data = this.focusedDOMNode.outerHTML; + if (!data) + data = this.focusedDOMNode.nodeValue; You should be able to use || for this. + if (this.currentFocusElement.handleCopyEvent) + event.preventDefault(); + else if (this.currentFocusElement.id && this.currentFocusElement.id.length && WebInspector[this.currentFocusElement.id + "Copy"]) + event.preventDefault(); I think this would be clearer with || instead of else if, though I suppose this way the code is more similar to documentCopy. r=me
Timothy Hatcher
Comment 5
2007-11-10 00:06:36 PST
Landed in
r27663
.
http://trac.webkit.org/projects/webkit/changeset/27663
Alexey Proskuryakov
Comment 6
2007-11-10 13:10:06 PST
I've been playing with this feature to see if it lets one copy text from password fields (it apparently doesn't), and noticed a quirk - copying via a context menu gives different results than copying via a keyboard shortcut. E.g. when copying an input element from the tree, I just get "input".
Timothy Hatcher
Comment 7
2007-11-10 13:14:50 PST
Right clicking selects the word under the mouse. And since there is a selection, we allow the normal copy path. I guess we should make this smarter somehow, but it will be tricky.
Timothy Hatcher
Comment 8
2007-11-10 16:57:23 PST
The word being selected on right-click is actually in the breadcrumb, not right under the mouse!
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug