Backed out changeset ef7e530aff4f (bug 1168092) for failing modified devtools test devtools/client/inspector/rules/test/browser_rules_edit-property-increments.js on Windows 7 pgo with e10s and on Windows 7 debug without e10s. r=backout

--HG--
extra : rebase_source : c39ad8c38f726bf60a12fd0fa79e8d8bdae644d4
This commit is contained in:
Sebastian Hengst 2017-10-09 22:53:47 +02:00
Родитель a81f8e9be1
Коммит f0fe9707a7
3 изменённых файлов: 2 добавлений и 29 удалений

Просмотреть файл

@ -20,7 +20,6 @@ const TEST_URI = `
background: none;
transition: initial;
z-index: 0;
opacity: 1;
}
</style>
<div id="test"></div>
@ -40,7 +39,6 @@ add_task(function* () {
yield testShorthandIncrements(view);
yield testOddCases(view);
yield testZeroValueIncrements(view);
yield testOpacityIncrements(view);
});
function* testMarginIncrements(view) {
@ -229,27 +227,6 @@ function* testZeroValueIncrements(view) {
});
}
function* testOpacityIncrements(view) {
info("Testing keyboard increments on the opacity property");
let idRuleEditor = getRuleViewRuleEditor(view, 1);
let opacityPropEditor = idRuleEditor.rule.textProps[7].editor;
yield runIncrementTest(opacityPropEditor, view, {
1: {alt: true, start: "0.5", end: "0.51", selectAll: true},
2: {start: "0", end: "0.1", selectAll: true},
3: {shift: true, start: "0", end: "1", selectAll: true},
4: {down: true, alt: true, start: "0.1", end: "0.09", selectAll: true},
5: {down: true, start: "0", end: "-0.1", selectAll: true},
6: {down: true, shift: true, start: "0", end: "-1", selectAll: true},
7: {pageUp: true, shift: true, start: "0", end: "10", selectAll: true},
8: {pageDown: true, shift: true, start: "0", end: "-10",
selectAll: true},
9: {start: "0.7", end: "0.8", selectAll: true},
10: {down: true, start: "0", end: "-0.1", selectAll: true},
});
}
function* runIncrementTest(propertyEditor, view, tests) {
let editor = yield focusEditableField(view, propertyEditor.valueSpan);

Просмотреть файл

@ -295,7 +295,6 @@ TextPropertyEditor.prototype = {
advanceChars: advanceValidate,
contentType: InplaceEditor.CONTENT_TYPES.CSS_VALUE,
property: this.prop,
defaultIncrement: this.prop.name === "opacity" ? 0.1 : 1,
popup: this.popup,
multiline: true,
maxWidth: () => this.container.getBoundingClientRect().width,

Просмотреть файл

@ -122,8 +122,6 @@ function isKeyIn(key, ...keys) {
* from `element` to the new input.
* defaults to false
* {Object} cssProperties: An instance of CSSProperties.
* {Number} defaultIncrement: The value by which the input is incremented
* or decremented by default (0.1 for properties like opacity and 1 by default)
*/
function editableField(options) {
return editableItem(options, function (element, event) {
@ -227,7 +225,6 @@ function InplaceEditor(options, event) {
this.change = options.change;
this.done = options.done;
this.contextMenu = options.contextMenu;
this.defaultIncrement = options.defaultIncrement || 1;
this.destroy = options.destroy;
this.initial = options.initial ? options.initial : this.elt.textContent;
this.multiline = options.multiline || false;
@ -1212,9 +1209,9 @@ InplaceEditor.prototype = {
let key = event.keyCode;
if (isKeyIn(key, "UP", "PAGE_UP")) {
increment = 1 * this.defaultIncrement;
increment = 1;
} else if (isKeyIn(key, "DOWN", "PAGE_DOWN")) {
increment = -1 * this.defaultIncrement;
increment = -1;
}
if (event.shiftKey && !event.altKey) {