This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getFont(element) { | |
// create canvas in owner doc to get @font-face fonts | |
var doc = element.ownerDocument; | |
var canvas = doc.createElement("canvas"); | |
var context = canvas.getContext("2d"); | |
if(!context.measureText) | |
return "Text"; | |
var style = doc.defaultView.getComputedStyle(element, null); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function allStyleSheets(doc) { | |
var stylesheets = []; | |
for(var i = 0; i < doc.styleSheets.length; i++) | |
stylesheets = stylesheets.concat(getStyleSheets(doc.styleSheets[i])); | |
return stylesheets; | |
} | |
function getStyleSheets(stylesheet) { | |
if(!stylesheet) | |
return []; // Firefox protects against @import statement loops |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import httplib | |
import json | |
result = { | |
"firefox": { | |
"build_id": "20100401064631", | |
"version": "3.6.3" | |
}, | |
"run_id": 0, | |
"timestamp": 1279376772, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
properties of jquery couchdb's 'db' object: | |
name | |
uri | |
compact | |
viewCleanup | |
compactView | |
create | |
drop | |
info | |
changes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Users/harth/jetpack-sdk/packages/jetpack-core/lib/securable-module.js b/mozmill/mozmill/extension/resource/modules/securable-module.js | |
index 57173a9..794c3e2 100644 | |
--- a/Users/harth/jetpack-sdk/packages/jetpack-core/lib/securable-module.js | |
+++ b/mozmill/mozmill/extension/resource/modules/securable-module.js | |
@@ -204,7 +204,6 @@ | |
}; | |
return chrome; | |
} | |
- | |
var path = self.fs.resolveModule(rootDir, module); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Components.utils.import("resource://gre/modules/ctypes.jsm"); | |
var EXPORTED_SYMBOLS = ["open"]; | |
nspr = ctypes.open('/Applications/Minefield.app/Contents/MacOS/libnspr4.dylib'); | |
var PR_AF_INET = 2; | |
var port = 2387; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Turns CommonJS package into a browser file. | |
Minifying requires UglifyJS (http://github.com/mishoo/UglifyJS) | |
to be in the dir above this one. | |
uses node-jake http://github.com/mde/node-jake | |
run with 'jake [build|minify|clean]' | |
*/ | |
var fs = require("fs"), | |
path = require("path"), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# HG changeset patch | |
# Parent 6585aa4bca819847388eb3ea0e43622b0f9739e0 | |
# User Henrik Skupin <[email protected]> | |
Bug 560820 - Refactor modal dialog to lower count of test failures. r=ctalbert | |
diff --git a/shared-modules/modal-dialog.js b/shared-modules/modal-dialog.js | |
--- a/shared-modules/modal-dialog.js | |
+++ b/shared-modules/modal-dialog.js | |
@@ -42,144 +42,101 @@ | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var EventUtils = {}; Components.utils.import('resource://mozmill/stdlib/EventUtils.js', EventUtils); | |
var dragBy = function(element, offsetX, offsetY, contentWindow) { | |
var rect = element.getBoundingClientRect(); | |
var startX = (rect.right - rect.left)/2; | |
var startY = (rect.bottom - rect.top)/2; | |
var incrementX = offsetX / 2; | |
var incrementY = offsetY / 2; | |
EventUtils.synthesizeMouse( |
OlderNewer