Skip to content

Commit

Permalink
Get rid of "with (Domplate)"
Browse files Browse the repository at this point in the history
  • Loading branch information
simonlindholm committed Jan 29, 2013
1 parent 3493524 commit 47522d2
Show file tree
Hide file tree
Showing 37 changed files with 19 additions and 96 deletions.
2 changes: 0 additions & 2 deletions extension/content/firebug/chrome/balloonNote.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ Firebug.BalloonNote = function(doc, object)
this.initialize(doc, object);
};

with (D) {
Firebug.BalloonNote.prototype = D.domplate(
{
tag:
Expand Down Expand Up @@ -53,7 +52,6 @@ Firebug.BalloonNote.prototype = D.domplate(
// move from Firebug.BreakNotification
}
});
};

// ********************************************************************************************* //
});
2 changes: 0 additions & 2 deletions extension/content/firebug/chrome/infotip.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const infoTipMargin = 10;

// ********************************************************************************************* //

with (D) {
Firebug.InfoTip = Obj.extend(Firebug.Module,
{
dispatchName: "infoTip",
Expand Down Expand Up @@ -173,7 +172,6 @@ Firebug.InfoTip = Obj.extend(Firebug.Module,
this.showPanel(browser, panel);
}
});
};

// ********************************************************************************************* //
// Registration
Expand Down
2 changes: 0 additions & 2 deletions extension/content/firebug/chrome/panelActivation.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,6 @@ Firebug.PanelActivation = Obj.extend(Firebug.Module,
/**
* @domplate This template renders default content for disabled panels.
*/
with (D) {
Firebug.DisabledPanelBox = D.domplate(Firebug.Rep,
/** @lends Firebug.DisabledPanelBox */
{
Expand Down Expand Up @@ -357,7 +356,6 @@ Firebug.DisabledPanelBox = D.domplate(Firebug.Rep,
return doc.documentElement.querySelector(".disabledPanelNode");
},
});
};

// ************************************************************************************************
// Registration
Expand Down
4 changes: 1 addition & 3 deletions extension/content/firebug/chrome/reps.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ function(Obj, Arr, Firebug, D, Firefox, Xpcom, Locale, HTMLLib, Events, Wrapper,
Url, SourceLink, StackFrame, Css, Dom, Win, System, Xpath, Str, Xml, ToggleBranch,
EventMonitor, ClosureInspector, Menu, CompilationUnit) {

with (D) {

// ********************************************************************************************* //
// Constants

Expand Down Expand Up @@ -3388,4 +3386,4 @@ Firebug.setDefaultReps(FirebugReps.Func, FirebugReps.Obj);
return Firebug.Reps = FirebugReps;

// ********************************************************************************************* //
}});
});
2 changes: 0 additions & 2 deletions extension/content/firebug/chrome/tableRep.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ function(D, Locale, FirebugReps, Dom, Css, Arr) {

// ********************************************************************************************* //

with (D) {
FirebugReps.Table = D.domplate(Firebug.Rep,
{
className: "table",
Expand Down Expand Up @@ -327,7 +326,6 @@ FirebugReps.Table = D.domplate(Firebug.Rep,
return true;
}
});
};

// ********************************************************************************************* //
// Registration
Expand Down
2 changes: 0 additions & 2 deletions extension/content/firebug/console/autoCompleter.js
Original file line number Diff line number Diff line change
Expand Up @@ -974,7 +974,6 @@ Firebug.JSEditor = function()
{
};

with (D) {
Firebug.JSEditor.prototype = D.domplate(Firebug.InlineEditor.prototype,
{
setupCompleter: function(completionBox, options)
Expand Down Expand Up @@ -1023,7 +1022,6 @@ Firebug.JSEditor.prototype = D.domplate(Firebug.InlineEditor.prototype,
Firebug.Editor.update();
}
});
}

function EditorJSAutoCompleter(box, completionBox, options)
{
Expand Down
3 changes: 1 addition & 2 deletions extension/content/firebug/console/commandLineHelp.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ define([
"firebug/lib/events",
],
function(Firebug, D, Locale, Dom, CommandLineExposed, Win, Xpcom, Events) {
with (D) {

// ********************************************************************************************* //
// Constants
Expand Down Expand Up @@ -216,4 +215,4 @@ Firebug.registerCommand("help", {
return CommandLineHelp;

// ********************************************************************************************* //
}});
});
3 changes: 1 addition & 2 deletions extension/content/firebug/console/commandLineInclude.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ define([
"firebug/editor/editor",
],
function(FirebugReps, D, Locale, Dom, Win, Css, Str, Options, Menu, System, Xpcom, Obj) {
with (D) {

// ********************************************************************************************* //
// Constants
Expand Down Expand Up @@ -586,4 +585,4 @@ Firebug.registerModule(CommandLineInclude);
return CommandLineInclude;

// ********************************************************************************************* //
}});
});
3 changes: 1 addition & 2 deletions extension/content/firebug/console/functionMonitor.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ define([
"firebug/lib/url",
],
function(FBTrace, Obj, D, Reps, StackFrame, Events, Css, Dom, Url) {
with (D) {

// ********************************************************************************************* //
// Function Monitor
Expand Down Expand Up @@ -189,4 +188,4 @@ Firebug.registerRep(FunctionMonitorRep);
return FunctionMonitor;

// ********************************************************************************************* //
}});
});
3 changes: 0 additions & 3 deletions extension/content/firebug/console/memoryProfiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,6 @@ ObjectIterator.prototype =
// ********************************************************************************************* //
// Domplate Templates

