diff --git a/toolkit/content/tests/reftests/reftest.list b/toolkit/content/tests/reftests/reftest.list index a37a9722a523..b59bd946ea07 100644 --- a/toolkit/content/tests/reftests/reftest.list +++ b/toolkit/content/tests/reftests/reftest.list @@ -1,2 +1,3 @@ random-if(cocoaWidget) == bug-442419-progressmeter-max.xul bug-442419-progressmeter-max-ref.xul # fails most of the time on Mac because progress meter animates != textbox-multiline-default-value.xul textbox-multiline-empty.xul +== videocontrols-dynamically-add-cc.html videocontrols-dynamically-add-cc-ref.html diff --git a/toolkit/content/tests/reftests/videocontrols-dynamically-add-cc-ref.html b/toolkit/content/tests/reftests/videocontrols-dynamically-add-cc-ref.html new file mode 100644 index 000000000000..0db1aa5c0e3e --- /dev/null +++ b/toolkit/content/tests/reftests/videocontrols-dynamically-add-cc-ref.html @@ -0,0 +1,40 @@ + + + + + + + + +
+ + + + diff --git a/toolkit/content/tests/reftests/videocontrols-dynamically-add-cc.html b/toolkit/content/tests/reftests/videocontrols-dynamically-add-cc.html new file mode 100644 index 000000000000..b21b86370d5a --- /dev/null +++ b/toolkit/content/tests/reftests/videocontrols-dynamically-add-cc.html @@ -0,0 +1,52 @@ + + + + + + + + +
+ + + + diff --git a/toolkit/content/widgets/videocontrols.xml b/toolkit/content/widgets/videocontrols.xml index e0cdc0264461..f554ce4eac0e 100644 --- a/toolkit/content/widgets/videocontrols.xml +++ b/toolkit/content/widgets/videocontrols.xml @@ -1499,8 +1499,6 @@ return; } - this.closedCaptionButton.removeAttribute("hidden"); - if (this.isClosedCaptionOn()) { this.closedCaptionButton.setAttribute("enabled", "true"); } else { @@ -1710,15 +1708,9 @@ this.volumeStack ]; - if (this.controlBar.hasAttribute("fullscreen-unavailable")) { - this.fullscreenButton.isWanted = false; - } - if (!this.isClosedCaptionAvailable) { - this.closedCaptionButton.isWanted = false; - } - if (this.muteButton.hasAttribute("noAudio")) { - this.volumeStack.isWanted = false; - } + this.fullscreenButton.isWanted = !this.controlBar.hasAttribute("fullscreen-unavailable"); + this.closedCaptionButton.isWanted = this.isClosedCaptionAvailable; + this.volumeStack.isWanted = !this.muteButton.hasAttribute("noAudio"); let widthUsed = minControlBarPaddingWidth; let preventAppendControl = false;