Bug 1210795 - Part 6: Removes extra codes. r=pbro

MozReview-Commit-ID: 4SeJI0mimVk

--HG--
extra : rebase_source : f0533ace1b97ff705ecaa9f94c4b5ba641fe9676
This commit is contained in:
Daisuke Akatsuka 2016-10-26 16:37:19 +09:00
Родитель 1a667dc867
Коммит 0c7768e262
2 изменённых файлов: 1 добавлений и 29 удалений

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

@ -68,12 +68,9 @@ AnimationTimeBlock.prototype = {
// Create a container element to hold the delay and iterations.
// It is positioned according to its delay (divided by the playbackrate),
// and its width is according to its duration (divided by the playbackrate).
let {x, iterationW, delayX, delayW, negativeDelayW, endDelayX, endDelayW} =
const {x, delayX, delayW, endDelayX, endDelayW} =
TimeScale.getAnimationDimensions(animation);
// background properties for .iterations element
let backgroundIterations = TimeScale.getIterationsBackgroundData(animation);
// Animation summary graph element.
const summaryEl = createNode({
parent: this.containerEl,

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

@ -268,31 +268,6 @@ var TimeScale = {
return {x, w, iterationW, delayX, delayW, negativeDelayW,
endDelayX, endDelayW};
},
/**
* Given an animation, get the background data for .iterations element.
* This background represents iterationCount and iterationStart.
* Returns three properties.
* 1. size: x of background-size (%)
* 2. position: x of background-position (%)
* 3. repeat: background-repeat (string)
*/
getIterationsBackgroundData: function ({state}) {
let iterationCount = state.iterationCount || 1;
let iterationStartW = state.iterationStart % 1 * 100;
let background = {};
if (iterationCount == 1) {
background.size = 100 - iterationStartW;
background.position = 0;
background.repeat = "no-repeat";
} else {
background.size = 1 / iterationCount * 100;
background.position = -iterationStartW * background.size /
(100 - background.size);
background.repeat = "repeat-x";
}
return background;
}
};