Bug 1010707 - don't adjust position when line-height is zero.
authorAlastor Wu <alwu@mozilla.com>
Tue, 31 May 2016 10:15:31 +0800
changeset 340625 109250561b779e707f1f8cde8f54da8f6efb4c06
parent 340624 066a18a85a040f75d88d182767b9a47aa7b0c2fc
child 340626 c27e49247fe28294d7f04e54d00ab389b5e57378
push id1183
push userraliiev@mozilla.com
push dateMon, 05 Sep 2016 20:01:49 +0000
treeherdermozilla-release@3148731bed45 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1010707
milestone49.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1010707 - don't adjust position when line-height is zero. MozReview-Commit-ID: FhGWCtJVcdp
dom/media/webvtt/vtt.jsm
--- a/dom/media/webvtt/vtt.jsm
+++ b/dom/media/webvtt/vtt.jsm
@@ -1046,16 +1046,20 @@ this.EXPORTED_SYMBOLS = ["WebVTT"];
         break;
       }
 
       var step = boxPosition.lineHeight,
           position = step * Math.round(linePos),
           maxPosition = containerBox[size] + step,
           initialAxis = axis[0];
 
+      if (step == 0) {
+        return;
+      }
+
       // If the specified intial position is greater then the max position then
       // clamp the box to the amount of steps it would take for the box to
       // reach the max position.
       if (Math.abs(position) > maxPosition) {
         position = position < 0 ? -1 : 1;
         position *= Math.ceil(maxPosition / step) * step;
       }