Changeset 52440 in webkit


Ignore:
Timestamp:
Dec 21, 2009 3:10:56 AM (14 years ago)
Author:
pfeldman@chromium.org
Message:

2009-12-20 Pavel Feldman <pfeldman@chromium.org>

Reviewed by Timothy Hatcher.

Web Inspector: Can’t copy outer html of selected node.
Also adds "Copy as HTML" context menu item.

https://bugs.webkit.org/show_bug.cgi?id=32802

  • English.lproj/localizedStrings.js:
  • inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeElement.prototype._populateTagContextMenu):
  • inspector/front-end/inspector.js: (WebInspector.documentCanCopy):
Location:
trunk/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r52439 r52440  
     12009-12-20  Pavel Feldman  <pfeldman@chromium.org>
     2
     3        Reviewed by Timothy Hatcher.
     4
     5        Web Inspector: Can’t copy outer html of selected node.
     6        Also adds "Copy as HTML" context menu item.
     7
     8        https://bugs.webkit.org/show_bug.cgi?id=32802
     9
     10        * English.lproj/localizedStrings.js:
     11        * inspector/front-end/ElementsTreeOutline.js:
     12        (WebInspector.ElementsTreeElement.prototype._populateTagContextMenu):
     13        * inspector/front-end/inspector.js:
     14        (WebInspector.documentCanCopy):
     15
    1162009-12-20  Pavel Feldman  <pfeldman@chromium.org>
    217
  • trunk/WebCore/inspector/front-end/ElementsTreeOutline.js

    r52168 r52440  
    604604
    605605        // Add node-related actions.
     606        contextMenu.appendItem(WebInspector.UIString("Copy as HTML"), this._copyHTML.bind(this));
    606607        contextMenu.appendItem(WebInspector.UIString("Delete Node"), this.remove.bind(this));
    607608    },
     
    960961        var callId = WebInspector.Callback.wrap(removeNodeCallback);
    961962        InspectorBackend.removeNode(callId, this.representedObject.id);
     963    },
     964
     965    _copyHTML: function(node)
     966    {
     967        InspectorBackend.copyNode(this.representedObject.id);
    962968    }
    963969}
  • trunk/WebCore/inspector/front-end/inspector.js

    r52415 r52440  
    728728WebInspector.documentCanCopy = function(event)
    729729{
    730     return this.currentPanel && this.currentPanel.handleCopyEvent;
     730    if (this.currentPanel && this.currentPanel.handleCopyEvent)
     731        event.preventDefault();
    731732}
    732733
Note: See TracChangeset for help on using the changeset viewer.