diff --git a/toolkit/content/widgets/videocontrols.css b/toolkit/content/widgets/videocontrols.css index b3ef938fb82..3be9c0dfb26 100644 --- a/toolkit/content/widgets/videocontrols.css +++ b/toolkit/content/widgets/videocontrols.css @@ -53,3 +53,18 @@ .statusOverlay[fadeout] { opacity: 0; } + +.controlBar[size="hidden"], +.controlBar[size="small"] .durationBox, +.controlBar[size="small"] .durationLabel, +.controlBar[size="small"] .positionLabel { + visibility: collapse; +} + +.controlBar[size="small"] .scrubberStack { + visibility: hidden; +} + +.controlBar[size="small"] .scrubberStack > * { + visibility: hidden; +} diff --git a/toolkit/content/widgets/videocontrols.xml b/toolkit/content/widgets/videocontrols.xml index cbbb04ce169..cf595c4d0b8 100644 --- a/toolkit/content/widgets/videocontrols.xml +++ b/toolkit/content/widgets/videocontrols.xml @@ -343,6 +343,17 @@ this.statusIcon.setAttribute("type", "throbber"); this.setupStatusFader(); } + + // An event handler for |onresize| should be added when bug 227495 is fixed. + let controlBarWasHidden = this.controlBar.getAttribute("hidden") == "true"; + this.controlBar.removeAttribute("hidden"); + this._playButtonWidth = this.playButton.clientWidth; + this._durationLabelWidth = this.durationLabel.clientWidth; + this._muteButtonWidth = this.muteButton.clientWidth; + this._controlBarHeight = this.controlBar.clientHeight; + if (controlBarWasHidden) + this.controlBar.setAttribute("hidden", "true"); + this.adjustControlSize(); }, get dynamicControls() { @@ -400,6 +411,7 @@ this.volumeControl.value = volume; break; case "loadedmetadata": + this.adjustControlSize(); // If a