Merge pull request #2028 from webzwo0i/remove-deadcode

Remove deadcode
This commit is contained in:
John McLear 2013-12-09 10:49:57 -08:00
commit 24e96c4f8b
14 changed files with 5 additions and 576 deletions

View file

@ -51,7 +51,6 @@ function Ace2Inner(){
var linestylefilter = require('./linestylefilter').linestylefilter;
var SkipList = require('./skiplist');
var undoModule = require('./undomodule').undoModule;
var makeVirtualLineView = require('./virtual_lines').makeVirtualLineView;
var AttributeManager = require('./AttributeManager');
var DEBUG = false; //$$ build script replaces the string "var DEBUG=true;//$$" with "var DEBUG=false;"
@ -79,7 +78,6 @@ function Ace2Inner(){
iframe.ace_outerWin = null; // prevent IE 6 memory leak
var sideDiv = iframe.nextSibling;
var lineMetricsDiv = sideDiv.nextSibling;
var overlaysdiv = lineMetricsDiv.nextSibling;
initLineNumbers();
var outsideKeyDown = noop;
@ -102,13 +100,13 @@ function Ace2Inner(){
apool: new AttribPool()
};
// lines, alltext, alines, and DOM are set up in setup()
// lines, alltext, alines, and DOM are set up in init()
if (undoModule.enabled)
{
undoModule.apool = rep.apool;
}
var root, doc; // set in setup()
var root, doc; // set in init()
var isEditable = true;
var doesWrap = true;
var hasLineNumbers = true;
@ -346,19 +344,6 @@ function Ace2Inner(){
}
}
function boldColorFromColor(lightColorCSS)
{
var color = colorutils.css2triple(lightColorCSS);
// amp up the saturation to full
color = colorutils.saturate(color);
// normalize brightness based on luminosity
color = colorutils.scaleColor(color, 0, 0.5 / colorutils.luminosity(color));
return colorutils.triple2css(color);
}
function fadeColor(colorCSS, fadeFrac)
{
var color = colorutils.css2triple(colorCSS);
@ -551,22 +536,6 @@ function Ace2Inner(){
}
editorInfo.ace_inCallStackIfNecessary = inCallStackIfNecessary;
function recolorLineByKey(key)
{
if (rep.lines.containsKey(key))
{
var offset = rep.lines.offsetOfKey(key);
var width = rep.lines.atKey(key).width;
recolorLinesInRange(offset, offset + width);
}
}
function getLineKeyForOffset(charOffset)
{
return rep.lines.atOffset(charOffset).key;
}
function dispose()
{
disposed = true;
@ -1173,34 +1142,6 @@ function Ace2Inner(){
}
editorInfo.ace_fastIncorp = fastIncorp;
function incorpIfQuick()
{
var me = incorpIfQuick;
var failures = (me.failures || 0);
if (failures < 5)
{
var isTimeUp = newTimeLimit(40);
var madeChanges = incorporateUserChanges(isTimeUp);
if (isTimeUp())
{
me.failures = failures + 1;
}
return true;
}
else
{
var skipCount = (me.skipCount || 0);
skipCount++;
if (skipCount == 20)
{
skipCount = 0;
me.failures = 0;
}
me.skipCount = skipCount;
}
return false;
}
var idleWorkTimer = makeIdleAction(function()
{
@ -1807,13 +1748,6 @@ function Ace2Inner(){
return domChanges;
}
function htmlForRemovedChild(n)
{
var div = doc.createElement("DIV");
div.appendChild(n);
return div.innerHTML;
}
var STYLE_ATTRIBS = {
bold: true,
italic: true,
@ -4900,54 +4834,6 @@ function Ace2Inner(){
else $(elem).removeClass(className);
}
function setup()
{
doc = document; // defined as a var in scope outside
inCallStackIfNecessary("setup", function()
{
var body = doc.getElementById("innerdocbody");
root = body; // defined as a var in scope outside
if (browser.mozilla) addClass(root, "mozilla");
if (browser.safari) addClass(root, "safari");
if (browser.msie) addClass(root, "msie");
if (browser.msie)
{
// cache CSS background images
try
{
doc.execCommand("BackgroundImageCache", false, true);
}
catch (e)
{ /* throws an error in some IE 6 but not others! */
}
}
setClassPresence(root, "authorColors", true);
setClassPresence(root, "doesWrap", doesWrap);
initDynamicCSS();
enforceEditability();
// set up dom and rep
while (root.firstChild) root.removeChild(root.firstChild);
var oneEntry = createDomLineEntry("");
doRepLineSplice(0, rep.lines.length(), [oneEntry]);
insertDomLines(null, [oneEntry.domInfo], null);
rep.alines = Changeset.splitAttributionLines(
Changeset.makeAttribution("\n"), "\n");
bindTheEventHandlers();
});
scheduler.setTimeout(function()
{
parent.readyFunc(); // defined in code that sets up the inner iframe
}, 0);
isSetUp = true;
}
function focus()
{
window.focus();