<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>16396</bug_id>
          
          <creation_ts>2007-12-10 23:12:17 -0800</creation_ts>
          <short_desc>Cannot select text in the Inspector DOM tree to copy</short_desc>
          <delta_ts>2010-01-04 02:55:14 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Web Inspector (Deprecated)</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Gavin Sherlock">gsherloc</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ddkilzer</cc>
    
    <cc>pfeldman</cc>
    
    <cc>timothy</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>63900</commentid>
    <comment_count>0</comment_count>
    <who name="Gavin Sherlock">gsherloc</who>
    <bug_when>2007-12-10 23:12:17 -0800</bug_when>
    <thetext>When viewing source code in the Inspector window, sometimes you would like to copy some of it.  Currently this functionality does not exists.  Tested with r28586.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63999</commentid>
    <comment_count>1</comment_count>
    <who name="Gavin Sherlock">gsherloc</who>
    <bug_when>2007-12-11 23:31:41 -0800</bug_when>
    <thetext>I just realized that you can copy the code in Source view, whereas I was looking in DOM view in the Inspector.  Thus closing as WORKSFORME</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64020</commentid>
    <comment_count>2</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-12-12 06:37:08 -0800</bug_when>
    <thetext>I&apos;ve tried copying HTML from the DOM view before and been frustrated.  You shouldn&apos;t have to switch to the source view (and loose your place) just to copy HTML.  Also, the source view will differ from the DOM view if the DOM has changed since loading the page.

Reopening and retitling bug.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64022</commentid>
    <comment_count>3</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-12-12 07:00:01 -0800</bug_when>
    <thetext>For example, this would be really handy for reducing Bug 16403.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64024</commentid>
    <comment_count>4</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2007-12-12 08:09:07 -0800</bug_when>
    <thetext>(In reply to comment #2)
&gt; I&apos;ve tried copying HTML from the DOM view before and been frustrated.  You
&gt; shouldn&apos;t have to switch to the source view (and loose your place) just to copy
&gt; HTML.  Also, the source view will differ from the DOM view if the DOM has
&gt; changed since loading the page.
&gt; 
&gt; Reopening and retitling bug.

Is this not a dup of bug 12054?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64156</commentid>
    <comment_count>5</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-12-14 07:44:19 -0800</bug_when>
    <thetext>(In reply to comment #4)
&gt; Is this not a dup of bug 12054?

I can&apos;t get it to work as expected.  Do I click on the breadcrumb at the bottom of the window to copy the HTML, or an item in the DOM tree itself?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64171</commentid>
    <comment_count>6</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2007-12-14 10:29:45 -0800</bug_when>
    <thetext>(In reply to comment #5)
&gt; (In reply to comment #4)
&gt; &gt; Is this not a dup of bug 12054?
&gt; 
&gt; I can&apos;t get it to work as expected.  Do I click on the breadcrumb at the bottom
&gt; of the window to copy the HTML, or an item in the DOM tree itself?

Tim might know.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64182</commentid>
    <comment_count>7</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2007-12-14 10:54:15 -0800</bug_when>
    <thetext>Clicking an item in the DOM tree or breadcrumb then typing Command-C will copy it.

Are you copying with the context menu or the keyboard command? You might be hitting bug 16439.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64185</commentid>
    <comment_count>8</comment_count>
    <who name="Gavin Sherlock">gsherloc</who>
    <bug_when>2007-12-14 10:58:40 -0800</bug_when>
    <thetext>I was trying to simply select text in the DOM using the cursor, which I would then copy using the keyboard, but you cannot do this except for an entire DOM node.  You cannot select specific text at all using the cursor.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64188</commentid>
    <comment_count>9</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-12-14 11:04:29 -0800</bug_when>
    <thetext>(In reply to comment #7)
&gt; Clicking an item in the DOM tree or breadcrumb then typing Command-C will copy
&gt; it.
&gt; 
&gt; Are you copying with the context menu or the keyboard command? You might be
&gt; hitting bug 16439.

Yes, I was using the contextual menu in the DOM view, not the breadcrumbs.

If we were to allow selections in the DOM view (as in Comment #8), there should be a way to expand all nodes under a given node (or the copy operation should just magically pick them up without being expanded, IMO).

Right now, I&apos;m using a JavaScript alert dialog to get the current DOM for a page, e.g.:

1. Load page.
2. Type in URL:  javascript:alert(document.documentElement.outerHTML)
3. Hit Enter
4. Click in alert sheet.
5. Hit Cmd-A to select all.
6. Hit Cmd-C to copy the HTML.
7. Click &quot;Okay&quot; to dismiss the alert sheet.
8. Paste your HTML somewhere useful.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64191</commentid>
    <comment_count>10</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2007-12-14 11:11:47 -0800</bug_when>
    <thetext>Well the fix for bug 12054 allows copying the currently selected node (outerHTML) with Command-C. Copying with the context menu is broken and is tracked with bug 16439. We can use this bug to track allowing copying with a selection in the DOM tree.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68649</commentid>
    <comment_count>11</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2008-01-29 11:07:43 -0800</bug_when>
    <thetext>&lt;rdar://problem/5712880&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>176633</commentid>
    <comment_count>12</comment_count>
    <who name="Pavel Feldman">pfeldman</who>
    <bug_when>2010-01-04 02:55:14 -0800</bug_when>
    <thetext>Elements Panel provides structural view of the DOM. One can only select nodes there. For each selected node, &apos;Copy as HTML&apos; action is available via shortcut, context menu or main menu item. It will put HTML markup (outerHTML) for that node into clipboard as text. You can also invoke Edit as HTML from context menu and copy parts of the text into clipboard.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>