with (D) {
Firebug.MemoryProfiler.ProfileTable = D.domplate(
{
tag:
Expand Down Expand Up @@ -839,8 +838,6 @@ Firebug.MemoryProfiler.ProfileSummary = D.domplate(Firebug.Rep,
}
});

} // END with Domplate

// ********************************************************************************************* //
// Private Functions

Expand Down
3 changes: 1 addition & 2 deletions extension/content/firebug/console/performanceTiming.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ define([
"firebug/lib/css",
],
function(Firebug, FBTrace, D, Obj, Locale, Dom, Events, Str, Wrapper, Css) {
with (D) {

// ********************************************************************************************* //
// Docs
Expand Down Expand Up @@ -627,4 +626,4 @@ Firebug.registerModule(PerformanceTimingModule);
return PerformanceTimingModule;

// ********************************************************************************************* //
}});
});
3 changes: 0 additions & 3 deletions extension/content/firebug/console/profiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,6 @@ Firebug.Profiler = Obj.extend(Firebug.Module,

// ********************************************************************************************* //

with (D) {
Firebug.Profiler.ProfileTable = D.domplate(
{
tag:
Expand Down Expand Up @@ -496,8 +495,6 @@ Firebug.Profiler.ProfileCall = D.domplate(Firebug.Rep,
}
});

} // END Domplate

// ********************************************************************************************* //

function ProfileCall(script, context, callCount, totalTime, totalOwnTime, minTime, maxTime, sourceLink)
Expand Down
4 changes: 1 addition & 3 deletions extension/content/firebug/cookies/breakpoints.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ define([
],
function(Obj, Locale, Str, D, Dom, Css, Events, CookieUtils) {

with (D) {

// ********************************************************************************************* //
// Constants

Expand Down Expand Up @@ -404,4 +402,4 @@ Firebug.registerRep(Breakpoints.BreakpointTemplate);
return Breakpoints;

// ********************************************************************************************* //
}});
});
4 changes: 1 addition & 3 deletions extension/content/firebug/cookies/cookieModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ function(Xpcom, Obj, Locale, D, Dom, Options, Persist, Str, Http, Css, Events, A
CookieClipboard, TabWatcher, HttpObserver, System, Cookie, CookiePermissions, EditCookie,
TraceListener, TraceModule, Firefox) {

with (D) {

// ********************************************************************************************* //
// Constants

Expand Down Expand Up @@ -1377,4 +1375,4 @@ Firebug.registerActivableModule(Firebug.CookieModule);
return Firebug.CookieModule;

// ********************************************************************************************* //
}});
});
5 changes: 1 addition & 4 deletions extension/content/firebug/cookies/cookiePanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ function(Xpcom, Obj, Locale, D, Dom, Options, Persist, Str, Http, Css, Events, A
MenuUtils, CookieReps, HeaderResizer, CookieObserver, CookieUtils, Cookie, Breakpoints,
CookiePermissions, CookieClipboard) {

with (D) {

// ********************************************************************************************* //
// Constants

Expand Down Expand Up @@ -575,5 +573,4 @@ Firebug.registerPanel(CookiePanel);
return CookiePanel;

// ********************************************************************************************* //
}});

});
5 changes: 1 addition & 4 deletions extension/content/firebug/cookies/cookieReps.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ function(Xpcom, Obj, Locale, D, Dom, Options, Persist, Str, Http, Css, Events, A
BaseObserver, MenuUtils, CookieUtils, Cookie, Breakpoints, CookieEvents,
CookiePermissions, EditCookie, CookieClipboard) {

with (D) {

// ********************************************************************************************* //
// Constants

Expand Down Expand Up @@ -1396,5 +1394,4 @@ Firebug.registerRep(
return CookieReps;

// ********************************************************************************************* //
}});

});
4 changes: 1 addition & 3 deletions extension/content/firebug/css/computedPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ define([
function(Obj, Firebug, D, Locale, Events, Css, Dom, Xml, Url, Arr, SourceLink, Menu,
Options, Str, Persist, CSSModule, CSSInfoTip) {

with (D) {

//********************************************************************************************* //
// Constants

Expand Down Expand Up @@ -877,4 +875,4 @@ Firebug.registerPanel(CSSComputedPanel);
return CSSComputedPanel;

//********************************************************************************************* //
}});
});
4 changes: 1 addition & 3 deletions extension/content/firebug/css/cssPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ function(Obj, Firebug, D, FirebugReps, Locale, Events, Url, SourceLink, Css, Dom
Search, Str, Arr, Fonts, Xml, Persist, System, Menu, Options, CSSModule, CSSInfoTip,
SelectorEditor) {

with (D) {

// ********************************************************************************************* //
// Constants

Expand Down Expand Up @@ -2699,4 +2697,4 @@ Firebug.registerPanel(Firebug.CSSStyleSheetPanel);
return Firebug.CSSStyleSheetPanel;

// ********************************************************************************************* //
}});
});
4 changes: 1 addition & 3 deletions extension/content/firebug/css/cssReps.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ define([
],
function(Obj, InfoTip, D, SourceLink, Locale, Dom, Css, Str, Fonts) {

with (D) {

// ********************************************************************************************* //
// Constants

Expand Down Expand Up @@ -219,4 +217,4 @@ function getFontFaceCSS(font)
return CSSInfoTip;

// ********************************************************************************************* //
}});
});
3 changes: 1 addition & 2 deletions extension/content/firebug/css/selectorEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ define([
"firebug/lib/array",
],
function(Firebug, D, Locale, Css, Str, Arr) {
with (D) {

// ********************************************************************************************* //
// Constants
Expand Down Expand Up @@ -249,4 +248,4 @@ SelectorEditor.stripCompletedParens = function(list, postExpr)
return SelectorEditor;

// ********************************************************************************************* //
}});
});
3 changes: 1 addition & 2 deletions extension/content/firebug/css/selectorPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ define([
"firebug/css/selectorModule",
],
function(Firebug, Obj, Locale, Events, Dom, D, Menu, SelectorEditor) {
with (D) {

// ********************************************************************************************* //
// Constants
Expand Down Expand Up @@ -457,4 +456,4 @@ Firebug.registerPanel(SelectorPanel);
return SelectorPanel;

// ********************************************************************************************* //
}});
});
4 changes: 1 addition & 3 deletions extension/content/firebug/css/stylePanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ define([
function(Obj, Firebug, Firefox, D, FirebugReps, Xpcom, Locale, Events, Url, Arr,
SourceLink, Dom, Css, Xpath, Fonts, Options, CSSModule, CSSStyleSheetPanel, Menu) {

with (D) {

// ********************************************************************************************* //
// Constants

Expand Down Expand Up @@ -931,4 +929,4 @@ Firebug.registerPanel(CSSStylePanel);
return CSSStylePanel;

// ********************************************************************************************* //
}});
});
5 changes: 1 addition & 4 deletions extension/content/firebug/dom/domBreakpointGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ define([
],
function(Obj, Firebug, D, Locale, Events, Wrapper, Dom, Css, Str, Arr, Persist) {

with (D) {

// ********************************************************************************************* //
// Constants

Expand Down Expand Up @@ -306,5 +304,4 @@ Firebug.registerRep(BreakpointRep);
return DOMBreakpointGroup;

// ********************************************************************************************* //
}});

});
2 changes: 0 additions & 2 deletions extension/content/firebug/editor/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,6 @@ Firebug.InlineEditor = function(doc)
this.initializeInline(doc);
};

