Getting rid of build changes.
Getting rid of the rest of the build changes.
Don't create and append a caption div if you don't have a video element.

"Based on the definition of the <track> element's @kind attribute, it seems subtitles and captions should only be shown on <video> elements:
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#attr-track-kind

Indeed, the spec authors seem to be saying here that if you want subtitles on an audio element, you should use a video element instead:
https://www.w3.org/Bugs/Public/show_bug.cgi?id=20898

So assuming we only need the caption div for subtitles and captions, I think we should only create it inside the if(HasVideoElement()) block."
"Don't reuse the 'element' declaration. Use a new Element* declaratoin or just directly assign to mCaptionDiv."
Get rid of testing the content of the caption div.
Subtract computed mCaptionDiv's border-padding when setting the computed width/height.