Bug 1210796 - Part 5: Add aniamted property's progress line tick. r=pbro draft
authorDaisuke Akatsuka <daisuke@mozilla-japan.org>
Tue, 18 Apr 2017 12:15:55 +0900
changeset 564118 f76962e7b3f29ab5f535e5921971e817db0a1995
parent 564117 da96aa2d8c8e0c6aa96fc350ba4a828417314ba5
child 564119 f7d9f699f73aadbd48f9f1726dc397386b172c66
push id54524
push userbmo:dakatsuka@mozilla.com
push dateTue, 18 Apr 2017 09:24:06 +0000
reviewerspbro
bugs1210796
milestone55.0a1
Bug 1210796 - Part 5: Add aniamted property's progress line tick. r=pbro MozReview-Commit-ID: Dwuoq3TD95G
devtools/client/animationinspector/components/animation-details.js
devtools/client/themes/animationinspector.css
--- a/devtools/client/animationinspector/components/animation-details.js
+++ b/devtools/client/animationinspector/components/animation-details.js
@@ -203,27 +203,38 @@ AnimationDetails.prototype = {
 
   renderAnimatedPropertiesHeader: function () {
     // Add animated property header.
     const headerEl = createNode({
       parent: this.containerEl,
       attributes: { "class": "animated-properties-header property" }
     });
 
+    // Add progress tick container.
+    const progressTickContainerEl = createNode({
+      parent: headerEl,
+      attributes: { "class": "progress-tick-container track-container" }
+    });
+
     // Add label container.
     const headerLabelContainerEl = createNode({
       parent: headerEl,
       attributes: { "class": "track-container" }
     });
 
     // Add labels
     for (let label of [L10N.getFormatStr("detail.propertiesHeader.percentage", 0),
                        L10N.getFormatStr("detail.propertiesHeader.percentage", 50),
                        L10N.getFormatStr("detail.propertiesHeader.percentage", 100)]) {
       createNode({
+        parent: progressTickContainerEl,
+        nodeType: "span",
+        attributes: { "class": "progress-tick" }
+      });
+      createNode({
         parent: headerLabelContainerEl,
         nodeType: "label",
         attributes: { "class": "header-item" },
         textContent: label
       });
     }
   },
 
--- a/devtools/client/themes/animationinspector.css
+++ b/devtools/client/themes/animationinspector.css
@@ -316,16 +316,17 @@ body {
   height: var(--timeline-animation-height);
   overflow: hidden;
 }
 
 .animation-timeline .time-body {
   height: 100%;
 }
 
+.progress-tick-container .progress-tick,
 .animation-timeline .time-body .time-tick {
   -moz-user-select: none;
   position: absolute;
   width: 0;
   /* When scroll bar is shown, make it covers entire time-body */
   height: 100%;
   /* When scroll bar is hidden, make it as tall as the viewport minus the
      timeline animation height and the header-wrapper's borders */
@@ -680,8 +681,16 @@ body {
   left: 50%;
 }
 
 .animated-properties-header .header-item:nth-child(3) {
   right: 0;
   border-left: none;
   border-right: 0.5px solid var(--time-graduation-border-color);
 }
+
+.progress-tick-container .progress-tick:nth-child(2) {
+  left: 50%;
+}
+
+.progress-tick-container .progress-tick:nth-child(3) {
+  left: 100%;
+}