mirror of https://github.com/roytam1/boc-uxp.git
209 changed files with 1 additions and 21214 deletions
@ -1,14 +0,0 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public |
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this |
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
pref("inspector.blink.border-color", "#CC0000"); |
||||
pref("inspector.blink.border-width", 2); |
||||
pref("inspector.blink.duration", 1200); |
||||
pref("inspector.blink.on", true); |
||||
pref("inspector.blink.speed", 100); |
||||
pref("inspector.blink.invert", false); |
||||
pref("inspector.dom.showAnon", true); |
||||
pref("inspector.dom.showWhitespaceNodes", true); |
||||
pref("inspector.dom.showAccessibleNodes", false); |
||||
pref("inspector.dom.showProcessingInstructions", true); |
@ -1,36 +0,0 @@
|
||||
<?xml version="1.0"?> |
||||
|
||||
<!-- This Source Code is subject to the terms of the Mozilla Public License |
||||
- version 2.0 (the "License"). You can obtain a copy of the License at |
||||
- http://mozilla.org/MPL/2.0/. --> |
||||
|
||||
#filter substitution |
||||
|
||||
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
||||
xmlns:em="http://www.mozilla.org/2004/em-rdf#"> |
||||
|
||||
<Description about="urn:mozilla:install-manifest" |
||||
em:id="@INSPECTOR_ID@" |
||||
em:version="@INSPECTOR_VERSION@" |
||||
em:name="@INSPECTOR_NAME@" |
||||
em:description="@INSPECTOR_SHORT_DESC@" |
||||
em:creator="@INSPECTOR_AUTHOR@" |
||||
em:type="2" |
||||
em:unpack="true"> |
||||
<em:targetApplication name="Pale Moon"> |
||||
<Description em:id="{8de7fcbb-c55c-4fbe-bfc5-fc555c87dbc4}" |
||||
em:minVersion="28.0.0a1" |
||||
em:maxVersion="28.*"/> |
||||
</em:targetApplication> |
||||
<em:targetApplication name="Borealis Navigator"> |
||||
<Description em:id="{a3210b97-8e8a-4737-9aa0-aa0e607640b9}" |
||||
em:minVersion="1.0.0a1" |
||||
em:maxVersion="1.*"/> |
||||
</em:targetApplication> |
||||
<em:targetApplication name="Unified XUL Platform"> |
||||
<Description em:id="toolkit@mozilla.org" |
||||
em:minVersion="4.1.0a1" |
||||
em:maxVersion="4.*"/> |
||||
</em:targetApplication> |
||||
</Description> |
||||
</RDF> |
@ -1,14 +0,0 @@
|
||||
# vim: set filetype=python: |
||||
# This Source Code Form is subject to the terms of the Mozilla Public |
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this |
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/. |
||||
|
||||
FINAL_TARGET_PP_FILES += ['install.rdf'] |
||||
|
||||
FINAL_TARGET_FILES.chrome.icons.default += [ |
||||
'winInspectorMain.ico', |
||||
'winInspectorMain.xpm', |
||||
'winInspectorMain16.xpm', |
||||
] |
||||
|
||||
FINAL_TARGET_FILES.defaults.preferences += ['inspector.js'] |
Before Width: | Height: | Size: 3.6 KiB |
@ -1,45 +0,0 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this |
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
/* XPM */ |
||||
static char * winInspectorMain_xpm[] = { |
||||
"32 32 6 1", |
||||
" c None", |
||||
". c #000000", |
||||
"+ c #FFB300", |
||||
"@ c #FF7500", |
||||
"# c #FF8C00", |
||||
"$ c #FF0000", |
||||
"................................", |
||||
"................................", |
||||
"..++++++++++++++++++++++++++++..", |
||||
"..++++++++++++++++++++++++++++..", |
||||
"..++++++++++........++++++++++..", |
||||
"..++++++++++........++++++++++..", |
||||
"..++++++....@@@@@@@@....++++++..", |
||||
"..++++++....@@@@@@@@....++++++..", |
||||
"..++++++..@@@@@@@@@@@@..++++++..", |
||||
"..++++++..@@@@@@@@@@@@..++++++..", |
||||
"..++++..@@@@@@@@@@@@@@@@..++++..", |
||||
"..++++..@@@@@@@@@@@@@@@@..++++..", |
||||
"..++++..@@@@@@@@@@@@@@@@..++++..", |
||||
"..++++..@@@@@@@@@@@@@@@@..++++..", |
||||
"..++++..@@@@@@@@@@@@##@@..++++..", |
||||
"..++++..@@@@@@@@@@@@##@@..++++..", |
||||
"..++++..@@@@@@@@@@@@##@@..++++..", |
||||
"..++++..@@@@@@@@@@@@##@@..++++..", |
||||
"..++++++..@@@@@@####$$..++++++..", |
||||
"..++++++..@@@@@@####$$..++++++..", |
||||
"..++++++....@@@@@@@@......++++..", |
||||
"..++++++....@@@@@@@@......++++..", |
||||
"..++++++++++........++......++..", |
||||
"..++++++++++........++......++..", |
||||
"..++++++++++++++++++++++........", |
||||
"..++++++++++++++++++++++........", |
||||
"..++++++++++++++++++++++++......", |
||||
"..++++++++++++++++++++++++......", |
||||
"..++++++++++++++++++++++++++....", |
||||
"..++++++++++++++++++++++++++....", |
||||
"................................", |
||||
"................................"}; |
@ -1,29 +0,0 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this |
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
/* XPM */ |
||||
static char * winInspectorMain16_xpm[] = { |
||||
"16 16 6 1", |
||||
" c None", |
||||
". c #000000", |
||||
"+ c #FFAD00", |
||||
"@ c #FF6D00", |
||||
"# c #FF8500", |
||||
"$ c #FF0000", |
||||
"................", |
||||
".++++++++++++++.", |
||||
".+++++....+++++.", |
||||
".+++..@@@@..+++.", |
||||
".+++.@@@@@@.+++.", |
||||
".++.@@@@@@@@.++.", |
||||
".++.@@@@@@@@.++.", |
||||
".++.@@@@@@#@.++.", |
||||
".++.@@@@@@#@.++.", |
||||
".+++.@@@##$.+++.", |
||||
".+++..@@@@...++.", |
||||
".+++++....+...+.", |
||||
".+++++++++++....", |
||||
".++++++++++++...", |
||||
".+++++++++++++..", |
||||
"................"}; |
@ -1,12 +0,0 @@
|
||||
# vim: set filetype=python: |
||||
# This Source Code Form is subject to the terms of the Mozilla Public |
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this |
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/. |
||||
|
||||
if not CONFIG['MOZ_DISABLE_PLATFORM']: |
||||
error('Please add --disable-platform to your mozconfig') |
||||
#include('/toolkit/toolkit.mozbuild') |
||||
|
||||
# Never add tier dirs after the application srcdir because they |
||||
# apparently won't get packaged properly on Mac. |
||||
DIRS += ['/projects/inspector'] |
@ -1,7 +0,0 @@
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
package: |
||||
cd $(DIST)/bin; \
|
||||
zip -Dr9X ../${INSPECTOR_XPI_NAME}-${INSPECTOR_VERSION}.xpi * -x \*/.mkdir.done; \
|
@ -1,56 +0,0 @@
|
||||
/* |
||||
* This Source Code is subject to the terms of the Mozilla Public License |
||||
* version 2.0 (the "License"). You can obtain a copy of the License at |
||||
* http://mozilla.org/MPL/2.0/.
|
||||
*/ |
||||
|
||||
const Cc = Components.classes; |
||||
const Ci = Components.interfaces; |
||||
const Cr = Components.results; |
||||
const Cu = Components.utils; |
||||
|
||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm"); |
||||
|
||||
/** |
||||
* Application startup/shutdown observer, triggers init()/uninit() methods |
||||
* @constructor |
||||
*/ |
||||
function Initializer() {} |
||||
Initializer.prototype = |
||||
{ |
||||
classDescription: "DOMi initializer", |
||||
contractID: "@mozilla.org/domi/startup;1", |
||||
classID: Components.ID("{87fcf1f0-959f-4ee7-abba-889478e93775}"), |
||||
_xpcom_categories: [{ category: "app-startup", service: true }], |
||||
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver, Ci.nsISupportsWeakReference]), |
||||
|
||||
observe: function(subject, topic, data) |
||||
{ |
||||
let observerService = Cc["@mozilla.org/observer-service;1"].getService(Ci.nsIObserverService); |
||||
switch (topic) |
||||
{ |
||||
case "app-startup": |
||||
observerService.addObserver(this, "profile-after-change", true); |
||||
break; |
||||
case "profile-after-change": |
||||
observerService.addObserver(this, "quit-application", true); |
||||
Cu.import("resource://inspector/InspectElement.jsm"); |
||||
InspectElement.init(); |
||||
break; |
||||
case "quit-application": |
||||
try { |
||||
// This will fail if component was added via chrome.manifest (Gecko 2.0)
|
||||
observerService.removeObserver(this, "profile-after-change"); |
||||
}catch(e) {} |
||||
observerService.removeObserver(this, "quit-application"); |
||||
InspectElement.uninit(); |
||||
break; |
||||
} |
||||
} |
||||
}; |
||||
|
||||
if (XPCOMUtils.generateNSGetFactory) |
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory([Initializer]); |
||||
else |
||||
var NSGetModule = XPCOMUtils.generateNSGetModule([Initializer]); |
@ -1,60 +0,0 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public |
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this |
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); |
||||
|
||||
const nsICommandLineHandler = Components.interfaces.nsICommandLineHandler; |
||||
const nsISupportsString = Components.interfaces.nsISupportsString; |
||||
const nsIWindowWatcher = Components.interfaces.nsIWindowWatcher; |
||||
|
||||
function InspectorCmdLineHandler() {} |
||||
InspectorCmdLineHandler.prototype = |
||||
{ |
||||
classDescription: "DOM Inspector Command Line Handler", |
||||
classID: Components.ID("{38293526-6b13-4d4f-a075-71939435b408}"), |
||||
contractID: "@mozilla.org/commandlinehandler/general-startup;1?type=inspector", |
||||
/* Needed for XPCOMUtils NSGetModule */ |
||||
_xpcom_categories: [{category: "command-line-handler", |
||||
entry: "m-inspector"}], |
||||
|
||||
/* nsISupports */ |
||||
QueryInterface: XPCOMUtils.generateQI([nsICommandLineHandler]), |
||||
|
||||
/* nsICommandLineHandler */ |
||||
handle : function handler_handle(cmdLine) { |
||||
var args = Components.classes["@mozilla.org/supports-string;1"] |
||||
.createInstance(nsISupportsString); |
||||
try { |
||||
var uristr = cmdLine.handleFlagWithParam("inspector", false); |
||||
if (uristr == null) |
||||
return; |
||||
try { |
||||
args.data = cmdLine.resolveURI(uristr).spec; |
||||
} |
||||
catch (e) { |
||||
return; |
||||
} |
||||
} |
||||
catch (e) { |
||||
cmdLine.handleFlag("inspector", true); |
||||
} |
||||
|
||||
var wwatch = Components.classes["@mozilla.org/embedcomp/window-watcher;1"] |
||||
.getService(nsIWindowWatcher); |
||||
wwatch.openWindow(null, "chrome://inspector/content/", "_blank", |
||||
"chrome,dialog=no,all", args); |
||||
}, |
||||
|
||||
helpInfo : " -inspector <url> Open the DOM inspector.\n" |
||||
}; |
||||
|
||||
|
||||
/** |
||||
* XPCOMUtils.generateNSGetFactory was introduced in Mozilla 2 (Firefox 4). |
||||
* XPCOMUtils.generateNSGetModule is for Mozilla 1.9.0 (Firefox 3.0). |
||||
*/ |
||||
if (XPCOMUtils.generateNSGetFactory) |
||||
var NSGetFactory = XPCOMUtils.generateNSGetFactory([InspectorCmdLineHandler]); |
||||
else |
||||
var NSGetModule = XPCOMUtils.generateNSGetModule([InspectorCmdLineHandler]); |
@ -1,12 +0,0 @@
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public |
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this |
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/. |
||||
|
||||
[.] chrome.jar: |
||||
% category command-line-handler m-inspector @mozilla.org/commandlinehandler/general-startup;1?type=inspector |
||||
% component {38293526-6b13-4d4f-a075-71939435b408} components/inspector-cmdline.js |
||||
% contract @mozilla.org/commandlinehandler/general-startup;1?type=inspector {38293526-6b13-4d4f-a075-71939435b408} |
||||
|
||||
% component {87fcf1f0-959f-4ee7-abba-889478e93775} components/initializer.js |
||||
% contract @mozilla.org/domi/startup;1 {87fcf1f0-959f-4ee7-abba-889478e93775} |
||||
% category profile-after-change @mozilla.org/domi/startup;1 @mozilla.org/domi/startup;1 |
@ -1,15 +0,0 @@
|
||||
# vim: set filetype=python: |
||||
# This Source Code Form is subject to the terms of the Mozilla Public |
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this |
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/. |
||||
|
||||
EXTRA_COMPONENTS += [ |
||||
'initializer.js', |
||||
'inspector-cmdline.js', |
||||
] |
||||
|
||||
# We don't want component sub-manifest files for extensions.. |
||||
# They don't always work correctly |
||||
NO_JS_MANIFEST = True |
||||
|
||||
JAR_MANIFESTS += ['jar.mn'] |
@ -1,30 +0,0 @@
|
||||
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- |
||||
# vim: set filetype=python: |
||||
# This Source Code Form is subject to the terms of the Mozilla Public |
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this |
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/. |
||||
|
||||
# Templates apperently ARE allowed to use set_config and set_define and can use loops |
||||
# so take advantage of that to apply the old axion_cmake defines without the need of |
||||
# confvars.sh or configure.in |
||||
@template |
||||
def ConfVars(mode='moz.configure'): |
||||
confvars = { |
||||
'INSPECTOR_NAME': 'DOM Inspector', |
||||
'INSPECTOR_ID': 'inspector@mozilla.org', |
||||
'INSPECTOR_VERSION': '3.0.2', |
||||
'INSPECTOR_AUTHOR': 'Binary Outcast', |
||||
'INSPECTOR_SHORT_DESC': 'DOM Inspector is a tool that can be used to inspect and edit the live DOM of any web document or XUL application.', |
||||
'INSPECTOR_XPI_NAME': 'domi', |
||||
'INSPECTOR_CHROME_NAME': 'inspector', |
||||
} |
||||
|
||||
if mode == 'moz.configure': |
||||
for key, value in confvars.iteritems(): |
||||
set_config(key, value) |
||||
set_define(key, value) |
||||
elif mode == 'moz.build': |
||||
for key, value in confvars.iteritems(): |
||||
DEFINES[key] = value |
||||
elif mode == 'id': |
||||
return confvars['INSPECTOR_ID'] |
@ -1,391 +0,0 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public |
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this |
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
/*************************************************************** |
||||
* Flasher --------------------------------------------------- |
||||
* Object for controlling a timed flashing animation which
|
||||
* paints a border around an element. |
||||
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
* REQUIRED IMPORTS: |
||||
****************************************************************/ |
||||
|
||||
//////////// global variables /////////////////////
|
||||
|
||||
//////////// global constants ////////////////////
|
||||
|
||||
const HIGHLIGHTED_PSEUDO_CLASS = ":-moz-devtools-highlighted"; |
||||
const INVERT = "filter: url(\"data:image/svg+xml;charset=utf8,<svg xmlns='http://www.w3.org/2000/svg'><filter id='invert'><feColorMatrix in='SourceGraphic' type='matrix' values='-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0'/></filter></svg>%23invert\") !important; " |
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
//// class Flasher
|
||||
|
||||
function Flasher(aColor, aThickness, aDuration, aSpeed, aInvert) |
||||
{ |
||||
document.querySelector(HIGHLIGHTED_PSEUDO_CLASS); |
||||
this.mIOService = XPCU.getService("@mozilla.org/network/io-service;1", "nsIIOService"); |
||||
this.mDOMUtils = XPCU.getService("@mozilla.org/inspector/dom-utils;1", "inIDOMUtils"); |
||||
this.mShell = XPCU.getService("@mozilla.org/inspector/flasher;1", "inIFlasher") || this.mDOMUtils; |
||||
this.color = aColor; |
||||
this.thickness = aThickness; |
||||
this.invert = aInvert; |
||||
this.duration = aDuration; |
||||
this.mSpeed = aSpeed; |
||||
} |
||||
|
||||
Flasher.prototype = |
||||
{ |
||||
////////////////////////////////////////////////////////////////////////////
|
||||
//// Initialization
|
||||
|
||||
mFlashTimeout: null, |
||||
mElement: null, |
||||
mRegistryId: null, |
||||
mFlashes: 0, |
||||
mStartTime: 0, |
||||
mDOMUtils: null, |
||||
mWinUtils: null, |
||||
mStyleURI: null, |
||||
mColor: "#000000", |
||||
mInvert: false, |
||||
mThickness: 0, |
||||
mDuration: 0, |
||||
mSpeed: 0, |
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
//// Properties
|
||||
|
||||
get flashing() { return this.mFlashTimeout != null; }, |
||||
|
||||
get element() { return this.mElement; }, |
||||
set element(val) |
||||
{ |
||||
if (val && val.nodeType == Node.ELEMENT_NODE) { |
||||
this.mElement = val; |
||||
this.mShell.scrollElementIntoView(val); |
||||
this.mWinUtils = val.ownerDocument.defaultView |
||||
.QueryInterface(Components.interfaces.nsIInterfaceRequestor) |
||||
.getInterface(Components.interfaces.nsIDOMWindowUtils); |
||||
} else { |
||||
throw "Invalid node type."; |
||||
} |
||||
}, |
||||
|
||||
get color() { return this.mColor; }, |
||||
set color(aVal) |
||||
{ |
||||
var spacer = document.createElement("spacer"); |
||||
spacer.style.color = aVal; |
||||
if (spacer.style.color) { |
||||
this.mStyleURI = null; |
||||
this.mColor = aVal; |
||||
} |
||||
return aVal; |
||||
}, |
||||
|
||||
get thickness() { return this.mThickness | 0; }, |
||||
set thickness(aVal) { this.mStyleURI = null; return this.mThickness = aVal; }, |
||||
|
||||
get duration() { return this.mDuration; }, |
||||
set duration(aVal) { this.mDuration = aVal; }, |
||||
|
||||
get speed() { return this.mSpeed; }, |
||||
set speed(aVal) { this.mSpeed = aVal; }, |
||||
|
||||
get invert() { return !!this.mInvert; }, |
||||
set invert(aVal) { this.mStyleURI = null; return this.mInvert = aVal; }, |
||||
|
||||
// :::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
// :::::::::::::::::::: Methods ::::::::::::::::::::::::::::
|
||||
// :::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
|
||||
start: function(aDuration, aSpeed, aHold) |
||||
{ |
||||
if (!this.mStyleURI) { |
||||
var styleURI = "data:text/css;charset=utf-8," + HIGHLIGHTED_PSEUDO_CLASS + |
||||
" { outline: " + this.thickness + "px solid " + |
||||
encodeURIComponent(this.color) + |
||||
" !important; outline-offset: " + -this.thickness + |
||||
"px !important; " + (this.invert ? INVERT : "") + "}"; |
||||
this.mStyleURI = this.mIOService.newURI(styleURI, null, null); |
||||
} |
||||
|
||||
this.mWinUtils.loadSheet(this.mStyleURI, this.mWinUtils.AGENT_SHEET); |
||||
this.mUDuration = aDuration ? aDuration * 1000 : this.mDuration; |
||||
this.mUSpeed = aSpeed ? aSpeed : this.mSpeed; |
||||
this.mHold = aHold; |
||||
this.mFlashes = 0; |
||||
this.mStartTime = Date.now(); |
||||
this.doFlash(); |
||||
}, |
||||
|
||||
doFlash: function() |
||||
{ |
||||
if (this.mHold || this.mFlashes & 1) { |
||||
this.paintOn(); |
||||
} else { |
||||
this.paintOff(); |
||||
} |
||||
this.mFlashes++; |
||||
|
||||
if (this.mUDuration < 0 || Date.now() - this.mStartTime < this.mUDuration) { |
||||
this.mFlashTimeout = window.setTimeout(this.timeout, this.mUSpeed, this); |
||||
} else { |
||||
this.stop(); |
||||
} |
||||
}, |
||||
|
||||
timeout: function(self) |
||||
{ |
||||
self.doFlash(); |
||||
}, |
||||
|
||||
stop: function() |
||||
{ |
||||
if (this.flashing) { |
||||
this.mWinUtils.removeSheet(this.mStyleURI, this.mWinUtils.AGENT_SHEET); |
||||
window.clearTimeout(this.mFlashTimeout); |
||||
this.mFlashTimeout = null; |
||||
this.paintOff(); |
||||
} |
||||
}, |
||||
|
||||
paintOn: function() |
||||
{ |
||||
this.mDOMUtils.addPseudoClassLock(this.mElement, HIGHLIGHTED_PSEUDO_CLASS); |
||||
}, |
||||
|
||||
paintOff: function() |
||||
{ |
||||
this.mDOMUtils.removePseudoClassLock(this.mElement, HIGHLIGHTED_PSEUDO_CLASS); |
||||
} |
||||
|
||||
}; |
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
//// class LegacyFlasher
|
||||
|
||||
function LegacyFlasher(aColor, aThickness, aDuration, aSpeed, aInvert) |
||||
{ |
||||
this.mShell = XPCU.getService("@mozilla.org/inspector/flasher;1", "inIFlasher"); |
||||
this.color = aColor; |
||||
this.mShell.thickness = aThickness; |
||||
this.mShell.invert = aInvert; |
||||
this.duration = aDuration; |
||||
this.mSpeed = aSpeed; |
||||
} |
||||
|
||||
LegacyFlasher.prototype = |
||||
{ |
||||
////////////////////////////////////////////////////////////////////////////
|
||||
//// Initialization
|
||||
|
||||
mFlashTimeout: null, |
||||
mElement:null, |
||||
mRegistryId: null, |
||||
mFlashes: 0, |
||||
mStartTime: 0, |
||||
mDuration: 0, |
||||
mSpeed: 0, |
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
//// Properties
|
||||
|
||||
get flashing() { return this.mFlashTimeout != null; }, |
||||
|
||||
get element() { return this.mElement; }, |
||||
set element(val)
|
||||
{
|
||||
if (val && val.nodeType == Node.ELEMENT_NODE) { |
||||
this.mElement = val;
|
||||
this.mShell.scrollElementIntoView(val); |
||||
} else
|
||||
throw "Invalid node type."; |
||||
}, |
||||
|
||||
get color() { return this.mShell.color; }, |
||||
set color(aVal) |
||||
{ |
||||
try { |
||||
this.mShell.color = aVal; |
||||
} |
||||
catch (e) { // Catch exception in case aVal is an invalid or empty value.
|
||||
Components.utils.reportError(e); |
||||
} |
||||
return aVal; |
||||
}, |
||||
|
||||
get thickness() { return this.mShell.thickness; }, |
||||
set thickness(aVal) { this.mShell.thickness = aVal; }, |
||||
|
||||
get duration() { return this.mDuration; }, |
||||
set duration(aVal) { this.mDuration = aVal; }, |
||||
|
||||
get speed() { return this.mSpeed; }, |
||||
set speed(aVal) { this.mSpeed = aVal; }, |
||||
|
||||
get invert() { return this.mShell.invert; }, |
||||
set invert(aVal) { this.mShell.invert = aVal; }, |
||||
|
||||
// :::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
// :::::::::::::::::::: Methods ::::::::::::::::::::::::::::
|
||||
// :::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
|
||||
start: function(aDuration, aSpeed, aHold) |
||||
{ |
||||
this.mUDuration = aDuration ? aDuration*1000 : this.mDuration; |
||||
this.mUSpeed = aSpeed ? aSpeed : this.mSpeed |
||||
this.mHold = aHold; |
||||
this.mFlashes = 0; |
||||
this.mStartTime = new Date(); |
||||
this.doFlash(); |
||||
}, |
||||
|
||||
doFlash: function() |
||||
{ |
||||
if (this.mHold || this.mFlashes%2) { |
||||
this.paintOn(); |
||||
} else { |
||||
this.paintOff(); |
||||
} |
||||
this.mFlashes++; |
||||
|
||||
if (this.mUDuration < 0 || new Date() - this.mStartTime < this.mUDuration) { |
||||
this.mFlashTimeout = window.setTimeout(this.timeout, this.mUSpeed, this); |
||||
} else { |
||||
this.stop(); |
||||
} |
||||
}, |
||||
|
||||
timeout: function(self) |
||||
{ |
||||
self.doFlash(); |
||||
}, |
||||
|
||||
stop: function() |
||||
{ |
||||
if (this.flashing) { |
||||
window.clearTimeout(this.mFlashTimeout); |
||||
this.mFlashTimeout = null; |
||||
this.paintOff(); |
||||
} |
||||
}, |
||||
|
||||
paintOn: function() |
||||
{ |
||||
this.mShell.drawElementOutline(this.mElement); |
||||
}, |
||||
|
||||
paintOff: function() |
||||
{ |
||||
this.mShell.repaintElement(this.mElement); |
||||
} |
||||
|
||||
}; |
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//// DOMIFlasher
|
||||
|
||||
/** |
||||
* The special version of the flasher operating with DOM Inspector flasher |
||||
* preferences. |
||||
*/ |
||||
function DOMIFlasher() |
||||
{ |
||||
this.init(); |
||||
} |
||||
|
||||
DOMIFlasher.prototype = |
||||
{ |
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//// Public
|
||||
|
||||
get flashOnSelect() { return PrefUtils.getPref("inspector.blink.on"); }, |
||||
set flashOnSelect(aVal) { PrefUtils.setPref("inspector.blink.on", aVal); }, |
||||
|
||||
get color() { return PrefUtils.getPref("inspector.blink.border-color"); }, |
||||
set color(aVal) { PrefUtils.setPref("inspector.blink.border-color", aVal); }, |
||||
|
||||
get thickness() { return PrefUtils.getPref("inspector.blink.border-width"); }, |
||||
set thickness(aVal) { PrefUtils.setPref("inspector.blink.border-width", aVal); }, |
||||
|
||||
get duration() { return PrefUtils.getPref("inspector.blink.duration"); }, |
||||
set duration(aVal) { PrefUtils.setPref("inspector.blink.duration", aVal); }, |
||||
|
||||
get speed() { return PrefUtils.getPref("inspector.blink.speed"); }, |
||||
set speed(aVal) { PrefUtils.setPref("inspector.blink.speed", aVal); }, |
||||
|
||||
get invert() { return PrefUtils.getPref("inspector.blink.invert"); }, |
||||
set invert(aVal) { PrefUtils.setPref("inspector.blink.invert", aVal); }, |
||||
|
||||
flashElement: function DOMIFlasher_flashElement(aElement) |
||||
{ |
||||
if (this.mFlasher.flashing) |
||||
this.mFlasher.stop(); |
||||
|
||||
this.mFlasher.element = aElement; |
||||
this.mFlasher.start(); |
||||
}, |
||||
|
||||
flashElementOnSelect: function DOMIFlasher_flashElementOnSelect(aElement) |
||||
{ |
||||
if (this.flashOnSelect) { |
||||
this.flashElement(aElement); |
||||
} |
||||
}, |
||||
|
||||
destroy: function DOMIFlasher_destroy() |
||||
{ |
||||
PrefUtils.removeObserver("inspector.blink.", this); |
||||
}, |
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//// Private
|
||||
|
||||
init: function DOMIFlasher_init() |
||||
{ |
||||
try { |
||||
this.mFlasher = new Flasher(this.color, this.thickness, this.duration, |
||||
this.speed, this.invert); |
||||
} catch (e) { |
||||
this.mFlasher = new LegacyFlasher(this.color, this.thickness, |
||||
this.duration, this.speed, this.invert); |
||||
} |
||||
|
||||
PrefUtils.addObserver("inspector.blink.", this); |
||||
|
||||
this.updateFlashOnSelectCommand(); |
||||
}, |
||||
|
||||
updateFlashOnSelectCommand: function DOMIFlasher_updateFlashOnSelectCommand() |
||||
{ |
||||
var cmdEl = document.getElementById("cmdFlashOnSelect"); |
||||
if (this.flashOnSelect) { |
||||
cmdEl.setAttribute("checked", "true"); |
||||
} else { |
||||
cmdEl.removeAttribute("checked"); |
||||
} |
||||
}, |
||||
|
||||
observe: function DOMIFlasher_observe(aSubject, aTopic, aData) |
||||
{ |
||||
if (aData == "inspector.blink.on") { |
||||
this.updateFlashOnSelectCommand(); |
||||
return; |
||||
} |
||||
|
||||
var value = PrefUtils.getPref(aData); |
||||
|
||||
if (aData == "inspector.blink.border-color") { |
||||
this.mFlasher.color = value; |
||||
} else if (aData == "inspector.blink.border-width") { |
||||
this.mFlasher.thickness = value; |
||||
} else if (aData == "inspector.blink.duration") { |
||||
this.mFlasher.duration = value; |
||||
} else if (aData == "inspector.blink.speed") { |
||||
this.mFlasher.speed = value; |
||||
} else if (aData == "inspector.blink.invert") { |
||||
this.mFlasher.invert = value; |
||||
} |
||||
} |
||||
} |
@ -1,251 +0,0 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public |
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this |
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
/***************************************************************************** |
||||
* ViewerRegistry ------------------------------------------------------------- |
||||
* The central registry where information about all installed viewers is |
||||
* kept. |
||||
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
||||
* REQUIRED IMPORTS: |
||||
* chrome://inspector/content/jsutil/xpcom/XPCU.js
|
||||
* chrome://inspector/content/jsutil/rdf/RDFU.js
|
||||
*****************************************************************************/ |
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//// Global Constants
|
||||
|
||||
const kViewerURLPrefix = "chrome://inspector/content/viewers/"; |
||||
const kViewerRegURL = "chrome://inspector/content/res/viewer-registry.rdf"; |
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//// Class ViewerRegistry
|
||||
|
||||
function ViewerRegistry() // implements inIViewerRegistry
|
||||
{ |
||||
this.mViewerHash = {}; |
||||
} |
||||
|
||||
ViewerRegistry.prototype = |
||||
{ |
||||
////////////////////////////////////////////////////////////////////////////
|
||||
//// Interface inIViewerRegistry (not yet formalized...)
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
//// Initialization
|
||||
|
||||
mDS: null, |
||||
mObserver: null, |
||||
mViewerDS: null, |
||||
mViewerHash: null, |
||||
mFilters: null, |
||||
|
||||
get url() |
||||
{ |
||||
return this.mURL; |
||||
}, |
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
//// Loading Methods
|
||||
|
||||
load: function VR_Load(aURL, aObserver) |
||||
{ |
||||
this.mURL = aURL; |
||||
this.mObserver = aObserver; |
||||
RDFU.loadDataSource(aURL, new ViewerRegistryLoadObserver(this)); |
||||
}, |
||||
|
||||
onError: function VR_OnError(aStatus, aErrorMsg) |
||||
{ |
||||
this.mObserver.onViewerRegistryLoadError(aStatus, aErrorMsg); |
||||
}, |
||||
|
||||
onLoad: function VR_OnLoad(aDS) |
||||
{ |
||||
this.mDS = aDS; |
||||
this.prepareRegistry(); |
||||
this.mObserver.onViewerRegistryLoad(); |
||||
}, |
||||
|
||||
prepareRegistry: function VR_PrepareRegistry() |
||||
{ |
||||
this.mViewerDS = RDFArray.fromContainer(this.mDS, "inspector:viewers", |
||||
kInspectorNSURI); |
||||
|
||||
// create and cache the filter functions
|
||||
var js, fn; |
||||
this.mFilters = []; |
||||
for (var i = 0; i < this.mViewerDS.length; ++i) { |
||||
js = this.getEntryProperty(i, "filter"); |
||||
try { |
||||
fn = new Function("object", "linkedViewer", js); |
||||
} |
||||
catch (ex) { |
||||
fn = new Function("return false"); |
||||
debug("### ERROR - Syntax error in filter for viewer \"" + |
||||
this.getEntryProperty(i, "description") + "\"\n"); |
||||
} |
||||
this.mFilters.push(fn); |
||||
} |
||||
}, |
||||
|
||||
/** |
||||
* Returns the absolute url where the xul file for a viewer can be found. |
||||
* |
||||
* @param aIndex |
||||
* The numerical index of the entry representing the viewer. |
||||
* @return A string of the fully canonized url. |
||||
*/ |
||||
getEntryURL: function VR_GetEntryURL(aIndex) |
||||
{ |
||||
var uid = this.getEntryProperty(aIndex, "uid"); |
||||
return kViewerURLPrefix + uid + "/" + uid + ".xul"; |
||||
}, |
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
//// Lookup Methods
|
||||
|
||||
/** |
||||
* Searches the viewer registry for all viewers that can view a particular |
||||
* object. |
||||
* |
||||
* @param aObject |
||||
* The object being searched against. |
||||
* @param aPanelId |
||||
* A string containing the id of the panel requesting viewers. |
||||
* @param aLinkedViewer |
||||
* The view object of linked panel. |
||||
* @return An array of nsIRDFResource entries in the viewer registry. |
||||
*/ |
||||
findViewersForObject: |
||||
function VR_FindViewersForObject(aObject, aPanelId, aLinkedViewer) |
||||
{ |
||||
// check each entry in the registry
|
||||
var len = this.mViewerDS.length; |
||||
var entry; |
||||
var urls = []; |
||||
for (var i = 0; i < len; ++i) { |
||||
if (this.getEntryProperty(i, "panels").indexOf(aPanelId) == -1) { |
||||
continue; |
||||
} |
||||
if (this.objectMatchesEntry(aObject, aLinkedViewer, i)) { |
||||
if (this.getEntryProperty(i, "important")) { |
||||
urls.unshift(i); |
||||
} else { |
||||
urls.push(i); |
||||
} |
||||
} |
||||
} |
||||
|
||||
return urls; |
||||
}, |
||||
|
||||
/** |
||||
* Determines if an object is eligible to be viewed by a particular viewer. |
||||
* |
||||
* @param aObject |
||||
* The object being checked for eligibility. |
||||
* @param aLinkedViewer |
||||
* The view object of linked panel. |
||||
* @param aIndex |
||||
* The numerical index of the entry. |
||||
* @return true if object can be viewed. |
||||
*/ |
||||
objectMatchesEntry: |
||||
function VR_ObjectMatchesEntry(aObject, aLinkedViewer, aIndex) |
||||
{ |
||||
try { |
||||
return this.mFilters[aIndex](aObject, aLinkedViewer); |
||||
} |
||||
catch (ex) { |
||||
Components.utils.reportError(ex); |
||||
} |
||||
return false; |
||||
}, |
||||
|
||||
/** |
||||
* Notifies the registry that a viewer has been instantiated, and that it |
||||
* corresponds to a particular entry in the viewer registry. |
||||
* |
||||
* @param aViewer |
||||
* The inIViewer object to cache. |
||||
* @param aIndex |
||||
* The numerical index of the entry. |
||||
*/ |
||||
cacheViewer: function VR_CacheViewer(aViewer, aIndex) |
||||
{ |
||||
var uid = this.getEntryProperty(aIndex, "uid"); |
||||
this.mViewerHash[uid] = { viewer: aViewer, entry: aIndex }; |
||||
}, |
||||
|
||||
uncacheViewer: function VR_UncacheViewer(aViewer) |
||||
{ |
||||
delete this.mViewerHash[aViewer.uid]; |
||||
}, |
||||
|
||||
// for previously loaded viewers only
|
||||
getViewerByUID: function VR_GetViewerByUID(aUID) |
||||
{ |
||||
return this.mViewerHash[aUID].viewer; |
||||
}, |
||||
|
||||
// for previously loaded viewers only
|
||||
getEntryForViewer: function VR_GetEntryForViewer(aViewer) |
||||
{ |
||||
return this.mViewerHash[aViewer.uid].entry; |
||||
}, |
||||
|
||||
// for previously loaded viewers only
|
||||
getEntryByUID: function VR_GetEntryByUID(aUID) |
||||
{ |
||||
return this.mViewerHash[aUID].aIndex; |
||||
}, |
||||
|
||||
getEntryProperty: function VR_GetEntryProperty(aIndex, aProp) |
||||
{ |
||||
return this.mViewerDS.get(aIndex, aProp); |
||||
}, |
||||
|
||||
getEntryCount: function VR_GetEntryCount() |
||||
{ |
||||
return this.mViewerDS.length; |
||||
}, |
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
//// Viewer Registration
|
||||
|
||||
addNewEntry: function VR_AddNewEntry(aUID, aDescription, aFilter) |
||||
{ |
||||
}, |
||||
|
||||
removeEntry: function VR_RemoveEntry(aIndex) |
||||
{ |
||||
}, |
||||
|
||||
saveRegistry: function VR_SaveRegistry() |
||||
{ |
||||
} |
||||
}; |
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
//// Listener Objects
|
||||
|
||||
function ViewerRegistryLoadObserver(aTarget) |
||||
{ |
||||
this.mTarget = aTarget; |
||||
} |
||||
|
||||
ViewerRegistryLoadObserver.prototype = |
||||
{ |
||||
mTarget: null, |
||||
|
||||
onError: function VRLO_OnError(aStatus, aErrorMsg) |
||||
{ |
||||
this.mTarget.onError(aStatus, aErrorMsg); |
||||
}, |
||||
|
||||
onDataSourceReady: function VRLO_OnDataSourceReady(aDS) |
||||
{ |
||||
this.mTarget.onLoad(aDS); |
||||
} |
||||
}; |
@ -1,58 +0,0 @@
|
||||
<?xml version="1.0"?> |
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public |
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this |
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. --> |
||||
|
||||
|
||||
<!DOCTYPE overlay [ |
||||
<!ENTITY % dtd1 SYSTEM "chrome://inspector/locale/inspector.dtd"> %dtd1; |
||||
]> |
||||
|
||||
<overlay id="ovCommandsMain" |
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> |
||||
|
||||
<commandset id="cmdsGlobalCommands"> |
||||
|
||||
<command id="cmdGotoURL" |
||||
ontextentered="inspector.gotoTypedURL();" |
||||
oncommand="inspector.gotoTypedURL();"/> |
||||
|
||||
<command id="cmdEnterLocation" |
||||
oncommand="inspector.enterLocation();"/> |
||||
<command id="cmdSave" oncommand="inspector.save();"/> |
||||
<command id="cmdClose" oncommand="inspector.exit();"/> |
||||
|
||||
<command id="cmdShowPrefsDialog" |
||||
oncommand="inspector.showPrefsDialog();"/> |
||||
|
||||
<command id="cmdToggleDocument" |
||||
oncommand="inspector.toggleBrowser(true);"/> |
||||
|
||||
<command id="cmdFlashOnSelect" |
||||
viewer="dom accessibleTree" |
||||
oncommand="inspector.toggleFlashOnSelect();"/> |
||||
|
||||
<!-- These implement the editing commands needed by the top-level |
||||
inspectors. See editingOverlay.xul for more information. --> |
||||
<command id="cmdEditUndo" global="true" |
||||
oncommand="inspector.doViewerCommand('cmdEditUndo');"/> |
||||
<command id="cmdEditRedo" global="true" |
||||
oncommand="inspector.doViewerCommand('cmdEditRedo');"/> |
||||
<command id="cmdEditCut" global="true" |
||||
oncommand="inspector.doViewerCommand('cmdEditCut');"/> |
||||
<command id="cmdEditCopy" global="true" |
||||
oncommand="inspector.doViewerCommand('cmdEditCopy');"/> |
||||
<command id="cmdEditPaste" global="true" |
||||
oncommand="inspector.doViewerCommand('cmdEditPaste');"/> |
||||
<command id="cmdEditInsert" global="true" |
||||
oncommand="inspector.doViewerCommand('cmdEditInsert');"/> |
||||
<command id="cmdEditEdit" global="true" |
||||
oncommand="inspector.doViewerCommand('cmdEditEdit');"/> |
||||
<command id="cmdEditDelete" global="true" |
||||
oncommand="inspector.doViewerCommand('cmdEditDelete');"/> |
||||
<command id="cmdEditInspectInNewWindow" global="true" |
||||
oncommand="inspector.doViewerCommand('cmdEditInspectInNewWindow');"/> |
||||
|
||||
</commandset> |
||||
|
||||
</overlay> |
@ -1,90 +0,0 @@
|
||||
<?xml version="1.0"?> |
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public |
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this |
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. --> |
||||
|
||||
|
||||
<!DOCTYPE overlay SYSTEM "chrome://inspector/locale/editing.dtd"> |
||||
|
||||
<overlay id="ovEditing" |
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> |
||||
|
||||
<!-- This overlay is pulled in by popupOverlay.xul, which is itself pulled in |
||||
by the top-level inspectors (inspector.xul, object.xul, and sidebar.xul), |
||||
to add these items to its menus. Additionally, this overlay is suitable |
||||
for use by viewers which want to offer any of these items (e.g., for |
||||
their context menus). Note that the cmdsEditing commandset is used only |
||||
by viewers due to scoping differences; the implementation of the commands |
||||
used in the top-level inspectors can be found in commandOverlay.xul. --> |
||||
|
||||
<commandset id="cmdsEditing"> |
||||
<command id="cmdEditUndo" |
||||
oncommand="viewer.pane.panelset.execCommand('cmdEditUndo');"/> |
||||
<command id="cmdEditRedo" |
||||
oncommand="viewer.pane.panelset.execCommand('cmdEditRedo');"/> |
||||
<command id="cmdEditCut" |
||||
oncommand="viewer.pane.panelset.execCommand('cmdEditCut');"/> |
||||
<command id="cmdEditCopy" |
||||
oncommand="viewer.pane.panelset.execCommand('cmdEditCopy');"/> |
||||
<command id="cmdEditPaste" |
||||
oncommand="viewer.pane.panelset.execCommand('cmdEditPaste');"/> |
||||
<command id="cmdEditInsert" |
||||
oncommand="viewer.pane.panelset.execCommand('cmdEditInsert');"/> |
||||
<command id="cmdEditEdit" |
||||
oncommand="viewer.pane.panelset.execCommand('cmdEditEdit');"/> |
||||
<command id="cmdEditDelete" |
||||
oncommand="viewer.pane.panelset.execCommand('cmdEditDelete');"/> |
||||
</commandset> |
||||
<commandset id="cmdsEditingExtras"> |
||||
<command id="cmdEditInspectInNewWindow" |
||||
oncommand="viewer.pane.panelset.execCommand('cmdEditInspectInNewWindow');"/> |
||||
<command id="cmdEditCopyFileURI" |
||||
oncommand="viewer.pane.panelset.execCommand('cmdEditCopyFileURI');"/> |
||||
<command id="cmdEditViewFileURI" |
||||
oncommand="viewer.pane.panelset.execCommand('cmdEditViewFileURI');"/> |
||||
</commandset> |
||||
|
||||
<keyset id="ksGlobalKeyset"> |
||||
<key id="keyEditUndo" key="z" modifiers="accel" command="cmdEditUndo"/> |
||||
<key id="keyEditRedo" key="z" modifiers="accel,shift" |
||||
command="cmdEditRedo"/> |
||||
<key id="keyEditRedo2" key="y" modifiers="accel" command="cmdEditRedo"/> |
||||
<key id="keyEditCut" key="x" modifiers="accel" command="cmdEditCut"/> |
||||
<key id="keyEditCopy" key="c" modifiers="accel" command="cmdEditCopy"/> |
||||
<key id="keyEditPaste" key="v" modifiers="accel" command="cmdEditPaste"/> |
||||
<key id="keyEditDelete" keycode="VK_DELETE" command="cmdEditDelete"/> |
||||
<key id="keyEditDeleteMac" keycode="VK_BACK" command="cmdEditDelete"/> |
||||
<key id="keyEditInspectInNewWindow" key="&mnEditInspectInNewWindow.key;" |
||||
modifiers="accel" command="cmdEditInspectInNewWindow"/> |
||||
</keyset> |
||||
|
||||
<menuitem id="mnEditUndo" label="&mnEditUndo.label;" command="cmdEditUndo" |
||||
accesskey="&mnEditUndo.accesskey;" key="keyEditUndo"/> |
||||
<menuitem id="mnEditRedo" label="&mnEditRedo.label;" command="cmdEditRedo" |
||||
accesskey="&mnEditRedo.accesskey;" key="keyEditRedo"/> |
||||
<menuitem id="mnEditCut" label="&mnEditCut.label;" command="cmdEditCut" |
||||
accesskey="&mnEditCut.accesskey;" key="keyEditCut"/> |
||||
<menuitem id="mnEditCopy" label="&mnEditCopy.label;" command="cmdEditCopy" |
||||
accesskey="&mnEditCopy.accesskey;" key="keyEditCopy"/> |
||||
<menuitem id="mnEditPaste" label="&mnEditPaste.label;" command="cmdEditPaste" |
||||
accesskey="&mnEditPaste.accesskey;" key="keyEditPaste"/> |
||||
<menuitem id="mnEditInsert" label="&mnEditInsert.label;" |
||||
command="cmdEditInsert" accesskey="&mnEditInsert.accesskey;"/> |
||||
<menuitem id="mnEditEdit" label="&mnEditEdit.label;" command="cmdEditEdit" |
||||
accesskey="&mnEditEdit.accesskey;"/> |
||||
<menuitem id="mnEditDelete" label="&mnEditDelete.label;" |
||||
command="cmdEditDelete" accesskey="&mnEditDelete.accesskey;" |
||||
key="keyEditDelete"/> |
||||
<menuitem id="mnEditInspectInNewWindow" |
||||
label="&mnEditInspectInNewWindow.label;" |
||||
command="cmdEditInspectInNewWindow" |
||||
accesskey="&mnEditInspectInNewWindow.accesskey;" |
||||
key="keyEditInspectInNewWindow"/> |
||||
<menuitem id="mnEditCopyFileURI" label="&mnEditCopyFileURI.label;" |
||||
command="cmdEditCopyFileURI" |
||||
accesskey="&mnEditCopyFileURI.accesskey;"/> |
||||
<menuitem id="mnEditViewFileURI" label="&mnEditViewFileURI.label;" |
||||
command="cmdEditViewFileURI" |
||||
accesskey="&mnEditViewFileURI.accesskey;"/> |
||||
|
||||
</overlay> |
@ -1,9 +0,0 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public |
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this |
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
||||
|
||||
@import url("chrome://inspector/skin/titledSplitter.css"); |
||||
|
||||
.titled-splitter { |
||||
-moz-binding: url("titledSplitter.xml#titledSplitter") !important; |
||||
} |
@ -1,88 +0,0 @@
|
||||
<?xml version="1.0"?> |
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public |
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this |
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. --> |
||||
|
||||
|
||||
<bindings id="bdsTitledSplitter" |
||||
xmlns="http://www.mozilla.org/xbl" |
||||
xmlns:xbl="http://www.mozilla.org/xbl" |
||||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> |
||||
|
||||
<binding id="titledSplitter" extends="chrome://global/content/bindings/splitter.xml#splitter"> |
||||
<content> |
||||
<xul:vbox class="titledsplitter-container" flex="1"> |
||||
<xul:spacer class="titledsplitter-dragbar"/> |
||||
<xul:box class="titledsplitter-titlebox" flex="1" onmousedown="event.stopPropagation()"> |
||||
<xul:box align="center"> |
||||
<xul:label class="titledsplitter-text" xbl:inherits="value=label"/> |
||||
</xul:box> |
||||
<xul:spacer flex="1"/> |
||||
<xul:button class="titledsplitter-closebutton" align="center" pack="center" |
||||
onclick="this.parentNode.parentNode.parentNode.close();"> |
||||
<xul:image class="titledsplitter-closeimage"/> |
||||
</xul:button> |
||||
</xul:box> |
||||
</xul:vbox> |
||||
</content> |
||||
|
||||
<implementation> |
||||
<property name="isOpened"> |
||||
<getter><![CDATA[ |
||||
return this.mOpened; |
||||
]]></getter> |
||||
</property> |
||||
|
||||
<property name="collapsee"> |
||||
<getter><![CDATA[ |
||||
var collapse = this.getAttribute("collapse"); |
||||
return collapse == "before" ? this.previousSibling : this.nextSibling; |
||||
]]></getter> |
||||
</property> |
||||
|
||||
<method name="open"> |
||||
<body><![CDATA[ |
||||
var collapsee = this.collapsee; |
||||
if (collapsee) { |
||||
this.removeAttribute("closed"); |
||||
this.removeAttribute("collapsed"); |
||||
collapsee.removeAttribute("collapsed"); |
||||
this.mOpened = true; |
||||
this.onopen(); |
||||
} |
||||
]]></body> |
||||
</method> |
||||
|
||||
<method name="close"> |
||||
<body><![CDATA[ |
||||
var collapsee = this.collapsee; |
||||
if (collapsee) { |
||||
this.setAttribute("closed", "true"); |
||||
this.setAttribute("collapsed", "true"); |
||||
collapsee.setAttribute("collapsed", "true"); |
||||
this.mOpened = false; |
||||
this.onopen(); |
||||
} |
||||
]]></body> |
||||
</method> |
||||
|
||||
<method name="onopen"> |
||||
<body><![CDATA[ |
||||
if (!this.mOnOpen) { |
||||
var js = this.getAttribute("onopen"); |
||||
if (js) |
||||
this.mOnOpen = new Function(js); |
||||
} |
||||
|
||||
return this.mOnOpen ? this.mOnOpen() : null; |
||||
]]></body> |
||||
</method> |
||||
|
||||
<constructor><![CDATA[ |
||||
this.mOpened = false; |
||||
]]></constructor> |
||||
</implementation> |
||||
|
||||
</binding> |
||||
|
||||
</bindings> |
@ -1,51 +0,0 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public |
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this |
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
/*************************************************************** |
||||
* wsm-colorpicker ---------------------------------------------- |
||||
* Quick script which adds support for the color picker widget |
||||
* to nsWidgetStateManager in the pref winodw. |
||||
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
* REQUIRED IMPORTS: |
||||
****************************************************************/ |
||||
|
||||
function AddColorPicker(aCallback) |
||||
{ |
||||
window.addEventListener("load", AddColorPicker_delayCheck, false); |
||||
window.AddColorPicker_callback = aCallback; |
||||
} |
||||
|
||||
function AddColorPicker_delayCheck() |
||||
{ |
||||
if (parent.hPrefWindow)
|
||||
AddColorPicker_addColorHandlers() |
||||
else |
||||
setTimeout("AddColorPicker_delayCheck()", 1); |
||||
} |
||||
|
||||
function AddColorPicker_addColorHandlers()
|
||||
{ |
||||
parent.hPrefWindow.wsm.handlers.colorpicker = { |
||||
set: function (aElementID, aDataObject) |
||||
{ |
||||
var wsm = parent.hPrefWindow.wsm; |
||||
var element = wsm.contentArea.document.getElementById( aElementID ); |
||||
element.color = aDataObject.color; |
||||
}, |
||||
|
||||
get: function (aElementID) |
||||
{ |
||||
var wsm = parent.hPrefWindow.wsm; |
||||
var element = wsm.contentArea.document.getElementById( aElementID ); |
||||
var dataObject = wsm.generic_Get(element); |
||||
if(dataObject) {
|
||||
dataObject.color = element.color; |
||||
return dataObject; |
||||
} |
||||
return null; |
||||
} |
||||
} |
||||
|
||||
window.AddColorPicker_callback(); |
||||
} |
@ -1,21 +0,0 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public |
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this |
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
function inspectDOMDocument(aDocument, aModal) |
||||
{ |
||||
window.openDialog("chrome://inspector/content/", "_blank",
|
||||
"chrome,all,dialog=no"+(aModal?",modal":""), aDocument); |
||||
} |
||||
|
||||
function inspectDOMNode(aNode, aModal) |
||||
{ |
||||
window.openDialog("chrome://inspector/content/", "_blank",
|
||||
"chrome,all,dialog=no"+(aModal?",modal":""), aNode); |
||||
} |
||||
|
||||
function inspectObject(aObject, aModal) |
||||
{ |
||||
window.openDialog("chrome://inspector/content/object.xul", "_blank",
|
||||
"chrome,all,dialog=no"+(aModal?",modal":""), aObject); |
||||
} |
@ -1,38 +0,0 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public |
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this |
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
||||
|
||||
@import url("chrome://inspector/content/extensions/titledSplitter.css"); |
||||
|
||||
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); |
||||
|
||||
*[hide="true" |