diff --git a/browser/devtools/markupview/markup-view.js b/browser/devtools/markupview/markup-view.js index 8dad61e741a..02809e50a54 100644 --- a/browser/devtools/markupview/markup-view.js +++ b/browser/devtools/markupview/markup-view.js @@ -10,9 +10,6 @@ const {Cc, Cu, Ci} = require("chrome"); const PAGE_SIZE = 10; const PREVIEW_AREA = 700; const DEFAULT_MAX_CHILDREN = 100; -const COLLAPSE_ATTRIBUTE_LENGTH = 120; -const COLLAPSE_DATA_URL_REGEX = /^data.+base64/; -const COLLAPSE_DATA_URL_LENGTH = 60; const {UndoStack} = require("devtools/shared/undo"); const {editableField, InplaceEditor} = require("devtools/shared/inplace-editor"); @@ -1368,16 +1365,8 @@ ElementEditor.prototype = { this.attrs[aAttr.name] = attr; - let collapsedValue; - if (aAttr.value.match(COLLAPSE_DATA_URL_REGEX)) { - collapsedValue = truncateString(aAttr.value, COLLAPSE_DATA_URL_LENGTH); - } - else { - collapsedValue = truncateString(aAttr.value, COLLAPSE_ATTRIBUTE_LENGTH); - } - name.textContent = aAttr.name; - val.textContent = collapsedValue; + val.textContent = aAttr.value; return attr; }, @@ -1478,15 +1467,6 @@ function nodeDocument(node) { return node.ownerDocument || (node.nodeType == Ci.nsIDOMNode.DOCUMENT_NODE ? node : null); } -function truncateString(str, maxLength) { - if (str.length <= maxLength) { - return str; - } - - return str.substring(0, Math.ceil(maxLength / 2)) + - "…" + - str.substring(str.length - Math.floor(maxLength / 2)); -} /** * Parse attribute names and values from a string. * diff --git a/browser/devtools/markupview/test/browser_inspector_markup_edit.html b/browser/devtools/markupview/test/browser_inspector_markup_edit.html index ed8c1d1ffb7..d49b4372488 100644 --- a/browser/devtools/markupview/test/browser_inspector_markup_edit.html +++ b/browser/devtools/markupview/test/browser_inspector_markup_edit.html @@ -42,7 +42,5 @@
- -