forked from mirrors/gecko-dev
Bug 1431255 - Part IV, Load videocontrols.js, migrated from videoControls binding r=jaws
videocontrols.js handles the controls attribute with a callback named "onattributechange" called by UAWidgets, replaces the CSS selectors. MozReview-Commit-ID: 8rrw0Pbu8Dj --HG-- rename : toolkit/content/widgets/videocontrols.xml => toolkit/content/widgets/videocontrols.js extra : rebase_source : 8d8a38afac0273621f711b988c1be82d04865e33
This commit is contained in:
parent
bfd7aeb85d
commit
3fc48b5fcd
4 changed files with 2416 additions and 1 deletions
|
|
@ -103,6 +103,7 @@ toolkit.jar:
|
||||||
content/global/elements/general.js (widgets/general.js)
|
content/global/elements/general.js (widgets/general.js)
|
||||||
content/global/elements/stringbundle.js (widgets/stringbundle.js)
|
content/global/elements/stringbundle.js (widgets/stringbundle.js)
|
||||||
content/global/elements/textbox.js (widgets/textbox.js)
|
content/global/elements/textbox.js (widgets/textbox.js)
|
||||||
|
content/global/elements/videocontrols.js (widgets/videocontrols.js)
|
||||||
#ifdef XP_MACOSX
|
#ifdef XP_MACOSX
|
||||||
content/global/macWindowMenu.js
|
content/global/macWindowMenu.js
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,25 @@
|
||||||
isnot(controlBar.clientWidth, originalControlBarWidth, "new width should differ from the origianl width");
|
isnot(controlBar.clientWidth, originalControlBarWidth, "new width should differ from the origianl width");
|
||||||
is(controlBar.clientWidth, 400, "controlbar's width should grow with audio width");
|
is(controlBar.clientWidth, 400, "controlbar's width should grow with audio width");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
add_task(function check_audio_height_construction_sync() {
|
||||||
|
let el = new Audio();
|
||||||
|
el.src = "audio.wav";
|
||||||
|
el.controls = true;
|
||||||
|
document.body.appendChild(el);
|
||||||
|
is(el.clientHeight, 40, "Height of audio element with controls");
|
||||||
|
document.body.removeChild(el);
|
||||||
|
});
|
||||||
|
|
||||||
|
add_task(function check_audio_height_add_control_sync() {
|
||||||
|
let el = new Audio();
|
||||||
|
el.src = "audio.wav";
|
||||||
|
document.body.appendChild(el);
|
||||||
|
is(el.clientHeight, 0, "Height of audio element without controls");
|
||||||
|
el.controls = true;
|
||||||
|
is(el.clientHeight, 40, "Height of audio element with controls");
|
||||||
|
document.body.removeChild(el);
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
</pre>
|
</pre>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
||||||
2394
toolkit/content/widgets/videocontrols.js
Normal file
2394
toolkit/content/widgets/videocontrols.js
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -6,7 +6,8 @@
|
||||||
@namespace url("http://www.w3.org/1999/xhtml");
|
@namespace url("http://www.w3.org/1999/xhtml");
|
||||||
|
|
||||||
video > xul|videocontrols,
|
video > xul|videocontrols,
|
||||||
audio > xul|videocontrols {
|
audio > xul|videocontrols,
|
||||||
|
.videocontrols {
|
||||||
writing-mode: horizontal-tb;
|
writing-mode: horizontal-tb;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue