Bug 1186890 - Ensure parent always know when the child exit fullscreen. r=Dolske

This commit is contained in:
Xidorn Quan 2015-08-07 13:38:10 +10:00
parent 97abad403c
commit 36df95aa86
2 changed files with 7 additions and 1 deletions

View File

@ -646,6 +646,12 @@ let DOMFullscreenHandler = {
case "MozDOMFullscreen:Entered":
case "MozDOMFullscreen:Exited": {
addEventListener("MozAfterPaint", this);
if (!content || !content.document.mozFullScreen) {
// If we receive any fullscreen change event, and find we are
// actually not in fullscreen, also ask the parent to exit to
// ensure that the parent always exits fullscreen when we do.
sendAsyncMessage("DOMFullscreen:Exit");
}
break;
}
case "MozAfterPaint": {

View File

@ -38,7 +38,7 @@ STYLE_STRUCTS = [("INHERITED",) + x for x in [
("Background", "nullptr", NORMAL_DEP + LENGTH_DEP + COLOR_DEP),
("Position", "nullptr", NORMAL_DEP + LENGTH_DEP),
("TextReset", "nullptr", NORMAL_DEP + LENGTH_DEP + COLOR_DEP),
("Display", "nullptr", NORMAL_DEP + LENGTH_DEP),
("Display", "nullptr", NORMAL_DEP),
("Content", "nullptr", NORMAL_DEP + LENGTH_DEP),
("UIReset", "nullptr", NORMAL_DEP),
("Table", "nullptr", NORMAL_DEP),