with (D) {
Firebug.InlineEditor.prototype = D.domplate(Firebug.BaseEditor,
{
enterOnBlur: true,
Expand Down Expand Up @@ -1071,7 +1070,6 @@ Firebug.InlineEditor.prototype = D.domplate(Firebug.BaseEditor,
Dom.scrollIntoCenterView(this.box, null, true);
}
});
};

// ********************************************************************************************* //
// Autocompletion
Expand Down
2 changes: 0 additions & 2 deletions extension/content/firebug/firebug.js
Original file line number Diff line number Diff line change
Expand Up @@ -2476,7 +2476,6 @@ Firebug.MeasureBox =

// ********************************************************************************************* //

with (D) {
Firebug.Rep = D.domplate(
{
className: "",
Expand Down Expand Up @@ -2603,7 +2602,6 @@ Firebug.Rep = D.domplate(
return n == 1 ? "" : "s";
}
});
};

// ********************************************************************************************* //

Expand Down
4 changes: 1 addition & 3 deletions extension/content/firebug/html/htmlPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ function(Obj, Firebug, D, FirebugReps, Locale, HTMLLib, Events,
SourceLink, Css, Dom, Win, Options, Xpath, Str, Xml, Arr, Persist, Menu,
Url, CSSModule, CSSInfoTip) {

with (D) {

// ********************************************************************************************* //
// Constants

Expand Down Expand Up @@ -3164,4 +3162,4 @@ Firebug.registerRep(Firebug.HTMLModule.BreakpointRep);
return Firebug.HTMLModule;

// ********************************************************************************************* //
}});
});
Loading

0 comments on commit 47522d2

Please sign in to comment.