Backed out changeset 2fda05fd4c87 (bug 1231932) for clipboard failures in devtools inspector tests a=backout

MozReview-Commit-ID: KUYXEqTyd9P
This commit is contained in:
Wes Kocher 2017-02-16 09:14:07 -08:00
parent fb547d31c7
commit 650bb0a9e4
4 changed files with 1 additions and 30 deletions

View File

@ -1283,14 +1283,6 @@ Inspector.prototype = {
disabled: !isEditableElement,
click: () => this.onAddAttribute(),
}));
attributesSubmenu.append(new MenuItem({
id: "node-menu-copy-attribute",
label: INSPECTOR_L10N.getFormatStr("inspectorCopyAttributeValue.label",
isAttributeClicked ? `"${nodeInfo.value}"` : ""),
accesskey: INSPECTOR_L10N.getStr("inspectorCopyAttributeValue.accesskey"),
disabled: !isAttributeClicked,
click: () => this.onCopyAttributeValue(),
}));
attributesSubmenu.append(new MenuItem({
id: "node-menu-edit-attribute",
label: INSPECTOR_L10N.getFormatStr("inspectorEditAttribute.label",
@ -1299,6 +1291,7 @@ Inspector.prototype = {
disabled: !isAttributeClicked,
click: () => this.onEditAttribute(),
}));
attributesSubmenu.append(new MenuItem({
id: "node-menu-remove-attribute",
label: INSPECTOR_L10N.getFormatStr("inspectorRemoveAttribute.label",
@ -1824,14 +1817,6 @@ Inspector.prototype = {
container.addAttribute();
},
/**
* Copy attribute value for node.
* Used for node context menu and shouldn't be called directly.
*/
onCopyAttributeValue: function () {
clipboardHelper.copyString(this.nodeMenuTriggerInfo.value);
},
/**
* Edit attribute for node.
* Used for node context menu and shouldn't be called directly.

View File

@ -35,7 +35,6 @@ const ALL_MENU_ITEMS = [
"node-menu-scrollnodeintoview",
"node-menu-screenshotnode",
"node-menu-add-attribute",
"node-menu-copy-attribute",
"node-menu-edit-attribute",
"node-menu-remove-attribute"
].concat(PASTE_MENU_ITEMS, ACTIVE_ON_DOCTYPE_ITEMS);

View File

@ -38,12 +38,6 @@ const COPY_ITEMS_TEST_DATA = [
text: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABC" +
"AAAAAA6fptVAAAACklEQVQYV2P4DwABAQEAWk1v8QAAAABJRU5ErkJggg==",
},
{
desc: "copy attribute value",
id: "node-menu-copy-attribute",
selector: "[data-id=\"copy\"]",
text: "<p data-id=\"copy\">Paragraph for testing copy</p>",
},
];
add_task(function* () {

View File

@ -117,13 +117,6 @@ inspectorEditAttribute.accesskey=E
inspectorRemoveAttribute.label=Remove Attribute %S
inspectorRemoveAttribute.accesskey=R
# LOCALIZATION NOTE (inspectorCopyAttributeValue.label): This is the label of a
# sub-menu "Attribute" in the inspector contextual-menu that appears
# when the user right-clicks on the attribute of a node in the inspector,
# and that allows to copy the attribute value to the clipboard.
inspectorCopyAttributeValue.label=Copy Attribute Value %S
inspectorCopyAttributeValue.accesskey=V
# LOCALIZATION NOTE (inspector.nodePreview.selectNodeLabel):
# This string is displayed in a tooltip that is shown when hovering over a DOM
# node preview (e.g. something like "div#foo.bar").