mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-04 15:51:37 +00:00
Bug 1571908 - part2 : return null if we can't place the cue box inside the video rendering area. r=heycam
When adjusting the position of the cue box, if we can't find a proper place to display the cue within the video rendering area, we should return `null` and not to show it on the screen. Differential Revision: https://phabricator.services.mozilla.com/D40901 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
80cb50a3a9
commit
f5fee479ba
@ -1065,6 +1065,11 @@ XPCOMUtils.defineLazyPreferenceGetter(this, "DEBUG_LOG",
|
||||
box = specifiedPosition.clone();
|
||||
}
|
||||
|
||||
// Can not find a place to place this box inside the rendering area.
|
||||
if (!box.within(containerBox)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
styleBox.applyStyles({
|
||||
top: getPercentagePosition(box.top, containerBox.height),
|
||||
left: getPercentagePosition(box.left, containerBox.width),
|
||||
|
Loading…
x
Reference in New Issue
Block a user