/**
* @param {boolean} showHighlight
* @param {string} mode
- * @param {?Event} event
+ * @param {!Event} event
*/
_highlightDOMNode: function(showHighlight, mode, event)
{
this._applyUserInput(element, replacementString, originalValue, context, false);
}
- function customNumberHandler(number)
+ /**
+ * @param {string} prefix
+ * @param {number} number
+ * @param {string} suffix
+ * @return {string}
+ */
+ function customNumberHandler(prefix, number, suffix)
{
if (styleProperty !== "margin" && number < 0)
number = 0;
- return number;
+ return prefix + number + suffix;
}
WebInspector.handleElementValueModifications(event, element, finishHandler.bind(this), undefined, customNumberHandler);
if (computedStyle.getPropertyValue("box-sizing") === "border-box" && (styleProperty === "width" || styleProperty === "height")) {
if (!userInput.match(/px$/)) {
- WebInspector.messageSink.addErrorMessage("For elements with box-sizing: border-box, only absolute content area dimensions can be applied", true);
+ WebInspector.console.error("For elements with box-sizing: border-box, only absolute content area dimensions can be applied");
return;
}