From 016ce0a9968c3b6ced19f23748f09b32000e5aa0 Mon Sep 17 00:00:00 2001 From: Matteo Ferretti Date: Wed, 1 Jun 2016 12:32:26 +0200 Subject: [PATCH] Bug 1260043 - removed `doc.hidden` check from markup/utils; r=ochameau MozReview-Commit-ID: BN2P5dfqerK --- .../actors/highlighters/utils/markup.js | 20 ++++++------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/devtools/server/actors/highlighters/utils/markup.js b/devtools/server/actors/highlighters/utils/markup.js index 7e4c48811fa9..5433f362cebd 100644 --- a/devtools/server/actors/highlighters/utils/markup.js +++ b/devtools/server/actors/highlighters/utils/markup.js @@ -265,20 +265,6 @@ CanvasFrameAnonymousContentHelper.prototype = { } let doc = this.highlighterEnv.document; - // On B2G, for example, when connecting to keyboard just after startup, - // we connect to a hidden document, which doesn't accept - // insertAnonymousContent call yet. - if (doc.hidden) { - // In such scenario, just wait for the document to be visible - // before injecting anonymous content. - let onVisibilityChange = () => { - doc.removeEventListener("visibilitychange", onVisibilityChange); - this._insert(); - }; - doc.addEventListener("visibilitychange", onVisibilityChange); - return; - } - // For now highlighters.css is injected in content as a ua sheet because //