Bug 1274104 part 2 - Use SpecialPowers rather than chrome-only things. r=jaws

MozReview-Commit-ID: Bgtizyh1iSX

--HG--
extra : source : c0dbc57963f33e1ff0f92a0e7a6919d8496c6f09
This commit is contained in:
Xidorn Quan 2016-05-25 09:39:38 +10:00
parent 67c37d08a3
commit 242697acbf

View File

@ -52,12 +52,14 @@ const scrubberCenterY = videoHeight - Math.round(scrubberHeight / 2);
var testnum = 1;
var video = document.getElementById("video");
const domUtil = SpecialPowers.Cc["@mozilla.org/inspector/dom-utils;1"]
.getService(SpecialPowers.Ci.inIDOMUtils);
function getButtonByAttribute(aName, aValue) {
var domUtil = Components.classes["@mozilla.org/inspector/dom-utils;1"]
.getService(Components.interfaces.inIDOMUtils);
var kids = domUtil.getChildrenForNode(video, true);
var videocontrols = kids[1];
return document.getAnonymousElementByAttribute(videocontrols, aName, aValue);
return SpecialPowers.wrap(document)
.getAnonymousElementByAttribute(videocontrols, aName, aValue);
}
function isMuteButtonMuted() {