+ The path to firebug.js must be relative to your
+ html file. With this script included calls to OpenLayers.Console
+ will be displayed in the Firebug console. For browsers without
+ the Firebug extension, the script creates a Firebug Lite console.
+ This console can be opened by hitting F12 or Ctrl+Shift+L
+ (?+Shift+L on a Mac). If you want the Firebug Lite console
+ to be open when the page loads, add debug="true" to the opening
+ html tag of your page. Open the console and click on the links below
+ to see console calls.
+
'
+ );
+
+ logRow(html, "error");
+ };
+
+ function onKeyDown(event)
+ {
+ if (event.keyCode == 123)
+ toggleConsole();
+ else if ((event.keyCode == 108 || event.keyCode == 76) && event.shiftKey
+ && (event.metaKey || event.ctrlKey))
+ focusCommandLine();
+ else
+ return;
+
+ cancelEvent(event);
+ }
+
+ function onSplitterMouseDown(event)
+ {
+ if (isSafari || isOpera)
+ return;
+
+ addEvent(document, "mousemove", onSplitterMouseMove);
+ addEvent(document, "mouseup", onSplitterMouseUp);
+
+ for (var i = 0; i < frames.length; ++i)
+ {
+ addEvent(frames[i].document, "mousemove", onSplitterMouseMove);
+ addEvent(frames[i].document, "mouseup", onSplitterMouseUp);
+ }
+ }
+
+ function onSplitterMouseMove(event)
+ {
+ var win = document.all
+ ? event.srcElement.ownerDocument.parentWindow
+ : event.target.ownerDocument.defaultView;
+
+ var clientY = event.clientY;
+ if (win != win.parent)
+ clientY += win.frameElement ? win.frameElement.offsetTop : 0;
+
+ var height = consoleFrame.offsetTop + consoleFrame.clientHeight;
+ var toolbar = consoleBody.ownerDocument.getElementById("toolbar");
+ var y = Math.max(height - clientY,
+ toolbar.offsetHeight + commandLine.offsetHeight);
+
+ consoleFrame.style.height = y + "px";
+ layout();
+ }
+
+ function onSplitterMouseUp(event)
+ {
+ removeEvent(document, "mousemove", onSplitterMouseMove);
+ removeEvent(document, "mouseup", onSplitterMouseUp);
+
+ for (var i = 0; i < frames.length; ++i)
+ {
+ removeEvent(frames[i].document, "mousemove", onSplitterMouseMove);
+ removeEvent(frames[i].document, "mouseup", onSplitterMouseUp);
+ }
+ }
+
+ function onCommandLineKeyDown(event)
+ {
+ if (event.keyCode == 13)
+ evalCommandLine();
+ else if (event.keyCode == 27)
+ commandLine.value = "";
+ }
+
+ window.onerror = onError;
+ addEvent(document, isIE || isSafari ? "keydown" : "keypress", onKeyDown);
+
+ if (document.documentElement.getAttribute("debug") == "true")
+ toggleConsole(true);
+})();
+}
diff --git a/lib/Firebug/firebugx.js b/lib/Firebug/firebugx.js
new file mode 100644
index 0000000000..343686250e
--- /dev/null
+++ b/lib/Firebug/firebugx.js
@@ -0,0 +1,10 @@
+
+if (!window.console || !console.firebug)
+{
+ var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml",
+ "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
+
+ window.console = {};
+ for (var i = 0; i < names.length; ++i)
+ window.console[names[i]] = function() {}
+}
\ No newline at end of file
diff --git a/lib/Firebug/infoIcon.png b/lib/Firebug/infoIcon.png
new file mode 100644
index 0000000000..da1e5334c1
Binary files /dev/null and b/lib/Firebug/infoIcon.png differ
diff --git a/lib/Firebug/license.txt b/lib/Firebug/license.txt
new file mode 100644
index 0000000000..ba43b7514b
--- /dev/null
+++ b/lib/Firebug/license.txt
@@ -0,0 +1,30 @@
+Software License Agreement (BSD License)
+
+Copyright (c) 2007, Parakey Inc.
+All rights reserved.
+
+Redistribution and use of this software in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above
+ copyright notice, this list of conditions and the
+ following disclaimer.
+
+* Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the
+ following disclaimer in the documentation and/or other
+ materials provided with the distribution.
+
+* Neither the name of Parakey Inc. nor the names of its
+ contributors may be used to endorse or promote products
+ derived from this software without specific prior
+ written permission of Parakey Inc.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/lib/Firebug/readme.txt b/lib/Firebug/readme.txt
new file mode 100644
index 0000000000..1edebf5654
--- /dev/null
+++ b/lib/Firebug/readme.txt
@@ -0,0 +1,13 @@
+This directory contains the source for Firebug Lite
+(http://www.getfirebug.com/lite.html). This code is distributed with a
+BSD License, Copyright (c) 2007, Parakey Inc. See the included license.txt
+for the full text of the license.
+
+This is a patched version of the trunk from
+http://fbug.googlecode.com/svn/trunk.
+
+Revision 36 was patched to resolve the issue described here
+http://code.google.com/p/fbug/issues/detail?id=85
+
+When this issue is resolved, Firebug Lite can be used directly - no further
+modifications are needed for OpenLayers.
\ No newline at end of file
diff --git a/lib/Firebug/warningIcon.png b/lib/Firebug/warningIcon.png
new file mode 100644
index 0000000000..de51084e84
Binary files /dev/null and b/lib/Firebug/warningIcon.png differ
diff --git a/lib/OpenLayers.js b/lib/OpenLayers.js
index 89cc92f102..03c31ed8d4 100644
--- a/lib/OpenLayers.js
+++ b/lib/OpenLayers.js
@@ -54,6 +54,7 @@ if (typeof(_OPENLAYERS_SFL_) == "undefined") {
var jsfiles=new Array(
"OpenLayers/BaseTypes.js",
"OpenLayers/Util.js",
+ "OpenLayers/Console.js",
"Rico/Corner.js",
"Rico/Color.js",
"OpenLayers/Ajax.js",
diff --git a/lib/OpenLayers/Console.js b/lib/OpenLayers/Console.js
new file mode 100644
index 0000000000..f87da26c9e
--- /dev/null
+++ b/lib/OpenLayers/Console.js
@@ -0,0 +1,39 @@
+/* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license.
+ * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt
+ * for the full text of the license. */
+
+/**
+ * The OpenLayers.Console namespace is used for debugging and error logging.
+ * If the Firebug Lite (../Firebug/firebug.js) is included before this script,
+ * calls to OpenLayers.Console methods will get redirected to window.console.
+ * This makes use of the Firebug extension where available and allows for
+ * cross-browser debugging Firebug style.
+ */
+OpenLayers.Console = {};
+(function() {
+ /**
+ * Create empty functions for all console methods. The real value of these
+ * properties will be set if Firebug Lite (../Firebug/firebug.js script) is
+ * included. We explicitly require the Firebug Lite script to trigger
+ * functionality of the OpenLayers.Console methods.
+ */
+ var methods = ['log', 'debug', 'info', 'warn', 'error', 'assert',
+ 'dir', 'dirxml', 'trace', 'group', 'groupEnd', 'time',
+ 'timeEnd', 'profile', 'profileEnd', 'count'];
+ for(var i=0; iBaseTypes/test_Size.html