This commit is contained in:
Fabian Jakobs 2011-12-20 12:19:50 +01:00
commit 26fb2ae0bb
157 changed files with 4828 additions and 258 deletions

View file

@ -282,7 +282,7 @@ function loadTheme(name, callback) {
themes[name] = 1;
var base = name.split("/").pop();
var fileName = "src/theme-" + base + ".js";
var fileName = "demo/kitchen-sink/theme-" + base + "-uncompressed.js";
net.loadScript(fileName, callback);
}
@ -540,7 +540,7 @@ bindDropdown("mode", function(value) {
});
bindDropdown("theme", function(value) {
if (window.require.packaged) {
if (module.packaged) {
loadTheme(value, function() {
env.editor.setTheme(value);
});
@ -2789,9 +2789,9 @@ exports.importCssString = function importCssString(cssText, id, doc) {
if (id)
style.title = id;
} else {
style = doc.createElementNS ?
doc.createElementNS(XHTML_NS, "style") :
doc.createElement("style");
style = doc.createElementNS
? doc.createElementNS(XHTML_NS, "style")
: doc.createElement("style");
style.appendChild(doc.createTextNode(cssText));
if (id)
@ -3131,8 +3131,8 @@ exports.cssText = ".ace-tm .ace_editor {\
color: rgb(255, 0, 0)\
}";
var dom = require("../lib/dom");
dom.importCssString(exports.cssText);
var dom = require("../lib/dom");
dom.importCssString(exports.cssText, exports.cssClass);
});
/* vim:ts=4:sts=4:sw=4:
* ***** BEGIN LICENSE BLOCK *****
@ -21699,6 +21699,7 @@ var TextInput = function(parentNode, host) {
text.setAttribute("x-palm-disable-auto-cap", true);
text.style.left = "-10000px";
text.style.position = "fixed";
parentNode.insertBefore(text, parentNode.firstChild);
var PLACEHOLDER = String.fromCharCode(0);
@ -21838,7 +21839,7 @@ var TextInput = function(parentNode, host) {
if ("onbeforecopy" in text && typeof clipboardData !== "undefined") {
event.addListener(text, "beforecopy", function(e) {
var copyText = host.getCopyText();
if(copyText)
if (copyText)
clipboardData.setData("Text", copyText);
else
e.preventDefault();
@ -23830,10 +23831,7 @@ var VirtualRenderer = function(container, theme) {
// // Imports CSS once per DOM document ('ace_editor' serves as an identifier).
// dom.importCssString(editorCss, "ace_editor", container.ownerDocument);
// Chrome has some strange rendering issues if this is not done async
setTimeout(function() {
dom.addCssClass(container, "ace_editor");
}, 0);
dom.addCssClass(container, "ace_editor");
this.setTheme(theme);
@ -24109,6 +24107,9 @@ var VirtualRenderer = function(container, theme) {
// this persists in IE9
if (useragent.isIE)
return;
if (this.layerConfig.lastRow === 0)
return;
var pos = this.$cursorLayer.getPixelPosition();
if (!pos)
@ -25899,9 +25900,11 @@ var RenderLoop = function(onRender, win) {
var _self = this;
event.nextTick(function() {
_self.pending = false;
var changes = _self.changes;
_self.changes = 0;
_self.onRender(changes);
var changes;
while (changes = _self.changes) {
_self.changes = 0;
_self.onRender(changes);
}
}, this.window);
}
};