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 345850 e99bfc26ca21060d520dc1e9e94ce017850c1278
parent 345849 d67ed0a837948a3fb998458788b893ecdb549c30
child 345851 73b6ba6b82a0c0427c670ad5b278397d6b630400
push id31451
push usercbook@mozilla.com
push dateMon, 06 Mar 2017 09:52:09 +0000
treeherdermozilla-central@7099e03837e8 [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 {