Bug 1516292 - Use isSameNode() to compare mozFullScreenElement and the video host element r=edgar

This does what's done in bug 1505547 but in a different way. For some reason, access
shadowRoot.host in the function can trigger an assertion.

this.video is a Proxy so it cannot be compared, but all its methods are proxied.

Differential Revision: https://phabricator.services.mozilla.com/D15767

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Timothy Guan-tin Chien 2019-01-07 16:00:55 +00:00
parent f1f86e050a
commit d17b51ff5d
3 changed files with 18 additions and 2 deletions

View File

@ -0,0 +1,16 @@
<script>
function go() {
a.children[0].appendChild(b)
}
</script>
<body onload=go()>
<svg id="a">
<foreignObject>
<li>
<video controls="" autoplay="">
<li id="a" contenteditable="true">
</li>
</svg>
<canvas id="b">
<svg>
<use xlink:href="#a">

View File

@ -27,3 +27,4 @@ skip-if(Android) load 1490700.html # No screenshare on Android
load 1505957.html
load 1511130.html
load 1510848.html
load 1516292.html

View File

@ -1299,8 +1299,7 @@ this.VideoControlsImplWidget = class {
},
get isVideoInFullScreen() {
let element = this.shadowRoot.host;
return element.getRootNode().mozFullScreenElement == element;
return this.video.isSameNode(this.video.getRootNode().mozFullScreenElement);
},
toggleFullscreen() {