Bug 1307710 - part2: webvtt cue voice span and language span need annotation. r=rillian
authorbechen <bechen@mozilla.com>
Wed, 01 Mar 2017 15:16:51 +0800
changeset 394827 e99bfc26ca21060d520dc1e9e94ce017850c1278
parent 394826 d67ed0a837948a3fb998458788b893ecdb549c30
child 394828 73b6ba6b82a0c0427c670ad5b278397d6b630400
push id1468
push userasasaki@mozilla.com
push dateMon, 05 Jun 2017 19:31:07 +0000
treeherdermozilla-release@0641fc6ee9d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrillian
bugs1307710
milestone54.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 1307710 - part2: webvtt cue voice span and language span need annotation. r=rillian MozReview-Commit-ID: FqUMAt436ZP
dom/media/webvtt/vtt.jsm
--- a/dom/media/webvtt/vtt.jsm
+++ b/dom/media/webvtt/vtt.jsm
@@ -342,18 +342,18 @@ Cu.import('resource://gre/modules/Servic
     function createElement(type, annotation) {
       var tagName = TAG_NAME[type];
       if (!tagName) {
         return null;
       }
       var element = window.document.createElement(tagName);
       element.localName = tagName;
       var name = TAG_ANNOTATION[type];
-      if (name && annotation) {
-        element[name] = annotation.trim();
+      if (name) {
+        element[name] = annotation ? annotation.trim() : "";
       }
       return element;
     }
 
     var root;
     if (bReturnFrag) {
       root = window.document.createDocumentFragment();
     } else {