Updating the Chromium and Google Chrome reference builds on Mac. Synced to revision 41134.

TEST=none
BUG=none

Review URL: http://codereview.chromium.org/1021007

git-svn-id: http://src.chromium.org/svn/trunk/deps/reference_builds/chrome_mac@41963 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
diff --git a/Chromium.app/Contents/Info.plist b/Chromium.app/Contents/Info.plist
index 0d2ac45..9c2f065 100644
--- a/Chromium.app/Contents/Info.plist
+++ b/Chromium.app/Contents/Info.plist
@@ -149,7 +149,7 @@
 	<key>CFBundlePackageType</key>
 	<string>APPL</string>
 	<key>CFBundleShortVersionString</key>
-	<string>4.0.287.0</string>
+	<string>5.0.350.0</string>
 	<key>CFBundleSignature</key>
 	<string>Cr24</string>
 	<key>CFBundleURLTypes</key>
@@ -181,7 +181,7 @@
 		</dict>
 	</array>
 	<key>CFBundleVersion</key>
-	<string>287.0</string>
+	<string>350.0</string>
 	<key>LSFileQuarantineEnabled</key>
 	<true/>
 	<key>LSHasLocalizedDisplayName</key>
@@ -193,7 +193,7 @@
 	<key>SVNPath</key>
 	<string>/trunk/src</string>
 	<key>SVNRevision</key>
-	<string>35417</string>
+	<string>41134</string>
 	<key>UTExportedTypeDeclarations</key>
 	<array>
 		<dict>
diff --git a/Chromium.app/Contents/MacOS/Chromium b/Chromium.app/Contents/MacOS/Chromium
index 0c0c419..356dff9 100755
--- a/Chromium.app/Contents/MacOS/Chromium
+++ b/Chromium.app/Contents/MacOS/Chromium
Binary files differ
diff --git a/Chromium.app/Contents/Resources/am.lproj/InfoPlist.strings b/Chromium.app/Contents/Resources/am.lproj/InfoPlist.strings
index 39442d8..43a7b17 100644
--- a/Chromium.app/Contents/Resources/am.lproj/InfoPlist.strings
+++ b/Chromium.app/Contents/Resources/am.lproj/InfoPlist.strings
Binary files differ
diff --git a/Chromium.app/Contents/Resources/ar.lproj/InfoPlist.strings b/Chromium.app/Contents/Resources/ar.lproj/InfoPlist.strings
index 39442d8..43a7b17 100644
--- a/Chromium.app/Contents/Resources/ar.lproj/InfoPlist.strings
+++ b/Chromium.app/Contents/Resources/ar.lproj/InfoPlist.strings
Binary files differ
diff --git a/Chromium.app/Contents/Resources/bg.lproj/InfoPlist.strings b/Chromium.app/Contents/Resources/bg.lproj/InfoPlist.strings
index 39442d8..43a7b17 100644
--- a/Chromium.app/Contents/Resources/bg.lproj/InfoPlist.strings
+++ b/Chromium.app/Contents/Resources/bg.lproj/InfoPlist.strings
Binary files differ
diff --git a/Chromium.app/Contents/Resources/bn.lproj/InfoPlist.strings b/Chromium.app/Contents/Resources/bn.lproj/InfoPlist.strings
index 39442d8..43a7b17 100644
--- a/Chromium.app/Contents/Resources/bn.lproj/InfoPlist.strings
+++ b/Chromium.app/Contents/Resources/bn.lproj/InfoPlist.strings
Binary files differ
diff --git a/Chromium.app/Contents/Resources/ca.lproj/InfoPlist.strings b/Chromium.app/Contents/Resources/ca.lproj/InfoPlist.strings
index 39442d8..43a7b17 100644
--- a/Chromium.app/Contents/Resources/ca.lproj/InfoPlist.strings
+++ b/Chromium.app/Contents/Resources/ca.lproj/InfoPlist.strings
Binary files differ
diff --git a/Chromium.app/Contents/Resources/cs.lproj/InfoPlist.strings b/Chromium.app/Contents/Resources/cs.lproj/InfoPlist.strings
index 39442d8..43a7b17 100644
--- a/Chromium.app/Contents/Resources/cs.lproj/InfoPlist.strings
+++ b/Chromium.app/Contents/Resources/cs.lproj/InfoPlist.strings
Binary files differ
diff --git a/Chromium.app/Contents/Resources/da.lproj/InfoPlist.strings b/Chromium.app/Contents/Resources/da.lproj/InfoPlist.strings
index 39442d8..43a7b17 100644
--- a/Chromium.app/Contents/Resources/da.lproj/InfoPlist.strings
+++ b/Chromium.app/Contents/Resources/da.lproj/InfoPlist.strings
Binary files differ
diff --git a/Chromium.app/Contents/Resources/de.lproj/InfoPlist.strings b/Chromium.app/Contents/Resources/de.lproj/InfoPlist.strings
index 39442d8..43a7b17 100644
--- a/Chromium.app/Contents/Resources/de.lproj/InfoPlist.strings
+++ b/Chromium.app/Contents/Resources/de.lproj/InfoPlist.strings
Binary files differ
diff --git a/Chromium.app/Contents/Resources/el.lproj/InfoPlist.strings b/Chromium.app/Contents/Resources/el.lproj/InfoPlist.strings
index 39442d8..43a7b17 100644
--- a/Chromium.app/Contents/Resources/el.lproj/InfoPlist.strings
+++ b/Chromium.app/Contents/Resources/el.lproj/InfoPlist.strings
Binary files differ
diff --git a/Chromium.app/Contents/Resources/en.lproj/InfoPlist.strings b/Chromium.app/Contents/Resources/en.lproj/InfoPlist.strings
index 39442d8..43a7b17 100644
--- a/Chromium.app/Contents/Resources/en.lproj/InfoPlist.strings
+++ b/Chromium.app/Contents/Resources/en.lproj/InfoPlist.strings
Binary files differ
diff --git a/Chromium.app/Contents/Resources/en_GB.lproj/InfoPlist.strings b/Chromium.app/Contents/Resources/en_GB.lproj/InfoPlist.strings
index 39442d8..43a7b17 100644
--- a/Chromium.app/Contents/Resources/en_GB.lproj/InfoPlist.strings
+++ b/Chromium.app/Contents/Resources/en_GB.lproj/InfoPlist.strings
Binary files differ
diff --git a/Chromium.app/Contents/Resources/es.lproj/InfoPlist.strings b/Chromium.app/Contents/Resources/es.lproj/InfoPlist.strings
index 39442d8..43a7b17 100644
--- a/Chromium.app/Contents/Resources/es.lproj/InfoPlist.strings
+++ b/Chromium.app/Contents/Resources/es.lproj/InfoPlist.strings
Binary files differ
diff --git a/Chromium.app/Contents/Resources/es_419.lproj/InfoPlist.strings b/Chromium.app/Contents/Resources/es_419.lproj/InfoPlist.strings
index 39442d8..43a7b17 100644
--- a/Chromium.app/Contents/Resources/es_419.lproj/InfoPlist.strings
+++ b/Chromium.app/Contents/Resources/es_419.lproj/InfoPlist.strings
Binary files differ
diff --git a/Chromium.app/Contents/Resources/et.lproj/InfoPlist.strings b/Chromium.app/Contents/Resources/et.lproj/InfoPlist.strings
index 39442d8..43a7b17 100644
--- a/Chromium.app/Contents/Resources/et.lproj/InfoPlist.strings
+++ b/Chromium.app/Contents/Resources/et.lproj/InfoPlist.strings
Binary files differ
diff --git a/Chromium.app/Contents/Resources/fi.lproj/InfoPlist.strings b/Chromium.app/Contents/Resources/fi.lproj/InfoPlist.strings
index 39442d8..43a7b17 100644
--- a/Chromium.app/Contents/Resources/fi.lproj/InfoPlist.strings
+++ b/Chromium.app/Contents/Resources/fi.lproj/InfoPlist.strings
Binary files differ
diff --git a/Chromium.app/Contents/Resources/fil.lproj/InfoPlist.strings b/Chromium.app/Contents/Resources/fil.lproj/InfoPlist.strings
index 39442d8..43a7b17 100644
--- a/Chromium.app/Contents/Resources/fil.lproj/InfoPlist.strings
+++ b/Chromium.app/Contents/Resources/fil.lproj/InfoPlist.strings
Binary files differ
diff --git a/Chromium.app/Contents/Resources/fr.lproj/InfoPlist.strings b/Chromium.app/Contents/Resources/fr.lproj/InfoPlist.strings
index 39442d8..43a7b17 100644
--- a/Chromium.app/Contents/Resources/fr.lproj/InfoPlist.strings
+++ b/Chromium.app/Contents/Resources/fr.lproj/InfoPlist.strings
Binary files differ
diff --git a/Chromium.app/Contents/Resources/gu.lproj/InfoPlist.strings b/Chromium.app/Contents/Resources/gu.lproj/InfoPlist.strings
index 39442d8..43a7b17 100644
--- a/Chromium.app/Contents/Resources/gu.lproj/InfoPlist.strings
+++ b/Chromium.app/Contents/Resources/gu.lproj/InfoPlist.strings
Binary files differ
diff --git a/Chromium.app/Contents/Resources/he.lproj/InfoPlist.strings b/Chromium.app/Contents/Resources/he.lproj/InfoPlist.strings
index 39442d8..43a7b17 100644
--- a/Chromium.app/Contents/Resources/he.lproj/InfoPlist.strings
+++ b/Chromium.app/Contents/Resources/he.lproj/InfoPlist.strings
Binary files differ
diff --git a/Chromium.app/Contents/Resources/hi.lproj/InfoPlist.strings b/Chromium.app/Contents/Resources/hi.lproj/InfoPlist.strings
index 39442d8..43a7b17 100644
--- a/Chromium.app/Contents/Resources/hi.lproj/InfoPlist.strings
+++ b/Chromium.app/Contents/Resources/hi.lproj/InfoPlist.strings
Binary files differ
diff --git a/Chromium.app/Contents/Resources/hr.lproj/InfoPlist.strings b/Chromium.app/Contents/Resources/hr.lproj/InfoPlist.strings
index 39442d8..43a7b17 100644
--- a/Chromium.app/Contents/Resources/hr.lproj/InfoPlist.strings
+++ b/Chromium.app/Contents/Resources/hr.lproj/InfoPlist.strings
Binary files differ
diff --git a/Chromium.app/Contents/Resources/hu.lproj/InfoPlist.strings b/Chromium.app/Contents/Resources/hu.lproj/InfoPlist.strings
index 39442d8..43a7b17 100644
--- a/Chromium.app/Contents/Resources/hu.lproj/InfoPlist.strings
+++ b/Chromium.app/Contents/Resources/hu.lproj/InfoPlist.strings
Binary files differ
diff --git a/Chromium.app/Contents/Resources/id.lproj/InfoPlist.strings b/Chromium.app/Contents/Resources/id.lproj/InfoPlist.strings
index 39442d8..43a7b17 100644
--- a/Chromium.app/Contents/Resources/id.lproj/InfoPlist.strings
+++ b/Chromium.app/Contents/Resources/id.lproj/InfoPlist.strings
Binary files differ
diff --git a/Chromium.app/Contents/Resources/it.lproj/InfoPlist.strings b/Chromium.app/Contents/Resources/it.lproj/InfoPlist.strings
index 39442d8..43a7b17 100644
--- a/Chromium.app/Contents/Resources/it.lproj/InfoPlist.strings
+++ b/Chromium.app/Contents/Resources/it.lproj/InfoPlist.strings
Binary files differ
diff --git a/Chromium.app/Contents/Resources/ja.lproj/InfoPlist.strings b/Chromium.app/Contents/Resources/ja.lproj/InfoPlist.strings
index 39442d8..43a7b17 100644
--- a/Chromium.app/Contents/Resources/ja.lproj/InfoPlist.strings
+++ b/Chromium.app/Contents/Resources/ja.lproj/InfoPlist.strings
Binary files differ
diff --git a/Chromium.app/Contents/Resources/kn.lproj/InfoPlist.strings b/Chromium.app/Contents/Resources/kn.lproj/InfoPlist.strings
index 39442d8..43a7b17 100644
--- a/Chromium.app/Contents/Resources/kn.lproj/InfoPlist.strings
+++ b/Chromium.app/Contents/Resources/kn.lproj/InfoPlist.strings
Binary files differ
diff --git a/Chromium.app/Contents/Resources/ko.lproj/InfoPlist.strings b/Chromium.app/Contents/Resources/ko.lproj/InfoPlist.strings
index 39442d8..43a7b17 100644
--- a/Chromium.app/Contents/Resources/ko.lproj/InfoPlist.strings
+++ b/Chromium.app/Contents/Resources/ko.lproj/InfoPlist.strings
Binary files differ
diff --git a/Chromium.app/Contents/Resources/lt.lproj/InfoPlist.strings b/Chromium.app/Contents/Resources/lt.lproj/InfoPlist.strings
index 39442d8..43a7b17 100644
--- a/Chromium.app/Contents/Resources/lt.lproj/InfoPlist.strings
+++ b/Chromium.app/Contents/Resources/lt.lproj/InfoPlist.strings
Binary files differ
diff --git a/Chromium.app/Contents/Resources/lv.lproj/InfoPlist.strings b/Chromium.app/Contents/Resources/lv.lproj/InfoPlist.strings
index 39442d8..43a7b17 100644
--- a/Chromium.app/Contents/Resources/lv.lproj/InfoPlist.strings
+++ b/Chromium.app/Contents/Resources/lv.lproj/InfoPlist.strings
Binary files differ
diff --git a/Chromium.app/Contents/Resources/ml.lproj/InfoPlist.strings b/Chromium.app/Contents/Resources/ml.lproj/InfoPlist.strings
index 39442d8..43a7b17 100644
--- a/Chromium.app/Contents/Resources/ml.lproj/InfoPlist.strings
+++ b/Chromium.app/Contents/Resources/ml.lproj/InfoPlist.strings
Binary files differ
diff --git a/Chromium.app/Contents/Resources/mr.lproj/InfoPlist.strings b/Chromium.app/Contents/Resources/mr.lproj/InfoPlist.strings
index 39442d8..43a7b17 100644
--- a/Chromium.app/Contents/Resources/mr.lproj/InfoPlist.strings
+++ b/Chromium.app/Contents/Resources/mr.lproj/InfoPlist.strings
Binary files differ
diff --git a/Chromium.app/Contents/Resources/nb.lproj/InfoPlist.strings b/Chromium.app/Contents/Resources/nb.lproj/InfoPlist.strings
index 39442d8..43a7b17 100644
--- a/Chromium.app/Contents/Resources/nb.lproj/InfoPlist.strings
+++ b/Chromium.app/Contents/Resources/nb.lproj/InfoPlist.strings
Binary files differ
diff --git a/Chromium.app/Contents/Resources/nl.lproj/InfoPlist.strings b/Chromium.app/Contents/Resources/nl.lproj/InfoPlist.strings
index 39442d8..43a7b17 100644
--- a/Chromium.app/Contents/Resources/nl.lproj/InfoPlist.strings
+++ b/Chromium.app/Contents/Resources/nl.lproj/InfoPlist.strings
Binary files differ
diff --git a/Chromium.app/Contents/Resources/or.lproj/InfoPlist.strings b/Chromium.app/Contents/Resources/or.lproj/InfoPlist.strings
index 39442d8..43a7b17 100644
--- a/Chromium.app/Contents/Resources/or.lproj/InfoPlist.strings
+++ b/Chromium.app/Contents/Resources/or.lproj/InfoPlist.strings
Binary files differ
diff --git a/Chromium.app/Contents/Resources/pl.lproj/InfoPlist.strings b/Chromium.app/Contents/Resources/pl.lproj/InfoPlist.strings
index 39442d8..43a7b17 100644
--- a/Chromium.app/Contents/Resources/pl.lproj/InfoPlist.strings
+++ b/Chromium.app/Contents/Resources/pl.lproj/InfoPlist.strings
Binary files differ
diff --git a/Chromium.app/Contents/Resources/pt_BR.lproj/InfoPlist.strings b/Chromium.app/Contents/Resources/pt_BR.lproj/InfoPlist.strings
index 39442d8..43a7b17 100644
--- a/Chromium.app/Contents/Resources/pt_BR.lproj/InfoPlist.strings
+++ b/Chromium.app/Contents/Resources/pt_BR.lproj/InfoPlist.strings
Binary files differ
diff --git a/Chromium.app/Contents/Resources/pt_PT.lproj/InfoPlist.strings b/Chromium.app/Contents/Resources/pt_PT.lproj/InfoPlist.strings
index 39442d8..43a7b17 100644
--- a/Chromium.app/Contents/Resources/pt_PT.lproj/InfoPlist.strings
+++ b/Chromium.app/Contents/Resources/pt_PT.lproj/InfoPlist.strings
Binary files differ
diff --git a/Chromium.app/Contents/Resources/ro.lproj/InfoPlist.strings b/Chromium.app/Contents/Resources/ro.lproj/InfoPlist.strings
index 39442d8..43a7b17 100644
--- a/Chromium.app/Contents/Resources/ro.lproj/InfoPlist.strings
+++ b/Chromium.app/Contents/Resources/ro.lproj/InfoPlist.strings
Binary files differ
diff --git a/Chromium.app/Contents/Resources/ru.lproj/InfoPlist.strings b/Chromium.app/Contents/Resources/ru.lproj/InfoPlist.strings
index 39442d8..43a7b17 100644
--- a/Chromium.app/Contents/Resources/ru.lproj/InfoPlist.strings
+++ b/Chromium.app/Contents/Resources/ru.lproj/InfoPlist.strings
Binary files differ
diff --git a/Chromium.app/Contents/Resources/sk.lproj/InfoPlist.strings b/Chromium.app/Contents/Resources/sk.lproj/InfoPlist.strings
index 39442d8..43a7b17 100644
--- a/Chromium.app/Contents/Resources/sk.lproj/InfoPlist.strings
+++ b/Chromium.app/Contents/Resources/sk.lproj/InfoPlist.strings
Binary files differ
diff --git a/Chromium.app/Contents/Resources/sl.lproj/InfoPlist.strings b/Chromium.app/Contents/Resources/sl.lproj/InfoPlist.strings
index 39442d8..43a7b17 100644
--- a/Chromium.app/Contents/Resources/sl.lproj/InfoPlist.strings
+++ b/Chromium.app/Contents/Resources/sl.lproj/InfoPlist.strings
Binary files differ
diff --git a/Chromium.app/Contents/Resources/sr.lproj/InfoPlist.strings b/Chromium.app/Contents/Resources/sr.lproj/InfoPlist.strings
index 39442d8..43a7b17 100644
--- a/Chromium.app/Contents/Resources/sr.lproj/InfoPlist.strings
+++ b/Chromium.app/Contents/Resources/sr.lproj/InfoPlist.strings
Binary files differ
diff --git a/Chromium.app/Contents/Resources/sv.lproj/InfoPlist.strings b/Chromium.app/Contents/Resources/sv.lproj/InfoPlist.strings
index 39442d8..43a7b17 100644
--- a/Chromium.app/Contents/Resources/sv.lproj/InfoPlist.strings
+++ b/Chromium.app/Contents/Resources/sv.lproj/InfoPlist.strings
Binary files differ
diff --git a/Chromium.app/Contents/Resources/sw.lproj/InfoPlist.strings b/Chromium.app/Contents/Resources/sw.lproj/InfoPlist.strings
index 39442d8..43a7b17 100644
--- a/Chromium.app/Contents/Resources/sw.lproj/InfoPlist.strings
+++ b/Chromium.app/Contents/Resources/sw.lproj/InfoPlist.strings
Binary files differ
diff --git a/Chromium.app/Contents/Resources/ta.lproj/InfoPlist.strings b/Chromium.app/Contents/Resources/ta.lproj/InfoPlist.strings
index 39442d8..43a7b17 100644
--- a/Chromium.app/Contents/Resources/ta.lproj/InfoPlist.strings
+++ b/Chromium.app/Contents/Resources/ta.lproj/InfoPlist.strings
Binary files differ
diff --git a/Chromium.app/Contents/Resources/te.lproj/InfoPlist.strings b/Chromium.app/Contents/Resources/te.lproj/InfoPlist.strings
index 39442d8..43a7b17 100644
--- a/Chromium.app/Contents/Resources/te.lproj/InfoPlist.strings
+++ b/Chromium.app/Contents/Resources/te.lproj/InfoPlist.strings
Binary files differ
diff --git a/Chromium.app/Contents/Resources/th.lproj/InfoPlist.strings b/Chromium.app/Contents/Resources/th.lproj/InfoPlist.strings
index 39442d8..43a7b17 100644
--- a/Chromium.app/Contents/Resources/th.lproj/InfoPlist.strings
+++ b/Chromium.app/Contents/Resources/th.lproj/InfoPlist.strings
Binary files differ
diff --git a/Chromium.app/Contents/Resources/tr.lproj/InfoPlist.strings b/Chromium.app/Contents/Resources/tr.lproj/InfoPlist.strings
index 39442d8..43a7b17 100644
--- a/Chromium.app/Contents/Resources/tr.lproj/InfoPlist.strings
+++ b/Chromium.app/Contents/Resources/tr.lproj/InfoPlist.strings
Binary files differ
diff --git a/Chromium.app/Contents/Resources/uk.lproj/InfoPlist.strings b/Chromium.app/Contents/Resources/uk.lproj/InfoPlist.strings
index 39442d8..43a7b17 100644
--- a/Chromium.app/Contents/Resources/uk.lproj/InfoPlist.strings
+++ b/Chromium.app/Contents/Resources/uk.lproj/InfoPlist.strings
Binary files differ
diff --git a/Chromium.app/Contents/Resources/vi.lproj/InfoPlist.strings b/Chromium.app/Contents/Resources/vi.lproj/InfoPlist.strings
index 39442d8..43a7b17 100644
--- a/Chromium.app/Contents/Resources/vi.lproj/InfoPlist.strings
+++ b/Chromium.app/Contents/Resources/vi.lproj/InfoPlist.strings
Binary files differ
diff --git a/Chromium.app/Contents/Resources/zh_CN.lproj/InfoPlist.strings b/Chromium.app/Contents/Resources/zh_CN.lproj/InfoPlist.strings
index 39442d8..43a7b17 100644
--- a/Chromium.app/Contents/Resources/zh_CN.lproj/InfoPlist.strings
+++ b/Chromium.app/Contents/Resources/zh_CN.lproj/InfoPlist.strings
Binary files differ
diff --git a/Chromium.app/Contents/Resources/zh_TW.lproj/InfoPlist.strings b/Chromium.app/Contents/Resources/zh_TW.lproj/InfoPlist.strings
index 39442d8..43a7b17 100644
--- a/Chromium.app/Contents/Resources/zh_TW.lproj/InfoPlist.strings
+++ b/Chromium.app/Contents/Resources/zh_TW.lproj/InfoPlist.strings
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Chromium Framework b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Chromium Framework
deleted file mode 100755
index c1cee0c..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Chromium Framework
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Libraries/libffmpegsumo.dylib b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Libraries/libffmpegsumo.dylib
deleted file mode 100755
index 23efd07..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Libraries/libffmpegsumo.dylib
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/About.nib b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/About.nib
deleted file mode 100644
index 9a6c6ba..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/About.nib
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/AboutIPC.nib b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/AboutIPC.nib
deleted file mode 100644
index 38fa57d..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/AboutIPC.nib
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/BookmarkAllTabs.nib b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/BookmarkAllTabs.nib
deleted file mode 100644
index 9a5d827..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/BookmarkAllTabs.nib
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/BookmarkBar.nib b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/BookmarkBar.nib
deleted file mode 100644
index 5600e2a..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/BookmarkBar.nib
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/BookmarkBubble.nib b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/BookmarkBubble.nib
deleted file mode 100644
index d3aa737..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/BookmarkBubble.nib
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/BookmarkEditor.nib b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/BookmarkEditor.nib
deleted file mode 100644
index e526372..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/BookmarkEditor.nib
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/BookmarkNameFolder.nib b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/BookmarkNameFolder.nib
deleted file mode 100644
index 0ac1336..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/BookmarkNameFolder.nib
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/BrowserWindow.nib b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/BrowserWindow.nib
deleted file mode 100644
index c3143af..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/BrowserWindow.nib
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/ClearBrowsingData.nib b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/ClearBrowsingData.nib
deleted file mode 100644
index 06d8a16..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/ClearBrowsingData.nib
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/DownloadItem.nib b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/DownloadItem.nib
deleted file mode 100644
index f8e7b36..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/DownloadItem.nib
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/DownloadShelf.nib b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/DownloadShelf.nib
deleted file mode 100644
index a5da249..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/DownloadShelf.nib
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/EditSearchEngine.nib b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/EditSearchEngine.nib
deleted file mode 100644
index d96ed89..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/EditSearchEngine.nib
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/ExtensionShelf.nib b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/ExtensionShelf.nib
deleted file mode 100644
index f9b9010..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/ExtensionShelf.nib
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/FindBar.nib b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/FindBar.nib
deleted file mode 100644
index b7357b4..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/FindBar.nib
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/FirstRunDialog.nib b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/FirstRunDialog.nib
deleted file mode 100644
index a9036c7..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/FirstRunDialog.nib
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/FontLanguageSettings.nib b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/FontLanguageSettings.nib
deleted file mode 100644
index c95d03a..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/FontLanguageSettings.nib
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/HttpAuthLoginSheet.nib b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/HttpAuthLoginSheet.nib
deleted file mode 100644
index 39bec17..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/HttpAuthLoginSheet.nib
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/HungRendererDialog.nib b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/HungRendererDialog.nib
deleted file mode 100644
index 2543b86..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/HungRendererDialog.nib
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/ImportProgressDialog.nib b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/ImportProgressDialog.nib
deleted file mode 100644
index 7d09c7c..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/ImportProgressDialog.nib
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/ImportSettingsDialog.nib b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/ImportSettingsDialog.nib
deleted file mode 100644
index 03b0605..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/ImportSettingsDialog.nib
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/Info.plist b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/Info.plist
deleted file mode 100644
index 7727f06..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/Info.plist
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>CFBundleDevelopmentRegion</key>
-	<string>en</string>
-	<key>CFBundleExecutable</key>
-	<string>Chromium Framework</string>
-	<key>CFBundleIdentifier</key>
-	<string>org.chromium.Chromium.framework</string>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundlePackageType</key>
-	<string>FMWK</string>
-	<key>CFBundleShortVersionString</key>
-	<string>4.0.287.0</string>
-	<key>CFBundleSignature</key>
-	<string>????</string>
-	<key>CFBundleVersion</key>
-	<string>287.0</string>
-	<key>SVNPath</key>
-	<string>/trunk/src</string>
-	<key>SVNRevision</key>
-	<string>35417</string>
-</dict>
-</plist>
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/InfoBar.nib b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/InfoBar.nib
deleted file mode 100644
index 4b4f362..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/InfoBar.nib
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/InfoBarContainer.nib b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/InfoBarContainer.nib
deleted file mode 100644
index 0a672d2..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/InfoBarContainer.nib
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/KeywordEditor.nib b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/KeywordEditor.nib
deleted file mode 100644
index 3a82cde..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/KeywordEditor.nib
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/MainMenu.nib b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/MainMenu.nib
deleted file mode 100644
index b43bd3c..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/MainMenu.nib
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/PageInfo.nib b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/PageInfo.nib
deleted file mode 100644
index 83c6284..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/PageInfo.nib
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/Preferences.nib b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/Preferences.nib
deleted file mode 100644
index e6552bb..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/Preferences.nib
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/ReportBug.nib b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/ReportBug.nib
deleted file mode 100644
index 0a49d09..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/ReportBug.nib
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/SadTab.nib b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/SadTab.nib
deleted file mode 100644
index 3c731f9..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/SadTab.nib
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/SaveAccessoryView.nib b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/SaveAccessoryView.nib
deleted file mode 100644
index 7bb95bb..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/SaveAccessoryView.nib
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/TabContents.nib b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/TabContents.nib
deleted file mode 100644
index 722821e..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/TabContents.nib
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/TabView.nib b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/TabView.nib
deleted file mode 100644
index a2847d8..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/TabView.nib
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/TaskManager.nib b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/TaskManager.nib
deleted file mode 100644
index 99a6d2b..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/TaskManager.nib
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/Toolbar.nib b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/Toolbar.nib
deleted file mode 100644
index 38e2779..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/Toolbar.nib
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/am.lproj/locale.pak b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/am.lproj/locale.pak
deleted file mode 100644
index 335776d..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/am.lproj/locale.pak
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/ar.lproj/locale.pak b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/ar.lproj/locale.pak
deleted file mode 100644
index 1e10194..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/ar.lproj/locale.pak
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/back_Template.pdf b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/back_Template.pdf
deleted file mode 100644
index 90fe387..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/back_Template.pdf
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/bg.lproj/locale.pak b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/bg.lproj/locale.pak
deleted file mode 100644
index 821645e..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/bg.lproj/locale.pak
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/bn.lproj/locale.pak b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/bn.lproj/locale.pak
deleted file mode 100644
index c22b8b0..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/bn.lproj/locale.pak
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/ca.lproj/locale.pak b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/ca.lproj/locale.pak
deleted file mode 100644
index e3138be..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/ca.lproj/locale.pak
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/chrome.pak b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/chrome.pak
deleted file mode 100644
index 42d0420..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/chrome.pak
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/close_bar.pdf b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/close_bar.pdf
deleted file mode 100644
index 0e5b791..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/close_bar.pdf
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/close_bar_h.pdf b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/close_bar_h.pdf
deleted file mode 100644
index 7445a6d..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/close_bar_h.pdf
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/close_bar_p.pdf b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/close_bar_p.pdf
deleted file mode 100644
index 138a944..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/close_bar_p.pdf
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/cs.lproj/locale.pak b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/cs.lproj/locale.pak
deleted file mode 100644
index 815f87a..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/cs.lproj/locale.pak
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/da.lproj/locale.pak b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/da.lproj/locale.pak
deleted file mode 100644
index 26a2e2b..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/da.lproj/locale.pak
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/de.lproj/locale.pak b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/de.lproj/locale.pak
deleted file mode 100644
index 1b343da..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/de.lproj/locale.pak
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/el.lproj/locale.pak b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/el.lproj/locale.pak
deleted file mode 100644
index 05b1e4e..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/el.lproj/locale.pak
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/en.lproj/locale.pak b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/en.lproj/locale.pak
deleted file mode 100644
index ef1fe8a..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/en.lproj/locale.pak
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/en_GB.lproj/locale.pak b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/en_GB.lproj/locale.pak
deleted file mode 100644
index f426210..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/en_GB.lproj/locale.pak
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/es.lproj/locale.pak b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/es.lproj/locale.pak
deleted file mode 100644
index 89b644c..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/es.lproj/locale.pak
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/es_419.lproj/locale.pak b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/es_419.lproj/locale.pak
deleted file mode 100644
index 6353135..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/es_419.lproj/locale.pak
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/et.lproj/locale.pak b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/et.lproj/locale.pak
deleted file mode 100644
index fe49161..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/et.lproj/locale.pak
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/fi.lproj/locale.pak b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/fi.lproj/locale.pak
deleted file mode 100644
index 216c720..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/fi.lproj/locale.pak
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/fil.lproj/locale.pak b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/fil.lproj/locale.pak
deleted file mode 100644
index e6ea4cd..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/fil.lproj/locale.pak
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/find_next_Template.pdf b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/find_next_Template.pdf
deleted file mode 100644
index f79a9ce..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/find_next_Template.pdf
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/find_prev_Template.pdf b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/find_prev_Template.pdf
deleted file mode 100644
index de4cab6..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/find_prev_Template.pdf
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/forward_Template.pdf b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/forward_Template.pdf
deleted file mode 100644
index 624487b..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/forward_Template.pdf
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/fr.lproj/locale.pak b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/fr.lproj/locale.pak
deleted file mode 100644
index 57e04f5..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/fr.lproj/locale.pak
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/go_Template.pdf b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/go_Template.pdf
deleted file mode 100644
index 4decb86..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/go_Template.pdf
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/gu.lproj/locale.pak b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/gu.lproj/locale.pak
deleted file mode 100644
index e884562..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/gu.lproj/locale.pak
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/he.lproj/locale.pak b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/he.lproj/locale.pak
deleted file mode 100644
index 25e66d6..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/he.lproj/locale.pak
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/hi.lproj/locale.pak b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/hi.lproj/locale.pak
deleted file mode 100644
index 25a9ef2..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/hi.lproj/locale.pak
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/home_Template.pdf b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/home_Template.pdf
deleted file mode 100644
index e6ac966..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/home_Template.pdf
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/hr.lproj/locale.pak b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/hr.lproj/locale.pak
deleted file mode 100644
index 51b2f1a..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/hr.lproj/locale.pak
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/hu.lproj/locale.pak b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/hu.lproj/locale.pak
deleted file mode 100644
index be6576a..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/hu.lproj/locale.pak
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/id.lproj/locale.pak b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/id.lproj/locale.pak
deleted file mode 100644
index 3c813c9..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/id.lproj/locale.pak
+++ /dev/null
Binary files differ
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/inspector/audits.css b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/inspector/audits.css
deleted file mode 100644
index 35db76b..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/inspector/audits.css
+++ /dev/null
@@ -1,272 +0,0 @@
-/*
- * Copyright (C) 2008 Apple Inc.  All rights reserved.
- * Copyright (C) 2009 Google Inc. All rights reserved.
- *
- * Redistribution and use 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 Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * 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.
- */
-
-.audits-sidebar-tree-item .icon {
-    content: url(Images/resourcesTimeGraphIcon.png);
-}
-
-.audit-result-sidebar-tree-item .icon {
-    content: url(Images/resourceDocumentIcon.png);
-}
-
-#audit-views {
-    position: absolute;
-    top: 0;
-    right: 0;
-    left: 200px;
-    bottom: 0;
-    overflow: auto;
-}
-
-button.clear-audit-results-status-bar-item .glyph {
-    -webkit-mask-image: url(Images/clearConsoleButtonGlyph.png);
-}
-
-#audit-result-view {
-    display: none;
-    overflow: auto;
-    position: absolute;
-    top: 0;
-    left: 0;
-    right: 0;
-    bottom: 0;
-    background-color: rgb(245, 245, 245);
-    cursor: default;
-    overflow: auto;
-}
-
-#audit-result-view.visible {
-    display: block;
-}
-
-#audit-result-view > .pane img.score {
-    float: left;
-    margin-top: 2px;
-    position: relative;
-    height: 16px;
-    width: 16px;
-    z-index: 100;
-}
-
-#audit-result-view > .pane img.score.red {
-    content: url(Images/errorRedDot.png);
-}
-
-#audit-result-view > .pane img.score.green {
-    content: url(Images/successGreenDot.png);
-}
-
-#audit-result-view > .pane.expanded:nth-last-of-type(1) {
-    border-bottom: 1px solid rgb(189, 189, 189) !important;
-}
-
-#audit-result-view .pane.expanded:nth-last-of-type(1) {
-    border-bottom: 0px transparent none;
-}
-
-#audit-result-view > .pane > .body > .pane > .title {
-    padding-left: 16px;
-    background-image: none;
-    border-bottom: none;
-}
-
-#audit-result-view > .pane > .body > .pane > .body {
-    background-color: transparent;
-}
-
-#audit-result-view > .pane > .body > .pane .section {
-    margin-left: 16px;
-}
-
-#audit-result-view .section .header {
-    border: 0;
-    background-image: none;
-    background-color: transparent;
-}
-
-#audit-result-view .section .header > .title {
-    color: rgb(0, 0, 0);
-}
-
-#audit-result-view .section .section-content {
-    width: 100%;
-    padding-left: 18px;
-    display: none;
-}
-
-#audit-result-view .section.expanded .section-content {
-    display: block;
-}
-
-#audit-result-view .section.expanded .section-content > p:nth-of-type(1) {
-    margin-top: 0;
-}
-
-#audit-result-view .section.expanded .section-content > p:nth-of-type(1) > *:nth-child(1) {
-    margin-top: 0;
-}
-
-#audit-result-view .section .header::before {
-    content: url(Images/treeRightTriangleBlack.png);
-}
-
-#audit-result-view .section.expanded .header::before {
-    content: url(Images/treeDownTriangleBlack.png);
-}
-
-div.panel.audits .sidebar > ol.sidebar-tree > li:nth-child(1) {
-    height: 0px;
-    padding-top: 0;
-    padding-bottom: 0;
-}
-
-.audit-launcher-view {
-    z-index: 1000;
-    position: absolute;
-    top: 0;
-    left: 0;
-    right: 0;
-    bottom: 0;
-    background-color: white;
-    font-size: 13px;
-    overflow-x: hidden;
-    overflow-y: overlay;
-    display: none;
-}
-
-.audit-launcher-view.visible {
-    display: block;
-}
-
-.audit-launcher-view .audit-launcher-view-content {
-    position: absolute;
-    top: 0;
-    left: 0;
-    right: 0;
-    bottom: 0;
-    padding: 0 0 0 16px;
-    white-space: nowrap;
-}
-
-.audit-launcher-view h1 {
-    color: rgb(110, 116, 128);
-    font-size: 16px;
-    line-height: 20px;
-    font-weight: normal;
-    padding-top: 15px;
-}
-
-.audit-launcher-view h1.no-audits {
-    text-align: center;
-    font-style: italic;
-    position: relative;
-    left: -8px;
-}
-
-.audit-launcher-view div.button-container {
-    position: absolute;
-    width: 100%;
-    bottom: 16px;
-    padding-top: 16px;
-}
-
-.audit-launcher-view div.audit-categories-container {
-    position: relative;
-    top: 11px;
-    left: 0;
-    width: 100%;
-    overflow-y: auto;
-}
-
-.audit-launcher-view button {
-    color: rgb(6, 6, 6);
-    background-color: transparent;
-    border: 1px solid rgb(165, 165, 165);
-    background-color: rgb(237, 237, 237);
-    background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(252, 252, 252)), to(rgb(223, 223, 223)));
-    -webkit-border-radius: 12px;
-    -webkit-appearance: none;
-}
-
-.audit-launcher-view button {
-    font-size: 13px;
-    padding: 3px 20px;
-    height: 24px;
-    margin: 0 5px 0 0;
-}
-
-.audit-launcher-view button:active {
-    background-color: rgb(215, 215, 215);
-    background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(194, 194, 194)), to(rgb(239, 239, 239)));
-}
-
-body.inactive .audit-launcher-view button, .audit-launcher-view button:disabled {
-    color: rgb(130, 130, 130);
-    border-color: rgb(212, 212, 212);
-    background-color: rgb(239, 239, 239);
-    background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(250, 250, 250)), to(rgb(235, 235, 235)));
-}
-
-.audit-launcher-view label {
-    position: relative;
-    display: block;
-    text-align: left;
-    word-break: break-word;
-    padding: 0 0 5px 0;
-}
-
-.audit-launcher-view label.disabled {
-    color: rgb(130, 130, 130);
-}
-
-.audit-launcher-view input[type="checkbox"] {
-    margin-left: 0;
-}
-
-.audit-launcher-view input[type="radio"] {
-    height: 17px;
-    width: 17px;
-    border: 1px solid rgb(165, 165, 165);
-    background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(252, 252, 252)), to(rgb(223, 223, 223)));
-    -webkit-border-radius: 8px;
-    -webkit-appearance: none;
-    vertical-align: middle;
-    margin: 0 5px 5px 0;
-}
-
-.audit-launcher-view input[type="radio"]:active {
-    background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(194, 194, 194)), to(rgb(239, 239, 239)));
-}
-
-.audit-launcher-view input[type="radio"]:checked {
-    background: url(Images/radioDot.png) center no-repeat,
-                -webkit-gradient(linear, left top, left bottom, from(rgb(252, 252, 252)), to(rgb(223, 223, 223)));
-}
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/inspector/devtools.css b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/inspector/devtools.css
deleted file mode 100644
index be00ce4..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/inspector/devtools.css
+++ /dev/null
@@ -1,203 +0,0 @@
-#scripts-files option.injected {
-    color: rgb(70, 134, 240);
-}
-
-.data-grid table {
-    line-height: 120%;
-}
-
-body.attached #toolbar {
-    height: 34px;
-    border-top: 1px solid rgb(100, 100, 100);
-    cursor: default; /* overriden */
-    padding-left: 0;
-}
-
-
-/* Chrome theme overrides */
-body.platform-windows #toolbar {
-    background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(242, 247, 253)), to(rgb(223, 234, 248)));
-}
-
-body.platform-windows.inactive #toolbar {
-    background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(248, 248, 248)), to(rgb(237, 237, 237)));
-}
-
-
-/* Heap Profiler Styles */
-
-.heap-snapshot-status-bar-item .glyph {
-    -webkit-mask-image: url(Images/focusButtonGlyph.png);
-}
-
-.heap-snapshot-sidebar-tree-item .icon {
-    content: url(Images/profileIcon.png);
-}
-
-.heap-snapshot-sidebar-tree-item.small .icon {
-    content: url(Images/profileSmallIcon.png);
-}
-
-.heap-snapshot-view {
-    display: none;
-    overflow: hidden;
-    position: absolute;
-    top: 0;
-    left: 0;
-    right: 0;
-    bottom: 0;
-}
-
-.heap-snapshot-view.visible {
-    display: block;
-}
-
-.heap-snapshot-view .data-grid {
-    border: none;
-    max-height: 100%;
-    position: absolute;
-    left: 0;
-    right: 0;
-    top: 0;
-    bottom: 93px;
-}
-
-.heap-snapshot-view .data-grid th.count-column {
-    text-align: center;
-}
-
-.heap-snapshot-view .data-grid td.count-column {
-    text-align: right;
-}
-
-.heap-snapshot-view .data-grid th.size-column {
-    text-align: center;
-}
-
-.heap-snapshot-view .data-grid td.size-column {
-    text-align: right;
-}
-
-.heap-snapshot-view .data-grid th.countDelta-column {
-    text-align: center;
-}
-
-.heap-snapshot-view .data-grid td.countDelta-column {
-    text-align: right;
-}
-
-.heap-snapshot-view .data-grid th.sizeDelta-column {
-    text-align: center;
-}
-
-.heap-snapshot-view .data-grid td.sizeDelta-column {
-    text-align: right;
-}
-
-#heap-snapshot-summary {
-    position: absolute;
-    padding-top: 20px;
-    bottom: 0;
-    left: 0;
-    right: 0;
-    height: 93px;
-    margin-left: -1px;
-    border-left: 1px solid rgb(102, 102, 102);
-    background-color: rgb(101, 111, 130);
-    background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));
-    background-repeat: repeat-x;
-    background-position: top;
-    text-align: center;
-    text-shadow: black 0 1px 1px;
-    white-space: nowrap;
-    color: white;
-    -webkit-background-size: 1px 6px;
-    -webkit-background-origin: padding;
-    -webkit-background-clip: padding;
-}
-
-body.platform-windows .section > .header {
-    border: 1px solid rgb(92, 116, 157);
-    background-image: -webkit-gradient(linear, left top, left bottom, from(rgb(105, 133, 180)), to(rgb(92, 116, 157)));
-}
-
-body.platform-windows .console-group-messages .section > .header {
-    padding: 0 8px 0 0;
-    background-image: none;
-    border: none;
-    min-height: 0;
-}
-
-body.platform-windows #resources-filter {
-    background: -webkit-gradient(linear, left top, left bottom, from(rgb(233, 233, 233)), to(rgb(233, 233, 233)));
-}
-
-body.platform-windows .crumbs .crumb {
-    -webkit-border-image: url(Images/segmentChromium.png) 0 12 0 2;
-}
-
-body.platform-windows .crumbs .crumb.end {
-    -webkit-border-image: url(Images/segmentEndChromium.png) 0 2 0 2;
-}
-
-body.platform-windows .crumbs .crumb.selected {
-    -webkit-border-image: url(Images/segmentSelectedChromium.png) 0 12 0 2;
-    color: white;
-    text-shadow: rgba(255, 255, 255, 0.5) 0 0px 0;
-}
-
-body.platform-windows .crumbs .crumb.selected:hover {
-    -webkit-border-image: url(Images/segmentSelectedChromium.png) 0 12 0 2;
-}
-
-body.platform-windows .crumbs .crumb.selected.end, .crumbs .crumb.selected.end:hover {
-    -webkit-border-image: url(Images/segmentSelectedEndChromium.png) 0 2 0 2;
-}
-
-body.platform-windows .crumbs .crumb:hover {
-    -webkit-border-image: url(Images/segmentHoverChromium.png) 0 12 0 2;
-}
-
-body.platform-windows .crumbs .crumb.dimmed:hover {
-    -webkit-border-image: url(Images/segmentHoverChromium.png) 0 12 0 2;
-}
-
-body.platform-windows .crumbs .crumb.end:hover {
-    -webkit-border-image: url(Images/segmentHoverEndChromium.png) 0 2 0 2;
-}
-
-body.platform-windows body.drawer-visible #main-status-bar {
-    background-image: url(Images/statusbarResizerVertical.png), url(Images/statusbarBackgroundChromium.png);
-}
-
-body.platform-windows .status-bar {
-    background-image: url(Images/statusbarBackgroundChromium.png);
-}
-
-body.platform-windows button.status-bar-item {
-    background-image: url(Images/statusbarButtonsChromium.png);
-}
-
-body.platform-windows select.status-bar-item:active {
-    -webkit-border-image: url(Images/statusbarMenuButtonSelectedChromium.png) 0 17 0 2;
-}
-
-body.platform-windows #drawer {
-    background-image: url(Images/statusbarBottomBackgroundChromium.png);
-}
-
-body.platform-windows select.status-bar-item {
-    -webkit-border-image: url(Images/statusbarMenuButtonChromium.png) 0 17 0 2;
-}
-
-.scope-bar li.selected {
-    -webkit-box-shadow: 0px 0px 0px rgba(0, 0, 0, 0.0);
-}
-
-.scope-bar li:active {
-    -webkit-box-shadow: 0px 0px 0px rgba(0, 0, 0, 0.0);
-}
-
-.timeline-category-tree-item input {
-    vertical-align: middle;
-}
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/inspector/devtools.html b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/inspector/devtools.html
deleted file mode 100644
index 45b5f05..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/inspector/devtools.html
+++ /dev/null
@@ -1,152 +0,0 @@
-<!--
-Copyright (C) 2006, 2007, 2008 Apple Inc.  All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1.  Redistributions of source code must retain the above copyright
-    notice, this list of conditions and the following disclaimer.
-2.  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.
-3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
-    its contributors may be used to endorse or promote products derived
-    from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY APPLE AND ITS 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 APPLE OR ITS 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.
--->
-<!DOCTYPE html>
-<html>
-<head>
-    <meta http-equiv="content-type" content="text/html; charset=utf-8">
-    <link rel="stylesheet" type="text/css" href="audits.css">
-    <link rel="stylesheet" type="text/css" href="inspector.css">
-    <link rel="stylesheet" type="text/css" href="inspectorSyntaxHighlight.css">
-    <script type="text/javascript" src="utilities.js"></script>
-    <script type="text/javascript" src="treeoutline.js"></script>
-    <script type="text/javascript" src="inspector.js"></script>
-    <script type="text/javascript" src="InspectorBackendStub.js"></script>
-    <script type="text/javascript" src="InspectorFrontendHostStub.js"></script>
-    <script type="text/javascript" src="Object.js"></script>
-    <script type="text/javascript" src="Settings.js"></script>
-    <script type="text/javascript" src="ContextMenu.js"></script>
-    <script type="text/javascript" src="KeyboardShortcut.js"></script>
-    <script type="text/javascript" src="TextPrompt.js"></script>
-    <script type="text/javascript" src="Popup.js"></script>
-    <script type="text/javascript" src="Placard.js"></script>
-    <script type="text/javascript" src="View.js"></script>
-    <script type="text/javascript" src="Callback.js"></script>
-    <script type="text/javascript" src="Drawer.js"></script>
-    <script type="text/javascript" src="ChangesView.js"></script>
-    <script type="text/javascript" src="ConsoleView.js"></script>
-    <script type="text/javascript" src="Panel.js"></script>
-    <script type="text/javascript" src="TimelineGrid.js"></script>    
-    <script type="text/javascript" src="AbstractTimelinePanel.js"></script>
-    <script type="text/javascript" src="Resource.js"></script>
-    <script type="text/javascript" src="ResourceCategory.js"></script>
-    <script type="text/javascript" src="Database.js"></script>
-    <script type="text/javascript" src="DOMStorage.js"></script>
-    <script type="text/javascript" src="DOMStorageItemsView.js"></script>
-    <script type="text/javascript" src="DataGrid.js"></script>
-    <script type="text/javascript" src="CookieItemsView.js"></script>
-    <script type="text/javascript" src="Script.js"></script>
-    <script type="text/javascript" src="Breakpoint.js"></script>
-    <script type="text/javascript" src="SidebarPane.js"></script>
-    <script type="text/javascript" src="ElementsTreeOutline.js"></script>
-    <script type="text/javascript" src="SidebarTreeElement.js"></script>
-    <script type="text/javascript" src="Section.js"></script>
-    <script type="text/javascript" src="PropertiesSection.js"></script>
-    <script type="text/javascript" src="ObjectProxy.js"></script>
-    <script type="text/javascript" src="ObjectPropertiesSection.js"></script>
-    <script type="text/javascript" src="BreakpointsSidebarPane.js"></script>
-    <script type="text/javascript" src="CallStackSidebarPane.js"></script>
-    <script type="text/javascript" src="ScopeChainSidebarPane.js"></script>
-    <script type="text/javascript" src="WatchExpressionsSidebarPane.js"></script>
-    <script type="text/javascript" src="MetricsSidebarPane.js"></script>
-    <script type="text/javascript" src="PropertiesSidebarPane.js"></script>
-    <script type="text/javascript" src="EventListenersSidebarPane.js"></script>
-    <script type="text/javascript" src="Color.js"></script>
-    <script type="text/javascript" src="StylesSidebarPane.js"></script>
-    <script type="text/javascript" src="PanelEnablerView.js"></script>
-    <script type="text/javascript" src="StatusBarButton.js"></script>
-    <script type="text/javascript" src="SummaryBar.js"></script>
-    <script type="text/javascript" src="ElementsPanel.js"></script>
-    <script type="text/javascript" src="ResourcesPanel.js"></script>
-    <script type="text/javascript" src="ScriptsPanel.js"></script>
-    <script type="text/javascript" src="StoragePanel.js"></script>
-    <script type="text/javascript" src="ProfilesPanel.js"></script>
-    <script type="text/javascript" src="ConsolePanel.js"></script>
-    <script type="text/javascript" src="AuditsPanel.js"></script>
-    <script type="text/javascript" src="AuditResultView.js"></script>
-    <script type="text/javascript" src="AuditLauncherView.js"></script>
-    <script type="text/javascript" src="ResourceView.js"></script>
-    <script type="text/javascript" src="SourceFrame.js"></script>
-    <script type="text/javascript" src="SourceSyntaxHighlighter.js"></script>
-    <script type="text/javascript" src="CSSSourceSyntaxHighlighter.js"></script>
-    <script type="text/javascript" src="JavaScriptSourceSyntaxHighlighter.js"></script>
-    <script type="text/javascript" src="SourceView.js"></script>
-    <script type="text/javascript" src="FontView.js"></script>
-    <script type="text/javascript" src="ImageView.js"></script>
-    <script type="text/javascript" src="DatabaseTableView.js"></script>
-    <script type="text/javascript" src="DatabaseQueryView.js"></script>
-    <script type="text/javascript" src="ScriptView.js"></script>
-    <script type="text/javascript" src="ProfileDataGridTree.js"></script>
-    <script type="text/javascript" src="BottomUpProfileDataGridTree.js"></script>
-    <script type="text/javascript" src="TopDownProfileDataGridTree.js"></script>
-    <script type="text/javascript" src="ProfileView.js"></script>
-    <script type="text/javascript" src="DOMAgent.js"></script>
-    <script type="text/javascript" src="InjectedScript.js"></script>
-    <script type="text/javascript" src="InjectedScriptAccess.js"></script>
-    <script type="text/javascript" src="TimelineAgent.js"></script>
-    <script type="text/javascript" src="TimelinePanel.js"></script>
-    <script type="text/javascript" src="TimelineOverviewPane.js"></script>
-    <script type="text/javascript" src="TestController.js"></script>
-
-    <!-- The following lines are added to include DevTools resources -->
-    <link rel="stylesheet" type="text/css" href="devtools.css">
-    <script type="text/javascript" src="base.js"></script>
-    <script type="text/javascript" src="inspector_controller_impl.js"></script>
-    <script type="text/javascript" src="debugger_agent.js"></script>
-    <script type="text/javascript" src="codemap.js"></script>
-    <script type="text/javascript" src="consarray.js"></script>
-    <script type="text/javascript" src="csvparser.js"></script>
-    <script type="text/javascript" src="logreader.js"></script>
-    <script type="text/javascript" src="profile.js"></script>
-    <script type="text/javascript" src="profile_view.js"></script>
-    <script type="text/javascript" src="splaytree.js"></script>
-    <script type="text/javascript" src="profiler_agent.js"></script>
-    <script type="text/javascript" src="profiler_processor.js"></script>
-    <script type="text/javascript" src="heap_profiler_panel.js"></script>
-    <script type="text/javascript" src="devtools.js"></script>
-    <script type="text/javascript" src="devtools_host_stub.js"></script>
-    <script type="text/javascript" src="tests.js"></script>
-    <!-- End of auto-added files list -->
-</head>
-<body class="detached">
-    <div id="toolbar">
-        <div class="toolbar-item close-left"><button id="close-button-left"></button></div>
-        <div class="toolbar-item flexable-space"></div>
-        <div class="toolbar-item hidden" id="search-results-matches"></div>
-        <div class="toolbar-item"><input id="search" type="search" incremental results="0"><div id="search-toolbar-label" class="toolbar-label"></div></div>
-        <div class="toolbar-item close-right"><button id="close-button-right"></button></div>
-    </div>
-    <div id="main">
-        <div id="main-panels" spellcheck="false"></div>
-        <div id="main-status-bar" class="status-bar"><div id="anchored-status-bar-items"><button id="dock-status-bar-item" class="status-bar-item"><div class="glyph"></div><div class="glyph shadow"></div></button><button id="console-status-bar-item" class="status-bar-item"><div class="glyph"></div><div class="glyph shadow"></div></button><button id="changes-status-bar-item" class="status-bar-item hidden"></button><div id="count-items"><div id="changes-count" class="hidden"></div><div id="error-warning-count" class="hidden"></div></div></div></div>
-    </div>
-    <div id="drawer">
-        <div id="console-view"><div id="console-messages"><div id="console-prompt" spellcheck="false"><br></div></div></div>
-        <div id="drawer-status-bar" class="status-bar"><div id="other-drawer-status-bar-items"><button id="clear-console-status-bar-item" class="status-bar-item"><div class="glyph"></div><div class="glyph shadow"></div></button><div id="console-filter" class="scope-bar status-bar-item"></div></div></div>
-    </div>
-</body>
-</html>
diff --git a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/inspector/devtools.js b/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/inspector/devtools.js
deleted file mode 100644
index 1a3bc26..0000000
--- a/Chromium.app/Contents/Versions/4.0.287.0/Chromium Framework.framework/Resources/inspector/devtools.js
+++ /dev/null
@@ -1,37815 +0,0 @@
-/* utilities.js */
-
-/*
- * Copyright (C) 2007 Apple Inc.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer. 
- * 2.  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. 
- * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission. 
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS 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 APPLE OR ITS 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.
- */
-
-Object.proxyType = function(objectProxy)
-{
-    if (objectProxy === null)
-        return "null";
-
-    var type = typeof objectProxy;
-    if (type !== "object" && type !== "function")
-        return type;
-
-    return objectProxy.type;
-}
-
-Object.properties = function(obj)
-{
-    var properties = [];
-    for (var prop in obj)
-        properties.push(prop);
-    return properties;
-}
-
-Object.sortedProperties = function(obj, sortFunc)
-{
-    return Object.properties(obj).sort(sortFunc);
-}
-
-Function.prototype.bind = function(thisObject)
-{
-    var func = this;
-    var args = Array.prototype.slice.call(arguments, 1);
-    return function() { return func.apply(thisObject, args.concat(Array.prototype.slice.call(arguments, 0))) };
-}
-
-Node.prototype.rangeOfWord = function(offset, stopCharacters, stayWithinNode, direction)
-{
-    var startNode;
-    var startOffset = 0;
-    var endNode;
-    var endOffset = 0;
-
-    if (!stayWithinNode)
-        stayWithinNode = this;
-
-    if (!direction || direction === "backward" || direction === "both") {
-        var node = this;
-        while (node) {
-            if (node === stayWithinNode) {
-                if (!startNode)
-                    startNode = stayWithinNode;
-                break;
-            }
-
-            if (node.nodeType === Node.TEXT_NODE) {
-                var start = (node === this ? (offset - 1) : (node.nodeValue.length - 1));
-                for (var i = start; i >= 0; --i) {
-                    if (stopCharacters.indexOf(node.nodeValue[i]) !== -1) {
-                        startNode = node;
-                        startOffset = i + 1;
-                        break;
-                    }
-                }
-            }
-
-            if (startNode)
-                break;
-
-            node = node.traversePreviousNode(stayWithinNode);
-        }
-
-        if (!startNode) {
-            startNode = stayWithinNode;
-            startOffset = 0;
-        }
-    } else {
-        startNode = this;
-        startOffset = offset;
-    }
-
-    if (!direction || direction === "forward" || direction === "both") {
-        node = this;
-        while (node) {
-            if (node === stayWithinNode) {
-                if (!endNode)
-                    endNode = stayWithinNode;
-                break;
-            }
-
-            if (node.nodeType === Node.TEXT_NODE) {
-                var start = (node === this ? offset : 0);
-                for (var i = start; i < node.nodeValue.length; ++i) {
-                    if (stopCharacters.indexOf(node.nodeValue[i]) !== -1) {
-                        endNode = node;
-                        endOffset = i;
-                        break;
-                    }
-                }
-            }
-
-            if (endNode)
-                break;
-
-            node = node.traverseNextNode(stayWithinNode);
-        }
-
-        if (!endNode) {
-            endNode = stayWithinNode;
-            endOffset = stayWithinNode.nodeType === Node.TEXT_NODE ? stayWithinNode.nodeValue.length : stayWithinNode.childNodes.length;
-        }
-    } else {
-        endNode = this;
-        endOffset = offset;
-    }
-
-    var result = this.ownerDocument.createRange();
-    result.setStart(startNode, startOffset);
-    result.setEnd(endNode, endOffset);
-
-    return result;
-}
-
-Element.prototype.removeStyleClass = function(className) 
-{
-    // Test for the simple case first.
-    if (this.className === className) {
-        this.className = "";
-        return;
-    }
-
-    var index = this.className.indexOf(className);
-    if (index === -1)
-        return;
-
-    var newClassName = " " + this.className + " ";
-    this.className = newClassName.replace(" " + className + " ", " ");
-}
-
-Element.prototype.removeMatchingStyleClasses = function(classNameRegex)
-{
-    var regex = new RegExp("(^|\\s+)" + classNameRegex + "($|\\s+)");
-    if (regex.test(this.className))
-        this.className = this.className.replace(regex, " ");
-}
-
-Element.prototype.addStyleClass = function(className) 
-{
-    if (className && !this.hasStyleClass(className))
-        this.className += (this.className.length ? " " + className : className);
-}
-
-Element.prototype.hasStyleClass = function(className) 
-{
-    if (!className)
-        return false;
-    // Test for the simple case
-    if (this.className === className)
-        return true;
-
-    var index = this.className.indexOf(className);
-    if (index === -1)
-        return false;
-    var toTest = " " + this.className + " ";
-    return toTest.indexOf(" " + className + " ", index) !== -1;
-}
-
-Element.prototype.positionAt = function(x, y)
-{
-    this.style.left = x + "px";
-    this.style.top = y + "px";
-}
-
-Node.prototype.enclosingNodeOrSelfWithNodeNameInArray = function(nameArray)
-{
-    for (var node = this; node && node !== this.ownerDocument; node = node.parentNode)
-        for (var i = 0; i < nameArray.length; ++i)
-            if (node.nodeName.toLowerCase() === nameArray[i].toLowerCase())
-                return node;
-    return null;
-}
-
-Node.prototype.enclosingNodeOrSelfWithNodeName = function(nodeName)
-{
-    return this.enclosingNodeOrSelfWithNodeNameInArray([nodeName]);
-}
-
-Node.prototype.enclosingNodeOrSelfWithClass = function(className)
-{
-    for (var node = this; node && node !== this.ownerDocument; node = node.parentNode)
-        if (node.nodeType === Node.ELEMENT_NODE && node.hasStyleClass(className))
-            return node;
-    return null;
-}
-
-Node.prototype.enclosingNodeWithClass = function(className)
-{
-    if (!this.parentNode)
-        return null;
-    return this.parentNode.enclosingNodeOrSelfWithClass(className);
-}
-
-Element.prototype.query = function(query) 
-{
-    return this.ownerDocument.evaluate(query, this, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
-}
-
-Element.prototype.removeChildren = function()
-{
-    this.innerHTML = "";
-}
-
-Element.prototype.isInsertionCaretInside = function()
-{
-    var selection = window.getSelection();
-    if (!selection.rangeCount || !selection.isCollapsed)
-        return false;
-    var selectionRange = selection.getRangeAt(0);
-    return selectionRange.startContainer === this || selectionRange.startContainer.isDescendant(this);
-}
-
-Element.prototype.__defineGetter__("totalOffsetLeft", function()
-{
-    var total = 0;
-    for (var element = this; element; element = element.offsetParent)
-        total += element.offsetLeft;
-    return total;
-});
-
-Element.prototype.__defineGetter__("totalOffsetTop", function()
-{
-    var total = 0;
-    for (var element = this; element; element = element.offsetParent)
-        total += element.offsetTop;
-    return total;
-});
-
-Element.prototype.offsetRelativeToWindow = function(targetWindow)
-{
-    var elementOffset = {x: 0, y: 0};
-    var curElement = this;
-    var curWindow = this.ownerDocument.defaultView;
-    while (curWindow && curElement) {
-        elementOffset.x += curElement.totalOffsetLeft;
-        elementOffset.y += curElement.totalOffsetTop;
-        if (curWindow === targetWindow)
-            break;
-
-        curElement = curWindow.frameElement;
-        curWindow = curWindow.parent;
-    }
-
-    return elementOffset;
-}
-
-Node.prototype.isWhitespace = isNodeWhitespace;
-Node.prototype.displayName = nodeDisplayName;
-Node.prototype.isAncestor = function(node)
-{
-    return isAncestorNode(this, node);
-};
-Node.prototype.isDescendant = isDescendantNode;
-Node.prototype.traverseNextNode = traverseNextNode;
-Node.prototype.traversePreviousNode = traversePreviousNode;
-Node.prototype.onlyTextChild = onlyTextChild;
-
-String.prototype.hasSubstring = function(string, caseInsensitive)
-{
-    if (!caseInsensitive)
-        return this.indexOf(string) !== -1;
-    return this.match(new RegExp(string.escapeForRegExp(), "i"));
-}
-
-String.prototype.escapeCharacters = function(chars)
-{
-    var foundChar = false;
-    for (var i = 0; i < chars.length; ++i) {
-        if (this.indexOf(chars.charAt(i)) !== -1) {
-            foundChar = true;
-            break;
-        }
-    }
-
-    if (!foundChar)
-        return this;
-
-    var result = "";
-    for (var i = 0; i < this.length; ++i) {
-        if (chars.indexOf(this.charAt(i)) !== -1)
-            result += "\\";
-        result += this.charAt(i);
-    }
-
-    return result;
-}
-
-String.prototype.escapeForRegExp = function()
-{
-    return this.escapeCharacters("^[]{}()\\.$*+?|");
-}
-
-String.prototype.escapeHTML = function()
-{
-    return this.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
-}
-
-String.prototype.collapseWhitespace = function()
-{
-    return this.replace(/[\s\xA0]+/g, " ");
-}
-
-String.prototype.trimLeadingWhitespace = function()
-{
-    return this.replace(/^[\s\xA0]+/g, "");
-}
-
-String.prototype.trimTrailingWhitespace = function()
-{
-    return this.replace(/[\s\xA0]+$/g, "");
-}
-
-String.prototype.trimWhitespace = function()
-{
-    return this.replace(/^[\s\xA0]+|[\s\xA0]+$/g, "");
-}
-
-String.prototype.trimURL = function(baseURLDomain)
-{
-    var result = this.replace(/^https?:\/\//i, "");
-    if (baseURLDomain)
-        result = result.replace(new RegExp("^" + baseURLDomain.escapeForRegExp(), "i"), "");
-    return result;
-}
-
-function isNodeWhitespace()
-{
-    if (!this || this.nodeType !== Node.TEXT_NODE)
-        return false;
-    if (!this.nodeValue.length)
-        return true;
-    return this.nodeValue.match(/^[\s\xA0]+$/);
-}
-
-function nodeDisplayName()
-{
-    if (!this)
-        return "";
-
-    switch (this.nodeType) {
-        case Node.DOCUMENT_NODE:
-            return "Document";
-
-        case Node.ELEMENT_NODE:
-            var name = "<" + this.nodeName.toLowerCase();
-
-            if (this.hasAttributes()) {
-                var value = this.getAttribute("id");
-                if (value)
-                    name += " id=\"" + value + "\"";
-                value = this.getAttribute("class");
-                if (value)
-                    name += " class=\"" + value + "\"";
-                if (this.nodeName.toLowerCase() === "a") {
-                    value = this.getAttribute("name");
-                    if (value)
-                        name += " name=\"" + value + "\"";
-                    value = this.getAttribute("href");
-                    if (value)
-                        name += " href=\"" + value + "\"";
-                } else if (this.nodeName.toLowerCase() === "img") {
-                    value = this.getAttribute("src");
-                    if (value)
-                        name += " src=\"" + value + "\"";
-                } else if (this.nodeName.toLowerCase() === "iframe") {
-                    value = this.getAttribute("src");
-                    if (value)
-                        name += " src=\"" + value + "\"";
-                } else if (this.nodeName.toLowerCase() === "input") {
-                    value = this.getAttribute("name");
-                    if (value)
-                        name += " name=\"" + value + "\"";
-                    value = this.getAttribute("type");
-                    if (value)
-                        name += " type=\"" + value + "\"";
-                } else if (this.nodeName.toLowerCase() === "form") {
-                    value = this.getAttribute("action");
-                    if (value)
-                        name += " action=\"" + value + "\"";
-                }
-            }
-
-            return name + ">";
-
-        case Node.TEXT_NODE:
-            if (isNodeWhitespace.call(this))
-                return "(whitespace)";
-            return "\"" + this.nodeValue + "\"";
-
-        case Node.COMMENT_NODE:
-            return "<!--" + this.nodeValue + "-->";
-            
-        case Node.DOCUMENT_TYPE_NODE:
-            var docType = "<!DOCTYPE " + this.nodeName;
-            if (this.publicId) {
-                docType += " PUBLIC \"" + this.publicId + "\"";
-                if (this.systemId)
-                    docType += " \"" + this.systemId + "\"";
-            } else if (this.systemId)
-                docType += " SYSTEM \"" + this.systemId + "\"";
-            if (this.internalSubset)
-                docType += " [" + this.internalSubset + "]";
-            return docType + ">";
-    }
-
-    return this.nodeName.toLowerCase().collapseWhitespace();
-}
-
-function isAncestorNode(ancestor, node)
-{
-    if (!node || !ancestor)
-        return false;
-
-    var currentNode = node.parentNode;
-    while (currentNode) {
-        if (ancestor === currentNode)
-            return true;
-        currentNode = currentNode.parentNode;
-    }
-    return false;
-}
-
-function isDescendantNode(descendant)
-{
-    return isAncestorNode(descendant, this);
-}
-
-function traverseNextNode(stayWithin)
-{
-    if (!this)
-        return;
-
-    var node = this.firstChild;
-    if (node)
-        return node;
-
-    if (stayWithin && this === stayWithin)
-        return null;
-
-    node = this.nextSibling;
-    if (node)
-        return node;
-
-    node = this;
-    while (node && !node.nextSibling && (!stayWithin || !node.parentNode || node.parentNode !== stayWithin))
-        node = node.parentNode;
-    if (!node)
-        return null;
-
-    return node.nextSibling;
-}
-
-function traversePreviousNode(stayWithin)
-{
-    if (!this)
-        return;
-    if (stayWithin && this === stayWithin)
-        return null;
-    var node = this.previousSibling;
-    while (node && node.lastChild)
-        node = node.lastChild;
-    if (node)
-        return node;
-    return this.parentNode;
-}
-
-function onlyTextChild()
-{
-    if (!this)
-        return null;
-
-    var firstChild = this.firstChild;
-    if (!firstChild || firstChild.nodeType !== Node.TEXT_NODE)
-        return null;
-
-    var sibling = firstChild.nextSibling;
-    return sibling ? null : firstChild;
-}
-
-function appropriateSelectorForNode(node, justSelector)
-{
-    if (!node)
-        return "";
-
-    var lowerCaseName = node.localName || node.nodeName.toLowerCase();
-
-    var id = node.getAttribute("id");
-    if (id) {
-        var selector = "#" + id;
-        return (justSelector ? selector : lowerCaseName + selector);
-    }
-
-    var className = node.getAttribute("class");
-    if (className) {
-        var selector = "." + className.replace(/\s+/, ".");
-        return (justSelector ? selector : lowerCaseName + selector);
-    }
-
-    if (lowerCaseName === "input" && node.getAttribute("type"))
-        return lowerCaseName + "[type=\"" + node.getAttribute("type") + "\"]";
-
-    return lowerCaseName;
-}
-
-function getDocumentForNode(node)
-{
-    return node.nodeType == Node.DOCUMENT_NODE ? node : node.ownerDocument;
-}
-
-function parentNode(node)
-{
-    return node.parentNode;
-}
-
-Number.secondsToString = function(seconds, formatterFunction, higherResolution)
-{
-    if (!formatterFunction)
-        formatterFunction = String.sprintf;
-
-    if (seconds === 0)
-        return "0";
-
-    var ms = seconds * 1000;
-    if (higherResolution && ms < 1000)
-        return formatterFunction("%.3fms", ms);
-    else if (ms < 1000)
-        return formatterFunction("%.0fms", ms);
-
-    if (seconds < 60)
-        return formatterFunction("%.2fs", seconds);
-
-    var minutes = seconds / 60;
-    if (minutes < 60)
-        return formatterFunction("%.1fmin", minutes);
-
-    var hours = minutes / 60;
-    if (hours < 24)
-        return formatterFunction("%.1fhrs", hours);
-
-    var days = hours / 24;
-    return formatterFunction("%.1f days", days);
-}
-
-Number.bytesToString = function(bytes, formatterFunction, higherResolution)
-{
-    if (!formatterFunction)
-        formatterFunction = String.sprintf;
-    if (typeof higherResolution === "undefined")
-        higherResolution = true;
-
-    if (bytes < 1024)
-        return formatterFunction("%.0fB", bytes);
-
-    var kilobytes = bytes / 1024;
-    if (higherResolution && kilobytes < 1024)
-        return formatterFunction("%.2fKB", kilobytes);
-    else if (kilobytes < 1024)
-        return formatterFunction("%.0fKB", kilobytes);
-
-    var megabytes = kilobytes / 1024;
-    if (higherResolution)
-        return formatterFunction("%.3fMB", megabytes);
-    else
-        return formatterFunction("%.0fMB", megabytes);
-}
-
-Number.constrain = function(num, min, max)
-{
-    if (num < min)
-        num = min;
-    else if (num > max)
-        num = max;
-    return num;
-}
-
-HTMLTextAreaElement.prototype.moveCursorToEnd = function()
-{
-    var length = this.value.length;
-    this.setSelectionRange(length, length);
-}
-
-Array.prototype.remove = function(value, onlyFirst)
-{
-    if (onlyFirst) {
-        var index = this.indexOf(value);
-        if (index !== -1)
-            this.splice(index, 1);
-        return;
-    }
-
-    var length = this.length;
-    for (var i = 0; i < length; ++i) {
-        if (this[i] === value)
-            this.splice(i, 1);
-    }
-}
-
-Array.prototype.keySet = function()
-{
-    var keys = {};
-    for (var i = 0; i < this.length; ++i)
-        keys[this[i]] = true;
-    return keys;
-}
-
-function insertionIndexForObjectInListSortedByFunction(anObject, aList, aFunction)
-{
-    // indexOf returns (-lowerBound - 1). Taking (-result - 1) works out to lowerBound.
-    return (-indexOfObjectInListSortedByFunction(anObject, aList, aFunction) - 1);
-}
-
-function indexOfObjectInListSortedByFunction(anObject, aList, aFunction)
-{
-    var first = 0;
-    var last = aList.length - 1;
-    var floor = Math.floor;
-    var mid, c;
-
-    while (first <= last) {
-        mid = floor((first + last) / 2);
-        c = aFunction(anObject, aList[mid]);
-
-        if (c > 0)
-            first = mid + 1;
-        else if (c < 0)
-            last = mid - 1;
-        else {
-            // Return the first occurance of an item in the list.
-            while (mid > 0 && aFunction(anObject, aList[mid - 1]) === 0)
-                mid--;
-            first = mid;
-            break;
-        }
-    }
-
-    // By returning 1 less than the negative lower search bound, we can reuse this function
-    // for both indexOf and insertionIndexFor, with some simple arithmetic.
-    return (-first - 1);
-}
-
-String.sprintf = function(format)
-{
-    return String.vsprintf(format, Array.prototype.slice.call(arguments, 1));
-}
-
-String.tokenizeFormatString = function(format)
-{
-    var tokens = [];
-    var substitutionIndex = 0;
-
-    function addStringToken(str)
-    {
-        tokens.push({ type: "string", value: str });
-    }
-
-    function addSpecifierToken(specifier, precision, substitutionIndex)
-    {
-        tokens.push({ type: "specifier", specifier: specifier, precision: precision, substitutionIndex: substitutionIndex });
-    }
-
-    var index = 0;
-    for (var precentIndex = format.indexOf("%", index); precentIndex !== -1; precentIndex = format.indexOf("%", index)) {
-        addStringToken(format.substring(index, precentIndex));
-        index = precentIndex + 1;
-
-        if (format[index] === "%") {
-            addStringToken("%");
-            ++index;
-            continue;
-        }
-
-        if (!isNaN(format[index])) {
-            // The first character is a number, it might be a substitution index.
-            var number = parseInt(format.substring(index));
-            while (!isNaN(format[index]))
-                ++index;
-            // If the number is greater than zero and ends with a "$",
-            // then this is a substitution index.
-            if (number > 0 && format[index] === "$") {
-                substitutionIndex = (number - 1);
-                ++index;
-            }
-        }
-
-        var precision = -1;
-        if (format[index] === ".") {
-            // This is a precision specifier. If no digit follows the ".",
-            // then the precision should be zero.
-            ++index;
-            precision = parseInt(format.substring(index));
-            if (isNaN(precision))
-                precision = 0;
-            while (!isNaN(format[index]))
-                ++index;
-        }
-
-        addSpecifierToken(format[index], precision, substitutionIndex);
-
-        ++substitutionIndex;
-        ++index;
-    }
-
-    addStringToken(format.substring(index));
-
-    return tokens;
-}
-
-String.standardFormatters = {
-    d: function(substitution)
-    {
-        if (typeof substitution == "object" && Object.proxyType(substitution) === "number")
-            substitution = substitution.description;
-        substitution = parseInt(substitution);
-        return !isNaN(substitution) ? substitution : 0;
-    },
-
-    f: function(substitution, token)
-    {
-        if (typeof substitution == "object" && Object.proxyType(substitution) === "number")
-            substitution = substitution.description;
-        substitution = parseFloat(substitution);
-        if (substitution && token.precision > -1)
-            substitution = substitution.toFixed(token.precision);
-        return !isNaN(substitution) ? substitution : (token.precision > -1 ? Number(0).toFixed(token.precision) : 0);
-    },
-
-    s: function(substitution)
-    {
-        if (typeof substitution == "object" && Object.proxyType(substitution) !== "null")
-            substitution = substitution.description;
-        return substitution;
-    },
-};
-
-String.vsprintf = function(format, substitutions)
-{
-    return String.format(format, substitutions, String.standardFormatters, "", function(a, b) { return a + b; }).formattedResult;
-}
-
-String.format = function(format, substitutions, formatters, initialValue, append)
-{
-    if (!format || !substitutions || !substitutions.length)
-        return { formattedResult: append(initialValue, format), unusedSubstitutions: substitutions };
-
-    function prettyFunctionName()
-    {
-        return "String.format(\"" + format + "\", \"" + substitutions.join("\", \"") + "\")";
-    }
-
-    function warn(msg)
-    {
-        console.warn(prettyFunctionName() + ": " + msg);
-    }
-
-    function error(msg)
-    {
-        console.error(prettyFunctionName() + ": " + msg);
-    }
-
-    var result = initialValue;
-    var tokens = String.tokenizeFormatString(format);
-    var usedSubstitutionIndexes = {};
-
-    for (var i = 0; i < tokens.length; ++i) {
-        var token = tokens[i];
-
-        if (token.type === "string") {
-            result = append(result, token.value);
-            continue;
-        }
-
-        if (token.type !== "specifier") {
-            error("Unknown token type \"" + token.type + "\" found.");
-            continue;
-        }
-
-        if (token.substitutionIndex >= substitutions.length) {
-            // If there are not enough substitutions for the current substitutionIndex
-            // just output the format specifier literally and move on.
-            error("not enough substitution arguments. Had " + substitutions.length + " but needed " + (token.substitutionIndex + 1) + ", so substitution was skipped.");
-            result = append(result, "%" + (token.precision > -1 ? token.precision : "") + token.specifier);
-            continue;
-        }
-
-        usedSubstitutionIndexes[token.substitutionIndex] = true;
-
-        if (!(token.specifier in formatters)) {
-            // Encountered an unsupported format character, treat as a string.
-            warn("unsupported format character \u201C" + token.specifier + "\u201D. Treating as a string.");
-            result = append(result, substitutions[token.substitutionIndex]);
-            continue;
-        }
-
-        result = append(result, formatters[token.specifier](substitutions[token.substitutionIndex], token));
-    }
-
-    var unusedSubstitutions = [];
-    for (var i = 0; i < substitutions.length; ++i) {
-        if (i in usedSubstitutionIndexes)
-            continue;
-        unusedSubstitutions.push(substitutions[i]);
-    }
-
-    return { formattedResult: result, unusedSubstitutions: unusedSubstitutions };
-}
-
-function isEnterKey(event) {
-    // Check if in IME.
-    return event.keyCode !== 229 && event.keyIdentifier === "Enter";
-}
-
-/* treeoutline.js */
-
-/*
- * Copyright (C) 2007 Apple Inc.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer. 
- * 2.  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. 
- * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission. 
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS 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 APPLE OR ITS 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.
- */
-
-function TreeOutline(listNode)
-{
-    this.children = [];
-    this.selectedTreeElement = null;
-    this._childrenListNode = listNode;
-    this._childrenListNode.removeChildren();
-    this._knownTreeElements = [];
-    this._treeElementsExpandedState = [];
-    this.expandTreeElementsWhenArrowing = false;
-    this.root = true;
-    this.hasChildren = false;
-    this.expanded = true;
-    this.selected = false;
-    this.treeOutline = this;
-
-    this._childrenListNode.tabIndex = 0;
-    this._childrenListNode.addEventListener("keydown", this._treeKeyDown.bind(this), true);
-}
-
-TreeOutline._knownTreeElementNextIdentifier = 1;
-
-TreeOutline._appendChild = function(child)
-{
-    if (!child)
-        throw("child can't be undefined or null");
-
-    var lastChild = this.children[this.children.length - 1];
-    if (lastChild) {
-        lastChild.nextSibling = child;
-        child.previousSibling = lastChild;
-    } else {
-        child.previousSibling = null;
-        child.nextSibling = null;
-    }
-
-    this.children.push(child);
-    this.hasChildren = true;
-    child.parent = this;
-    child.treeOutline = this.treeOutline;
-    child.treeOutline._rememberTreeElement(child);
-
-    var current = child.children[0];
-    while (current) {
-        current.treeOutline = this.treeOutline;
-        current.treeOutline._rememberTreeElement(current);
-        current = current.traverseNextTreeElement(false, child, true);
-    }
-
-    if (child.hasChildren && child.treeOutline._treeElementsExpandedState[child.identifier] !== undefined)
-        child.expanded = child.treeOutline._treeElementsExpandedState[child.identifier];
-
-    if (!this._childrenListNode) {
-        this._childrenListNode = this.treeOutline._childrenListNode.ownerDocument.createElement("ol");
-        this._childrenListNode.parentTreeElement = this;
-        this._childrenListNode.addStyleClass("children");
-        if (this.hidden)
-            this._childrenListNode.addStyleClass("hidden");
-    }
-
-    child._attach();
-}
-
-TreeOutline._insertChild = function(child, index)
-{
-    if (!child)
-        throw("child can't be undefined or null");
-
-    var previousChild = (index > 0 ? this.children[index - 1] : null);
-    if (previousChild) {
-        previousChild.nextSibling = child;
-        child.previousSibling = previousChild;
-    } else {
-        child.previousSibling = null;
-    }
-
-    var nextChild = this.children[index];
-    if (nextChild) {
-        nextChild.previousSibling = child;
-        child.nextSibling = nextChild;
-    } else {
-        child.nextSibling = null;
-    }
-
-    this.children.splice(index, 0, child);
-    this.hasChildren = true;
-    child.parent = this;
-    child.treeOutline = this.treeOutline;
-    child.treeOutline._rememberTreeElement(child);
-
-    var current = child.children[0];
-    while (current) {
-        current.treeOutline = this.treeOutline;
-        current.treeOutline._rememberTreeElement(current);
-        current = current.traverseNextTreeElement(false, child, true);
-    }
-
-    if (child.hasChildren && child.treeOutline._treeElementsExpandedState[child.identifier] !== undefined)
-        child.expanded = child.treeOutline._treeElementsExpandedState[child.identifier];
-
-    if (!this._childrenListNode) {
-        this._childrenListNode = this.treeOutline._childrenListNode.ownerDocument.createElement("ol");
-        this._childrenListNode.parentTreeElement = this;
-        this._childrenListNode.addStyleClass("children");
-        if (this.hidden)
-            this._childrenListNode.addStyleClass("hidden");
-    }
-
-    child._attach();
-}
-
-TreeOutline._removeChildAtIndex = function(childIndex)
-{
-    if (childIndex < 0 || childIndex >= this.children.length)
-        throw("childIndex out of range");
-
-    var child = this.children[childIndex];
-    this.children.splice(childIndex, 1);
-
-    var parent = child.parent;
-    if (child.deselect()) {
-        if (child.previousSibling)
-            child.previousSibling.select();
-        else if (child.nextSibling)
-            child.nextSibling.select();
-        else
-            parent.select();
-    }
-
-    if (child.previousSibling)
-        child.previousSibling.nextSibling = child.nextSibling;
-    if (child.nextSibling)
-        child.nextSibling.previousSibling = child.previousSibling;
-
-    if (child.treeOutline) {
-        child.treeOutline._forgetTreeElement(child);
-        child.treeOutline._forgetChildrenRecursive(child);
-    }
-
-    child._detach();
-    child.treeOutline = null;
-    child.parent = null;
-    child.nextSibling = null;
-    child.previousSibling = null;
-}
-
-TreeOutline._removeChild = function(child)
-{
-    if (!child)
-        throw("child can't be undefined or null");
-
-    var childIndex = this.children.indexOf(child);
-    if (childIndex === -1)
-        throw("child not found in this node's children");
-
-    TreeOutline._removeChildAtIndex.call(this, childIndex);
-}
-
-TreeOutline._removeChildren = function()
-{
-    for (var i = 0; i < this.children.length; ++i) {
-        var child = this.children[i];
-        child.deselect();
-
-        if (child.treeOutline) {
-            child.treeOutline._forgetTreeElement(child);
-            child.treeOutline._forgetChildrenRecursive(child);
-        }
-
-        child._detach();
-        child.treeOutline = null;
-        child.parent = null;
-        child.nextSibling = null;
-        child.previousSibling = null;
-    }
-
-    this.children = [];
-}
-
-TreeOutline._removeChildrenRecursive = function()
-{
-    var childrenToRemove = this.children;
-
-    var child = this.children[0];
-    while (child) {
-        if (child.children.length)
-            childrenToRemove = childrenToRemove.concat(child.children);
-        child = child.traverseNextTreeElement(false, this, true);
-    }
-
-    for (var i = 0; i < childrenToRemove.length; ++i) {
-        var child = childrenToRemove[i];
-        child.deselect();
-        if (child.treeOutline)
-            child.treeOutline._forgetTreeElement(child);
-        child._detach();
-        child.children = [];
-        child.treeOutline = null;
-        child.parent = null;
-        child.nextSibling = null;
-        child.previousSibling = null;
-    }
-
-    this.children = [];
-}
-
-TreeOutline.prototype._rememberTreeElement = function(element)
-{
-    if (!this._knownTreeElements[element.identifier])
-        this._knownTreeElements[element.identifier] = [];
-
-    // check if the element is already known
-    var elements = this._knownTreeElements[element.identifier];
-    if (elements.indexOf(element) !== -1)
-        return;
-
-    // add the element
-    elements.push(element);
-}
-
-TreeOutline.prototype._forgetTreeElement = function(element)
-{
-    if (this._knownTreeElements[element.identifier])
-        this._knownTreeElements[element.identifier].remove(element, true);
-}
-
-TreeOutline.prototype._forgetChildrenRecursive = function(parentElement)
-{
-    var child = parentElement.children[0];
-    while (child) {
-        this._forgetTreeElement(child);
-        child = child.traverseNextTreeElement(false, this, true);
-    }
-}
-
-TreeOutline.prototype.getCachedTreeElement = function(representedObject)
-{
-    if (!representedObject)
-        return null;
-
-    if ("__treeElementIdentifier" in representedObject) {
-        // If this representedObject has a tree element identifier, and it is a known TreeElement
-        // in our tree we can just return that tree element.
-        var elements = this._knownTreeElements[representedObject.__treeElementIdentifier];
-        if (elements) {
-            for (var i = 0; i < elements.length; ++i)
-                if (elements[i].representedObject === representedObject)
-                    return elements[i];
-        }
-    }
-    return null;
-}
-
-TreeOutline.prototype.findTreeElement = function(representedObject, isAncestor, getParent)
-{
-    if (!representedObject)
-        return null;
-
-    var cachedElement = this.getCachedTreeElement(representedObject);
-    if (cachedElement)
-        return cachedElement;
-
-    // The representedObject isn't know, so we start at the top of the tree and work down to find the first
-    // tree element that represents representedObject or one of its ancestors.
-    var item;
-    var found = false;
-    for (var i = 0; i < this.children.length; ++i) {
-        item = this.children[i];
-        if (item.representedObject === representedObject || isAncestor(item.representedObject, representedObject)) {
-            found = true;
-            break;
-        }
-    }
-
-    if (!found)
-        return null;
-
-    // Make sure the item that we found is connected to the root of the tree.
-    // Build up a list of representedObject's ancestors that aren't already in our tree.
-    var ancestors = [];
-    var currentObject = representedObject;
-    while (currentObject) {
-        ancestors.unshift(currentObject);
-        if (currentObject === item.representedObject)
-            break;
-        currentObject = getParent(currentObject);
-    }
-
-    // For each of those ancestors we populate them to fill in the tree.
-    for (var i = 0; i < ancestors.length; ++i) {
-        // Make sure we don't call findTreeElement with the same representedObject
-        // again, to prevent infinite recursion.
-        if (ancestors[i] === representedObject)
-            continue;
-        // FIXME: we could do something faster than findTreeElement since we will know the next
-        // ancestor exists in the tree.
-        item = this.findTreeElement(ancestors[i], isAncestor, getParent);
-        if (item && item.onpopulate)
-            item.onpopulate(item);
-    }
-
-    return this.getCachedTreeElement(representedObject);
-}
-
-TreeOutline.prototype.treeElementFromPoint = function(x, y)
-{
-    var node = this._childrenListNode.ownerDocument.elementFromPoint(x, y);
-    var listNode = node.enclosingNodeOrSelfWithNodeNameInArray(["ol", "li"]);
-    if (listNode)
-        return listNode.parentTreeElement || listNode.treeElement;
-    return null;
-}
-
-TreeOutline.prototype._treeKeyDown = function(event)
-{
-    if (event.target !== this._childrenListNode)
-        return;
-
-    if (!this.selectedTreeElement || event.shiftKey || event.metaKey || event.ctrlKey)
-        return;
-
-    var handled = false;
-    var nextSelectedElement;
-    if (event.keyIdentifier === "Up" && !event.altKey) {
-        nextSelectedElement = this.selectedTreeElement.traversePreviousTreeElement(true);
-        while (nextSelectedElement && !nextSelectedElement.selectable)
-            nextSelectedElement = nextSelectedElement.traversePreviousTreeElement(!this.expandTreeElementsWhenArrowing);
-        handled = nextSelectedElement ? true : false;
-    } else if (event.keyIdentifier === "Down" && !event.altKey) {
-        nextSelectedElement = this.selectedTreeElement.traverseNextTreeElement(true);
-        while (nextSelectedElement && !nextSelectedElement.selectable)
-            nextSelectedElement = nextSelectedElement.traverseNextTreeElement(!this.expandTreeElementsWhenArrowing);
-        handled = nextSelectedElement ? true : false;
-    } else if (event.keyIdentifier === "Left") {
-        if (this.selectedTreeElement.expanded) {
-            if (event.altKey)
-                this.selectedTreeElement.collapseRecursively();
-            else
-                this.selectedTreeElement.collapse();
-            handled = true;
-        } else if (this.selectedTreeElement.parent && !this.selectedTreeElement.parent.root) {
-            handled = true;
-            if (this.selectedTreeElement.parent.selectable) {
-                nextSelectedElement = this.selectedTreeElement.parent;
-                handled = nextSelectedElement ? true : false;
-            } else if (this.selectedTreeElement.parent)
-                this.selectedTreeElement.parent.collapse();
-        }
-    } else if (event.keyIdentifier === "Right") {
-        if (!this.selectedTreeElement.revealed()) {
-            this.selectedTreeElement.reveal();
-            handled = true;
-        } else if (this.selectedTreeElement.hasChildren) {
-            handled = true;
-            if (this.selectedTreeElement.expanded) {
-                nextSelectedElement = this.selectedTreeElement.children[0];
-                handled = nextSelectedElement ? true : false;
-            } else {
-                if (event.altKey)
-                    this.selectedTreeElement.expandRecursively();
-                else
-                    this.selectedTreeElement.expand();
-            }
-        }
-    }
-
-    if (nextSelectedElement) {
-        nextSelectedElement.reveal();
-        nextSelectedElement.select();
-    }
-
-    if (handled) {
-        event.preventDefault();
-        event.stopPropagation();
-    }
-}
-
-TreeOutline.prototype.expand = function()
-{
-    // this is the root, do nothing
-}
-
-TreeOutline.prototype.collapse = function()
-{
-    // this is the root, do nothing
-}
-
-TreeOutline.prototype.revealed = function()
-{
-    return true;
-}
-
-TreeOutline.prototype.reveal = function()
-{
-    // this is the root, do nothing
-}
-
-TreeOutline.prototype.appendChild = TreeOutline._appendChild;
-TreeOutline.prototype.insertChild = TreeOutline._insertChild;
-TreeOutline.prototype.removeChild = TreeOutline._removeChild;
-TreeOutline.prototype.removeChildAtIndex = TreeOutline._removeChildAtIndex;
-TreeOutline.prototype.removeChildren = TreeOutline._removeChildren;
-TreeOutline.prototype.removeChildrenRecursive = TreeOutline._removeChildrenRecursive;
-
-function TreeElement(title, representedObject, hasChildren)
-{
-    this._title = title;
-    this.representedObject = (representedObject || {});
-
-    if (this.representedObject.__treeElementIdentifier)
-        this.identifier = this.representedObject.__treeElementIdentifier;
-    else {
-        this.identifier = TreeOutline._knownTreeElementNextIdentifier++;
-        this.representedObject.__treeElementIdentifier = this.identifier;
-    }
-
-    this._hidden = false;
-    this.expanded = false;
-    this.selected = false;
-    this.hasChildren = hasChildren;
-    this.children = [];
-    this.treeOutline = null;
-    this.parent = null;
-    this.previousSibling = null;
-    this.nextSibling = null;
-    this._listItemNode = null;
-}
-
-TreeElement.prototype = {
-    selectable: true,
-    arrowToggleWidth: 10,
-
-    get listItemElement() {
-        return this._listItemNode;
-    },
-
-    get childrenListElement() {
-        return this._childrenListNode;
-    },
-
-    get title() {
-        return this._title;
-    },
-
-    set title(x) {
-        this._title = x;
-        if (this._listItemNode)
-            this._listItemNode.innerHTML = x;
-    },
-
-    get tooltip() {
-        return this._tooltip;
-    },
-
-    set tooltip(x) {
-        this._tooltip = x;
-        if (this._listItemNode)
-            this._listItemNode.title = x ? x : "";
-    },
-
-    get hasChildren() {
-        return this._hasChildren;
-    },
-
-    set hasChildren(x) {
-        if (this._hasChildren === x)
-            return;
-
-        this._hasChildren = x;
-
-        if (!this._listItemNode)
-            return;
-
-        if (x)
-            this._listItemNode.addStyleClass("parent");
-        else {
-            this._listItemNode.removeStyleClass("parent");
-            this.collapse();
-        }
-    },
-
-    get hidden() {
-        return this._hidden;
-    },
-
-    set hidden(x) {
-        if (this._hidden === x)
-            return;
-
-        this._hidden = x;
-
-        if (x) {
-            if (this._listItemNode)
-                this._listItemNode.addStyleClass("hidden");
-            if (this._childrenListNode)
-                this._childrenListNode.addStyleClass("hidden");
-        } else {
-            if (this._listItemNode)
-                this._listItemNode.removeStyleClass("hidden");
-            if (this._childrenListNode)
-                this._childrenListNode.removeStyleClass("hidden");
-        }
-    },
-
-    get shouldRefreshChildren() {
-        return this._shouldRefreshChildren;
-    },
-
-    set shouldRefreshChildren(x) {
-        this._shouldRefreshChildren = x;
-        if (x && this.expanded)
-            this.expand();
-    }
-}
-
-TreeElement.prototype.appendChild = TreeOutline._appendChild;
-TreeElement.prototype.insertChild = TreeOutline._insertChild;
-TreeElement.prototype.removeChild = TreeOutline._removeChild;
-TreeElement.prototype.removeChildAtIndex = TreeOutline._removeChildAtIndex;
-TreeElement.prototype.removeChildren = TreeOutline._removeChildren;
-TreeElement.prototype.removeChildrenRecursive = TreeOutline._removeChildrenRecursive;
-
-TreeElement.prototype._attach = function()
-{
-    if (!this._listItemNode || this.parent._shouldRefreshChildren) {
-        if (this._listItemNode && this._listItemNode.parentNode)
-            this._listItemNode.parentNode.removeChild(this._listItemNode);
-
-        this._listItemNode = this.treeOutline._childrenListNode.ownerDocument.createElement("li");
-        this._listItemNode.treeElement = this;
-        this._listItemNode.innerHTML = this._title;
-        this._listItemNode.title = this._tooltip ? this._tooltip : "";
-
-        if (this.hidden)
-            this._listItemNode.addStyleClass("hidden");
-        if (this.hasChildren)
-            this._listItemNode.addStyleClass("parent");
-        if (this.expanded)
-            this._listItemNode.addStyleClass("expanded");
-        if (this.selected)
-            this._listItemNode.addStyleClass("selected");
-
-        this._listItemNode.addEventListener("mousedown", TreeElement.treeElementSelected, false);
-        this._listItemNode.addEventListener("click", TreeElement.treeElementToggled, false);
-        this._listItemNode.addEventListener("dblclick", TreeElement.treeElementDoubleClicked, false);
-
-        if (this.onattach)
-            this.onattach(this);
-    }
-
-    var nextSibling = null;
-    if (this.nextSibling && this.nextSibling._listItemNode && this.nextSibling._listItemNode.parentNode === this.parent._childrenListNode)
-        nextSibling = this.nextSibling._listItemNode;
-    this.parent._childrenListNode.insertBefore(this._listItemNode, nextSibling);
-    if (this._childrenListNode)
-        this.parent._childrenListNode.insertBefore(this._childrenListNode, this._listItemNode.nextSibling);
-    if (this.selected)
-        this.select();
-    if (this.expanded)
-        this.expand();
-}
-
-TreeElement.prototype._detach = function()
-{
-    if (this._listItemNode && this._listItemNode.parentNode)
-        this._listItemNode.parentNode.removeChild(this._listItemNode);
-    if (this._childrenListNode && this._childrenListNode.parentNode)
-        this._childrenListNode.parentNode.removeChild(this._childrenListNode);
-}
-
-TreeElement.treeElementSelected = function(event)
-{
-    var element = event.currentTarget;
-    if (!element || !element.treeElement || !element.treeElement.selectable)
-        return;
-
-    if (element.treeElement.isEventWithinDisclosureTriangle(event))
-        return;
-
-    element.treeElement.select();
-}
-
-TreeElement.treeElementToggled = function(event)
-{
-    var element = event.currentTarget;
-    if (!element || !element.treeElement)
-        return;
-
-    if (!element.treeElement.isEventWithinDisclosureTriangle(event))
-        return;
-
-    if (element.treeElement.expanded) {
-        if (event.altKey)
-            element.treeElement.collapseRecursively();
-        else
-            element.treeElement.collapse();
-    } else {
-        if (event.altKey)
-            element.treeElement.expandRecursively();
-        else
-            element.treeElement.expand();
-    }
-}
-
-TreeElement.treeElementDoubleClicked = function(event)
-{
-    var element = event.currentTarget;
-    if (!element || !element.treeElement)
-        return;
-
-    if (element.treeElement.ondblclick)
-        element.treeElement.ondblclick.call(element.treeElement, event);
-    else if (element.treeElement.hasChildren && !element.treeElement.expanded)
-        element.treeElement.expand();
-}
-
-TreeElement.prototype.collapse = function()
-{
-    if (this._listItemNode)
-        this._listItemNode.removeStyleClass("expanded");
-    if (this._childrenListNode)
-        this._childrenListNode.removeStyleClass("expanded");
-
-    this.expanded = false;
-    if (this.treeOutline)
-        this.treeOutline._treeElementsExpandedState[this.identifier] = true;
-
-    if (this.oncollapse)
-        this.oncollapse(this);
-}
-
-TreeElement.prototype.collapseRecursively = function()
-{
-    var item = this;
-    while (item) {
-        if (item.expanded)
-            item.collapse();
-        item = item.traverseNextTreeElement(false, this, true);
-    }
-}
-
-TreeElement.prototype.expand = function()
-{
-    if (!this.hasChildren || (this.expanded && !this._shouldRefreshChildren && this._childrenListNode))
-        return;
-
-    if (this.treeOutline && (!this._childrenListNode || this._shouldRefreshChildren)) {
-        if (this._childrenListNode && this._childrenListNode.parentNode)
-            this._childrenListNode.parentNode.removeChild(this._childrenListNode);
-
-        this._childrenListNode = this.treeOutline._childrenListNode.ownerDocument.createElement("ol");
-        this._childrenListNode.parentTreeElement = this;
-        this._childrenListNode.addStyleClass("children");
-
-        if (this.hidden)
-            this._childrenListNode.addStyleClass("hidden");
-
-        if (this.onpopulate)
-            this.onpopulate(this);
-
-        for (var i = 0; i < this.children.length; ++i)
-            this.children[i]._attach();
-
-        delete this._shouldRefreshChildren;
-    }
-
-    if (this._listItemNode) {
-        this._listItemNode.addStyleClass("expanded");
-        if (this._childrenListNode && this._childrenListNode.parentNode != this._listItemNode.parentNode)
-            this.parent._childrenListNode.insertBefore(this._childrenListNode, this._listItemNode.nextSibling);
-    }
-
-    if (this._childrenListNode)
-        this._childrenListNode.addStyleClass("expanded");
-
-    this.expanded = true;
-    if (this.treeOutline)
-        this.treeOutline._treeElementsExpandedState[this.identifier] = true;
-
-    if (this.onexpand)
-        this.onexpand(this);
-}
-
-TreeElement.prototype.expandRecursively = function(maxDepth)
-{
-    var item = this;
-    var info = {};
-    var depth = 0;
-
-    // The Inspector uses TreeOutlines to represents object properties, so recursive expansion
-    // in some case can be infinite, since JavaScript objects can hold circular references.
-    // So default to a recursion cap of 3 levels, since that gives fairly good results.
-    if (typeof maxDepth === "undefined" || typeof maxDepth === "null")
-        maxDepth = 3;
-
-    while (item) {
-        if (depth < maxDepth)
-            item.expand();
-        item = item.traverseNextTreeElement(false, this, (depth >= maxDepth), info);
-        depth += info.depthChange;
-    }
-}
-
-TreeElement.prototype.hasAncestor = function(ancestor) {
-    if (!ancestor)
-        return false;
-
-    var currentNode = this.parent;
-    while (currentNode) {
-        if (ancestor === currentNode)
-            return true;
-        currentNode = currentNode.parent;
-    }
-
-    return false;
-}
-
-TreeElement.prototype.reveal = function()
-{
-    var currentAncestor = this.parent;
-    while (currentAncestor && !currentAncestor.root) {
-        if (!currentAncestor.expanded)
-            currentAncestor.expand();
-        currentAncestor = currentAncestor.parent;
-    }
-
-    if (this.onreveal)
-        this.onreveal(this);
-}
-
-TreeElement.prototype.revealed = function()
-{
-    var currentAncestor = this.parent;
-    while (currentAncestor && !currentAncestor.root) {
-        if (!currentAncestor.expanded)
-            return false;
-        currentAncestor = currentAncestor.parent;
-    }
-
-    return true;
-}
-
-TreeElement.prototype.select = function(supressOnSelect)
-{
-    if (!this.treeOutline || !this.selectable || this.selected)
-        return;
-
-    if (this.treeOutline.selectedTreeElement)
-        this.treeOutline.selectedTreeElement.deselect();
-
-    this.selected = true;
-    this.treeOutline.selectedTreeElement = this;
-    if (this._listItemNode)
-        this._listItemNode.addStyleClass("selected");
-
-    if (this.onselect && !supressOnSelect)
-        this.onselect(this);
-}
-
-TreeElement.prototype.deselect = function(supressOnDeselect)
-{
-    if (!this.treeOutline || this.treeOutline.selectedTreeElement !== this || !this.selected)
-        return false;
-
-    this.selected = false;
-    this.treeOutline.selectedTreeElement = null;
-    if (this._listItemNode)
-        this._listItemNode.removeStyleClass("selected");
-
-    if (this.ondeselect && !supressOnDeselect)
-        this.ondeselect(this);
-    return true;
-}
-
-TreeElement.prototype.traverseNextTreeElement = function(skipHidden, stayWithin, dontPopulate, info)
-{
-    if (!dontPopulate && this.hasChildren && this.onpopulate)
-        this.onpopulate(this);
-
-    if (info)
-        info.depthChange = 0;
-
-    var element = skipHidden ? (this.revealed() ? this.children[0] : null) : this.children[0];
-    if (element && (!skipHidden || (skipHidden && this.expanded))) {
-        if (info)
-            info.depthChange = 1;
-        return element;
-    }
-
-    if (this === stayWithin)
-        return null;
-
-    element = skipHidden ? (this.revealed() ? this.nextSibling : null) : this.nextSibling;
-    if (element)
-        return element;
-
-    element = this;
-    while (element && !element.root && !(skipHidden ? (element.revealed() ? element.nextSibling : null) : element.nextSibling) && element.parent !== stayWithin) {
-        if (info)
-            info.depthChange -= 1;
-        element = element.parent;
-    }
-
-    if (!element)
-        return null;
-
-    return (skipHidden ? (element.revealed() ? element.nextSibling : null) : element.nextSibling);
-}
-
-TreeElement.prototype.traversePreviousTreeElement = function(skipHidden, dontPopulate)
-{
-    var element = skipHidden ? (this.revealed() ? this.previousSibling : null) : this.previousSibling;
-    if (!dontPopulate && element && element.hasChildren && element.onpopulate)
-        element.onpopulate(element);
-
-    while (element && (skipHidden ? (element.revealed() && element.expanded ? element.children[element.children.length - 1] : null) : element.children[element.children.length - 1])) {
-        if (!dontPopulate && element.hasChildren && element.onpopulate)
-            element.onpopulate(element);
-        element = (skipHidden ? (element.revealed() && element.expanded ? element.children[element.children.length - 1] : null) : element.children[element.children.length - 1]);
-    }
-
-    if (element)
-        return element;
-
-    if (!this.parent || this.parent.root)
-        return null;
-
-    return this.parent;
-}
-
-TreeElement.prototype.isEventWithinDisclosureTriangle = function(event)
-{
-    var left = this._listItemNode.totalOffsetLeft;
-    return event.pageX >= left && event.pageX <= left + this.arrowToggleWidth && this.hasChildren;
-}
-
-/* inspector.js */
-
-/*
- * Copyright (C) 2006, 2007, 2008 Apple Inc.  All rights reserved.
- * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com).
- * Copyright (C) 2009 Joseph Pecoraro
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  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.
- * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS 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 APPLE OR ITS 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.
- */
-
-function preloadImages()
-{
-    (new Image()).src = "Images/clearConsoleButtonGlyph.png";
-    (new Image()).src = "Images/consoleButtonGlyph.png";
-    (new Image()).src = "Images/dockButtonGlyph.png";
-    (new Image()).src = "Images/enableOutlineButtonGlyph.png";
-    (new Image()).src = "Images/enableSolidButtonGlyph.png";
-    (new Image()).src = "Images/excludeButtonGlyph.png";
-    (new Image()).src = "Images/focusButtonGlyph.png";
-    (new Image()).src = "Images/largerResourcesButtonGlyph.png";
-    (new Image()).src = "Images/nodeSearchButtonGlyph.png";
-    (new Image()).src = "Images/pauseOnExceptionButtonGlyph.png";
-    (new Image()).src = "Images/percentButtonGlyph.png";
-    (new Image()).src = "Images/recordButtonGlyph.png";
-    (new Image()).src = "Images/recordToggledButtonGlyph.png";
-    (new Image()).src = "Images/reloadButtonGlyph.png";
-    (new Image()).src = "Images/undockButtonGlyph.png";
-}
-
-preloadImages();
-
-var WebInspector = {
-    resources: {},
-    resourceURLMap: {},
-    cookieDomains: {},
-    missingLocalizedStrings: {},
-    pendingDispatches: 0,
-
-    // RegExp groups:
-    // 1 - scheme
-    // 2 - hostname
-    // 3 - ?port
-    // 4 - ?path
-    // 5 - ?fragment
-    URLRegExp: /^(http[s]?|file):\/\/([^\/:]+)(?::([\d]+))?(?:(\/[^#]*)(?:#(.*))?)?$/i,
-
-    get platform()
-    {
-        if (!("_platform" in this))
-            this._platform = InspectorFrontendHost.platform();
-
-        return this._platform;
-    },
-
-    get port()
-    {
-        if (!("_port" in this))
-            this._port = InspectorFrontendHost.port();
-
-        return this._port;
-    },
-
-    get previousFocusElement()
-    {
-        return this._previousFocusElement;
-    },
-
-    get currentFocusElement()
-    {
-        return this._currentFocusElement;
-    },
-
-    set currentFocusElement(x)
-    {
-        if (this._currentFocusElement !== x)
-            this._previousFocusElement = this._currentFocusElement;
-        this._currentFocusElement = x;
-
-        if (this._currentFocusElement) {
-            this._currentFocusElement.focus();
-
-            // Make a caret selection inside the new element if there isn't a range selection and
-            // there isn't already a caret selection inside.
-            var selection = window.getSelection();
-            if (selection.isCollapsed && !this._currentFocusElement.isInsertionCaretInside()) {
-                var selectionRange = this._currentFocusElement.ownerDocument.createRange();
-                selectionRange.setStart(this._currentFocusElement, 0);
-                selectionRange.setEnd(this._currentFocusElement, 0);
-
-                selection.removeAllRanges();
-                selection.addRange(selectionRange);
-            }
-        } else if (this._previousFocusElement)
-            this._previousFocusElement.blur();
-    },
-
-    get currentPanel()
-    {
-        return this._currentPanel;
-    },
-
-    set currentPanel(x)
-    {
-        if (this._currentPanel === x)
-            return;
-
-        if (this._currentPanel)
-            this._currentPanel.hide();
-
-        this._currentPanel = x;
-
-        this.updateSearchLabel();
-
-        if (x) {
-            x.show();
-
-            if (this.currentQuery) {
-                if (x.performSearch) {
-                    function performPanelSearch()
-                    {
-                        this.updateSearchMatchesCount();
-
-                        x.currentQuery = this.currentQuery;
-                        x.performSearch(this.currentQuery);
-                    }
-
-                    // Perform the search on a timeout so the panel switches fast.
-                    setTimeout(performPanelSearch.bind(this), 0);
-                } else {
-                    // Update to show Not found for panels that can't be searched.
-                    this.updateSearchMatchesCount();
-                }
-            }
-        }
-
-        for (var panelName in WebInspector.panels) {
-            if (WebInspector.panels[panelName] == x)
-                InspectorBackend.storeLastActivePanel(panelName);
-        }
-    },
-
-    _createPanels: function()
-    {
-        var hiddenPanels = (InspectorFrontendHost.hiddenPanels() || "").split(',');
-        if (hiddenPanels.indexOf("elements") === -1)
-            this.panels.elements = new WebInspector.ElementsPanel();
-        if (hiddenPanels.indexOf("resources") === -1)
-            this.panels.resources = new WebInspector.ResourcesPanel();
-        if (hiddenPanels.indexOf("scripts") === -1)
-            this.panels.scripts = new WebInspector.ScriptsPanel();
-        if (hiddenPanels.indexOf("timeline") === -1)
-            this.panels.timeline = new WebInspector.TimelinePanel();
-        if (hiddenPanels.indexOf("profiles") === -1) {
-            this.panels.profiles = new WebInspector.ProfilesPanel();
-            this.panels.profiles.registerProfileType(new WebInspector.CPUProfileType());
-        }
-
-        if (hiddenPanels.indexOf("storage") === -1 && hiddenPanels.indexOf("databases") === -1)
-            this.panels.storage = new WebInspector.StoragePanel();
-
-        // FIXME: Uncomment when ready.
-        // if (hiddenPanels.indexOf("audits") === -1)
-        //    this.panels.audits = new WebInspector.AuditsPanel();
-
-        if (hiddenPanels.indexOf("console") === -1)
-            this.panels.console = new WebInspector.ConsolePanel();
-    },
-
-    get attached()
-    {
-        return this._attached;
-    },
-
-    set attached(x)
-    {
-        if (this._attached === x)
-            return;
-
-        this._attached = x;
-
-        this.updateSearchLabel();
-
-        var dockToggleButton = document.getElementById("dock-status-bar-item");
-        var body = document.body;
-
-        if (x) {
-            InspectorFrontendHost.attach();
-            body.removeStyleClass("detached");
-            body.addStyleClass("attached");
-            dockToggleButton.title = WebInspector.UIString("Undock into separate window.");
-        } else {
-            InspectorFrontendHost.detach();
-            body.removeStyleClass("attached");
-            body.addStyleClass("detached");
-            dockToggleButton.title = WebInspector.UIString("Dock to main window.");
-        }
-    },
-
-    get errors()
-    {
-        return this._errors || 0;
-    },
-
-    set errors(x)
-    {
-        x = Math.max(x, 0);
-
-        if (this._errors === x)
-            return;
-        this._errors = x;
-        this._updateErrorAndWarningCounts();
-    },
-
-    get warnings()
-    {
-        return this._warnings || 0;
-    },
-
-    set warnings(x)
-    {
-        x = Math.max(x, 0);
-
-        if (this._warnings === x)
-            return;
-        this._warnings = x;
-        this._updateErrorAndWarningCounts();
-    },
-
-    _updateErrorAndWarningCounts: function()
-    {
-        var errorWarningElement = document.getElementById("error-warning-count");
-        if (!errorWarningElement)
-            return;
-
-        if (!this.errors && !this.warnings) {
-            errorWarningElement.addStyleClass("hidden");
-            return;
-        }
-
-        errorWarningElement.removeStyleClass("hidden");
-
-        errorWarningElement.removeChildren();
-
-        if (this.errors) {
-            var errorElement = document.createElement("span");
-            errorElement.id = "error-count";
-            errorElement.textContent = this.errors;
-            errorWarningElement.appendChild(errorElement);
-        }
-
-        if (this.warnings) {
-            var warningsElement = document.createElement("span");
-            warningsElement.id = "warning-count";
-            warningsElement.textContent = this.warnings;
-            errorWarningElement.appendChild(warningsElement);
-        }
-
-        if (this.errors) {
-            if (this.warnings) {
-                if (this.errors == 1) {
-                    if (this.warnings == 1)
-                        errorWarningElement.title = WebInspector.UIString("%d error, %d warning", this.errors, this.warnings);
-                    else
-                        errorWarningElement.title = WebInspector.UIString("%d error, %d warnings", this.errors, this.warnings);
-                } else if (this.warnings == 1)
-                    errorWarningElement.title = WebInspector.UIString("%d errors, %d warning", this.errors, this.warnings);
-                else
-                    errorWarningElement.title = WebInspector.UIString("%d errors, %d warnings", this.errors, this.warnings);
-            } else if (this.errors == 1)
-                errorWarningElement.title = WebInspector.UIString("%d error", this.errors);
-            else
-                errorWarningElement.title = WebInspector.UIString("%d errors", this.errors);
-        } else if (this.warnings == 1)
-            errorWarningElement.title = WebInspector.UIString("%d warning", this.warnings);
-        else if (this.warnings)
-            errorWarningElement.title = WebInspector.UIString("%d warnings", this.warnings);
-        else
-            errorWarningElement.title = null;
-    },
-
-    get styleChanges()
-    {
-        return this._styleChanges;
-    },
-
-    set styleChanges(x)
-    {
-        x = Math.max(x, 0);
-
-        if (this._styleChanges === x)
-            return;
-        this._styleChanges = x;
-        this._updateChangesCount();
-    },
-
-    _updateChangesCount: function()
-    {
-        // TODO: Remove immediate return when enabling the Changes Panel
-        return;
-
-        var changesElement = document.getElementById("changes-count");
-        if (!changesElement)
-            return;
-
-        if (!this.styleChanges) {
-            changesElement.addStyleClass("hidden");
-            return;
-        }
-
-        changesElement.removeStyleClass("hidden");
-        changesElement.removeChildren();
-
-        if (this.styleChanges) {
-            var styleChangesElement = document.createElement("span");
-            styleChangesElement.id = "style-changes-count";
-            styleChangesElement.textContent = this.styleChanges;
-            changesElement.appendChild(styleChangesElement);
-        }
-
-        if (this.styleChanges) {
-            if (this.styleChanges === 1)
-                changesElement.title = WebInspector.UIString("%d style change", this.styleChanges);
-            else
-                changesElement.title = WebInspector.UIString("%d style changes", this.styleChanges);
-        }
-    },
-
-    get hoveredDOMNode()
-    {
-        return this._hoveredDOMNode;
-    },
-
-    set hoveredDOMNode(x)
-    {
-        if (this._hoveredDOMNode === x)
-            return;
-
-        this._hoveredDOMNode = x;
-
-        if (this._hoveredDOMNode)
-            this._updateHoverHighlightSoon(this.showingDOMNodeHighlight ? 50 : 500);
-        else
-            this._updateHoverHighlight();
-    },
-
-    _updateHoverHighlightSoon: function(delay)
-    {
-        if ("_updateHoverHighlightTimeout" in this)
-            clearTimeout(this._updateHoverHighlightTimeout);
-        this._updateHoverHighlightTimeout = setTimeout(this._updateHoverHighlight.bind(this), delay);
-    },
-
-    _updateHoverHighlight: function()
-    {
-        if ("_updateHoverHighlightTimeout" in this) {
-            clearTimeout(this._updateHoverHighlightTimeout);
-            delete this._updateHoverHighlightTimeout;
-        }
-
-        if (this._hoveredDOMNode) {
-            InspectorBackend.highlightDOMNode(this._hoveredDOMNode.id);
-            this.showingDOMNodeHighlight = true;
-        } else {
-            InspectorBackend.hideDOMNodeHighlight();
-            this.showingDOMNodeHighlight = false;
-        }
-    }
-}
-
-WebInspector.loaded = function()
-{
-    var platform = WebInspector.platform;
-    document.body.addStyleClass("platform-" + platform);
-    var port = WebInspector.port;
-    document.body.addStyleClass("port-" + port);
-
-    this.settings = new WebInspector.Settings();
-
-    this.drawer = new WebInspector.Drawer();
-    this.console = new WebInspector.ConsoleView(this.drawer);
-    // TODO: Uncomment when enabling the Changes Panel
-    // this.changes = new WebInspector.ChangesView(this.drawer);
-    // TODO: Remove class="hidden" from inspector.html on button#changes-status-bar-item
-    this.drawer.visibleView = this.console;
-    this.domAgent = new WebInspector.DOMAgent();
-
-    this.resourceCategories = {
-        documents: new WebInspector.ResourceCategory("documents", WebInspector.UIString("Documents"), "rgb(47,102,236)"),
-        stylesheets: new WebInspector.ResourceCategory("stylesheets", WebInspector.UIString("Stylesheets"), "rgb(157,231,119)"),
-        images: new WebInspector.ResourceCategory("images", WebInspector.UIString("Images"), "rgb(164,60,255)"),
-        scripts: new WebInspector.ResourceCategory("scripts", WebInspector.UIString("Scripts"), "rgb(255,121,0)"),
-        xhr: new WebInspector.ResourceCategory("xhr", WebInspector.UIString("XHR"), "rgb(231,231,10)"),
-        fonts: new WebInspector.ResourceCategory("fonts", WebInspector.UIString("Fonts"), "rgb(255,82,62)"),
-        other: new WebInspector.ResourceCategory("other", WebInspector.UIString("Other"), "rgb(186,186,186)")
-    };
-
-    this.panels = {};
-    this._createPanels();
-
-    var toolbarElement = document.getElementById("toolbar");
-    var previousToolbarItem = toolbarElement.children[0];
-
-    this.panelOrder = [];
-    for (var panelName in this.panels) {
-        var panel = this.panels[panelName];
-        var panelToolbarItem = panel.toolbarItem;
-        this.panelOrder.push(panel);
-        panelToolbarItem.addEventListener("click", this._toolbarItemClicked.bind(this));
-        if (previousToolbarItem)
-            toolbarElement.insertBefore(panelToolbarItem, previousToolbarItem.nextSibling);
-        else
-            toolbarElement.insertBefore(panelToolbarItem, toolbarElement.firstChild);
-        previousToolbarItem = panelToolbarItem;
-    }
-
-    this.Tips = {
-        ResourceNotCompressed: {id: 0, message: WebInspector.UIString("You could save bandwidth by having your web server compress this transfer with gzip or zlib.")}
-    };
-
-    this.Warnings = {
-        IncorrectMIMEType: {id: 0, message: WebInspector.UIString("Resource interpreted as %s but transferred with MIME type %s.")}
-    };
-
-    this.addMainEventListeners(document);
-
-    window.addEventListener("unload", this.windowUnload.bind(this), true);
-    window.addEventListener("resize", this.windowResize.bind(this), true);
-
-    document.addEventListener("focus", this.focusChanged.bind(this), true);
-    document.addEventListener("keydown", this.documentKeyDown.bind(this), false);
-    document.addEventListener("beforecopy", this.documentCanCopy.bind(this), true);
-    document.addEventListener("copy", this.documentCopy.bind(this), true);
-    document.addEventListener("contextmenu", this.contextMenuEventFired.bind(this), true);
-
-    var dockToggleButton = document.getElementById("dock-status-bar-item");
-    dockToggleButton.addEventListener("click", this.toggleAttach.bind(this), false);
-
-    if (this.attached)
-        dockToggleButton.title = WebInspector.UIString("Undock into separate window.");
-    else
-        dockToggleButton.title = WebInspector.UIString("Dock to main window.");
-
-    var errorWarningCount = document.getElementById("error-warning-count");
-    errorWarningCount.addEventListener("click", this.showConsole.bind(this), false);
-    this._updateErrorAndWarningCounts();
-
-    this.styleChanges = 0;
-    // TODO: Uncomment when enabling the Changes Panel
-    // var changesElement = document.getElementById("changes-count");
-    // changesElement.addEventListener("click", this.showChanges.bind(this), false);
-    // this._updateErrorAndWarningCounts();
-
-    var searchField = document.getElementById("search");
-    searchField.addEventListener("search", this.performSearch.bind(this), false); // when the search is emptied
-    searchField.addEventListener("mousedown", this._searchFieldManualFocus.bind(this), false); // when the search field is manually selected
-    searchField.addEventListener("keydown", this._searchKeyDown.bind(this), true);
-
-    toolbarElement.addEventListener("mousedown", this.toolbarDragStart, true);
-    document.getElementById("close-button-left").addEventListener("click", this.close, true);
-    document.getElementById("close-button-right").addEventListener("click", this.close, true);
-
-    InspectorFrontendHost.loaded();
-}
-
-var windowLoaded = function()
-{
-    var localizedStringsURL = InspectorFrontendHost.localizedStringsURL();
-    if (localizedStringsURL) {
-        var localizedStringsScriptElement = document.createElement("script");
-        localizedStringsScriptElement.addEventListener("load", WebInspector.loaded.bind(WebInspector), false);
-        localizedStringsScriptElement.type = "text/javascript";
-        localizedStringsScriptElement.src = localizedStringsURL;
-        document.head.appendChild(localizedStringsScriptElement);
-    } else
-        WebInspector.loaded();
-
-    window.removeEventListener("load", windowLoaded, false);
-    delete windowLoaded;
-};
-
-window.addEventListener("load", windowLoaded, false);
-
-WebInspector.dispatch = function() {
-    var methodName = arguments[0];
-    var parameters = Array.prototype.slice.call(arguments, 1);
-
-    // We'd like to enforce asynchronous interaction between the inspector controller and the frontend.
-    // This is important to LayoutTests.
-    function delayDispatch()
-    {
-        WebInspector[methodName].apply(WebInspector, parameters);
-        WebInspector.pendingDispatches--;
-    }
-    WebInspector.pendingDispatches++;
-    setTimeout(delayDispatch, 0);
-}
-
-WebInspector.windowUnload = function(event)
-{
-    InspectorFrontendHost.windowUnloading();
-}
-
-WebInspector.windowResize = function(event)
-{
-    if (this.currentPanel && this.currentPanel.resize)
-        this.currentPanel.resize();
-    this.drawer.resize();
-}
-
-WebInspector.windowFocused = function(event)
-{
-    // Fires after blur, so when focusing on either the main inspector
-    // or an <iframe> within the inspector we should always remove the
-    // "inactive" class.
-    if (event.target.document.nodeType === Node.DOCUMENT_NODE)
-        document.body.removeStyleClass("inactive");
-}
-
-WebInspector.windowBlurred = function(event)
-{
-    // Leaving the main inspector or an <iframe> within the inspector.
-    // We can add "inactive" now, and if we are moving the focus to another
-    // part of the inspector then windowFocused will correct this.
-    if (event.target.document.nodeType === Node.DOCUMENT_NODE)
-        document.body.addStyleClass("inactive");
-}
-
-WebInspector.focusChanged = function(event)
-{
-    this.currentFocusElement = event.target;
-}
-
-WebInspector.setAttachedWindow = function(attached)
-{
-    this.attached = attached;
-}
-
-WebInspector.close = function(event)
-{
-    InspectorFrontendHost.closeWindow();
-}
-
-WebInspector.documentClick = function(event)
-{
-    var anchor = event.target.enclosingNodeOrSelfWithNodeName("a");
-    if (!anchor)
-        return;
-
-    // Prevent the link from navigating, since we don't do any navigation by following links normally.
-    event.preventDefault();
-
-    function followLink()
-    {
-        // FIXME: support webkit-html-external-link links here.
-        if (WebInspector.canShowSourceLineForURL(anchor.href, anchor.preferredPanel)) {
-            if (anchor.hasStyleClass("webkit-html-external-link")) {
-                anchor.removeStyleClass("webkit-html-external-link");
-                anchor.addStyleClass("webkit-html-resource-link");
-            }
-
-            WebInspector.showSourceLineForURL(anchor.href, anchor.lineNumber, anchor.preferredPanel);
-        } else {
-            var profileString = WebInspector.ProfileType.URLRegExp.exec(anchor.href);
-            if (profileString)
-                WebInspector.showProfileForURL(anchor.href);
-        }
-    }
-
-    if (WebInspector.followLinkTimeout)
-        clearTimeout(WebInspector.followLinkTimeout);
-
-    if (anchor.preventFollowOnDoubleClick) {
-        // Start a timeout if this is the first click, if the timeout is canceled
-        // before it fires, then a double clicked happened or another link was clicked.
-        if (event.detail === 1)
-            WebInspector.followLinkTimeout = setTimeout(followLink, 333);
-        return;
-    }
-
-    followLink();
-}
-
-WebInspector.documentKeyDown = function(event)
-{
-    if (this.currentFocusElement && this.currentFocusElement.handleKeyEvent) {
-        this.currentFocusElement.handleKeyEvent(event);
-        if (event.handled) {
-            event.preventDefault();
-            return;
-        }
-    }
-
-    if (this.currentPanel && this.currentPanel.handleShortcut) {
-        this.currentPanel.handleShortcut(event);
-        if (event.handled) {
-            event.preventDefault();
-            return;
-        }
-    }
-
-    var isMac = WebInspector.isMac();
-
-    switch (event.keyIdentifier) {
-        case "U+001B": // Escape key
-            event.preventDefault();
-            if (this.drawer.fullPanel)
-                return;
-
-            this.drawer.visible = !this.drawer.visible;
-            break;
-
-        case "U+0046": // F key
-            if (isMac)
-                var isFindKey = event.metaKey && !event.ctrlKey && !event.altKey && !event.shiftKey;
-            else
-                var isFindKey = event.ctrlKey && !event.metaKey && !event.altKey && !event.shiftKey;
-
-            if (isFindKey) {
-                var searchField = document.getElementById("search");
-                searchField.focus();
-                searchField.select();
-                event.preventDefault();
-            }
-
-            break;
-
-        case "U+0047": // G key
-            if (isMac)
-                var isFindAgainKey = event.metaKey && !event.ctrlKey && !event.altKey;
-            else
-                var isFindAgainKey = event.ctrlKey && !event.metaKey && !event.altKey;
-
-            if (isFindAgainKey) {
-                if (event.shiftKey) {
-                    if (this.currentPanel.jumpToPreviousSearchResult)
-                        this.currentPanel.jumpToPreviousSearchResult();
-                } else if (this.currentPanel.jumpToNextSearchResult)
-                    this.currentPanel.jumpToNextSearchResult();
-                event.preventDefault();
-            }
-
-            break;
-
-        // Windows and Mac have two different definitions of [, so accept both.
-        case "U+005B":
-        case "U+00DB": // [ key
-            if (isMac)
-                var isRotateLeft = event.metaKey && !event.shiftKey && !event.ctrlKey && !event.altKey;
-            else
-                var isRotateLeft = event.ctrlKey && !event.shiftKey && !event.metaKey && !event.altKey;
-
-            if (isRotateLeft) {
-                var index = this.panelOrder.indexOf(this.currentPanel);
-                index = (index === 0) ? this.panelOrder.length - 1 : index - 1;
-                this.panelOrder[index].toolbarItem.click();
-                event.preventDefault();
-            }
-
-            break;
-
-        // Windows and Mac have two different definitions of ], so accept both.
-        case "U+005D":
-        case "U+00DD":  // ] key
-            if (isMac)
-                var isRotateRight = event.metaKey && !event.shiftKey && !event.ctrlKey && !event.altKey;
-            else
-                var isRotateRight = event.ctrlKey && !event.shiftKey && !event.metaKey && !event.altKey;
-
-            if (isRotateRight) {
-                var index = this.panelOrder.indexOf(this.currentPanel);
-                index = (index + 1) % this.panelOrder.length;
-                this.panelOrder[index].toolbarItem.click();
-                event.preventDefault();
-            }
-
-            break;
-    }
-}
-
-WebInspector.documentCanCopy = function(event)
-{
-    if (this.currentPanel && this.currentPanel.handleCopyEvent)
-        event.preventDefault();
-}
-
-WebInspector.documentCopy = function(event)
-{
-    if (this.currentPanel && this.currentPanel.handleCopyEvent)
-        this.currentPanel.handleCopyEvent(event);
-}
-
-WebInspector.contextMenuEventFired = function(event)
-{
-    if (event.handled || event.target.hasStyleClass("popup-glasspane"))
-        event.preventDefault();
-}
-
-WebInspector.animateStyle = function(animations, duration, callback)
-{
-    var interval;
-    var complete = 0;
-
-    const intervalDuration = (1000 / 30); // 30 frames per second.
-    const animationsLength = animations.length;
-    const propertyUnit = {opacity: ""};
-    const defaultUnit = "px";
-
-    function cubicInOut(t, b, c, d)
-    {
-        if ((t/=d/2) < 1) return c/2*t*t*t + b;
-        return c/2*((t-=2)*t*t + 2) + b;
-    }
-
-    // Pre-process animations.
-    for (var i = 0; i < animationsLength; ++i) {
-        var animation = animations[i];
-        var element = null, start = null, end = null, key = null;
-        for (key in animation) {
-            if (key === "element")
-                element = animation[key];
-            else if (key === "start")
-                start = animation[key];
-            else if (key === "end")
-                end = animation[key];
-        }
-
-        if (!element || !end)
-            continue;
-
-        if (!start) {
-            var computedStyle = element.ownerDocument.defaultView.getComputedStyle(element);
-            start = {};
-            for (key in end)
-                start[key] = parseInt(computedStyle.getPropertyValue(key));
-            animation.start = start;
-        } else
-            for (key in start)
-                element.style.setProperty(key, start[key] + (key in propertyUnit ? propertyUnit[key] : defaultUnit));
-    }
-
-    function animateLoop()
-    {
-        // Advance forward.
-        complete += intervalDuration;
-        var next = complete + intervalDuration;
-
-        // Make style changes.
-        for (var i = 0; i < animationsLength; ++i) {
-            var animation = animations[i];
-            var element = animation.element;
-            var start = animation.start;
-            var end = animation.end;
-            if (!element || !end)
-                continue;
-
-            var style = element.style;
-            for (key in end) {
-                var endValue = end[key];
-                if (next < duration) {
-                    var startValue = start[key];
-                    var newValue = cubicInOut(complete, startValue, endValue - startValue, duration);
-                    style.setProperty(key, newValue + (key in propertyUnit ? propertyUnit[key] : defaultUnit));
-                } else
-                    style.setProperty(key, endValue + (key in propertyUnit ? propertyUnit[key] : defaultUnit));
-            }
-        }
-
-        // End condition.
-        if (complete >= duration) {
-            clearInterval(interval);
-            if (callback)
-                callback();
-        }
-    }
-
-    interval = setInterval(animateLoop, intervalDuration);
-    return interval;
-}
-
-WebInspector.updateSearchLabel = function()
-{
-    if (!this.currentPanel)
-        return;
-
-    var newLabel = WebInspector.UIString("Search %s", this.currentPanel.toolbarItemLabel);
-    if (this.attached)
-        document.getElementById("search").setAttribute("placeholder", newLabel);
-    else {
-        document.getElementById("search").removeAttribute("placeholder");
-        document.getElementById("search-toolbar-label").textContent = newLabel;
-    }
-}
-
-WebInspector.toggleAttach = function()
-{
-    this.attached = !this.attached;
-    this.drawer.resize();
-}
-
-WebInspector.toolbarDragStart = function(event)
-{
-    if ((!WebInspector.attached && WebInspector.platform !== "mac-leopard") || WebInspector.port == "qt")
-        return;
-
-    var target = event.target;
-    if (target.hasStyleClass("toolbar-item") && target.hasStyleClass("toggleable"))
-        return;
-
-    var toolbar = document.getElementById("toolbar");
-    if (target !== toolbar && !target.hasStyleClass("toolbar-item"))
-        return;
-
-    toolbar.lastScreenX = event.screenX;
-    toolbar.lastScreenY = event.screenY;
-
-    WebInspector.elementDragStart(toolbar, WebInspector.toolbarDrag, WebInspector.toolbarDragEnd, event, (WebInspector.attached ? "row-resize" : "default"));
-}
-
-WebInspector.toolbarDragEnd = function(event)
-{
-    var toolbar = document.getElementById("toolbar");
-
-    WebInspector.elementDragEnd(event);
-
-    delete toolbar.lastScreenX;
-    delete toolbar.lastScreenY;
-}
-
-WebInspector.toolbarDrag = function(event)
-{
-    var toolbar = document.getElementById("toolbar");
-
-    if (WebInspector.attached) {
-        var height = window.innerHeight - (event.screenY - toolbar.lastScreenY);
-
-        InspectorFrontendHost.setAttachedWindowHeight(height);
-    } else {
-        var x = event.screenX - toolbar.lastScreenX;
-        var y = event.screenY - toolbar.lastScreenY;
-
-        // We cannot call window.moveBy here because it restricts the movement
-        // of the window at the edges.
-        InspectorFrontendHost.moveWindowBy(x, y);
-    }
-
-    toolbar.lastScreenX = event.screenX;
-    toolbar.lastScreenY = event.screenY;
-
-    event.preventDefault();
-}
-
-WebInspector.elementDragStart = function(element, dividerDrag, elementDragEnd, event, cursor)
-{
-    if (this._elementDraggingEventListener || this._elementEndDraggingEventListener)
-        this.elementDragEnd(event);
-
-    this._elementDraggingEventListener = dividerDrag;
-    this._elementEndDraggingEventListener = elementDragEnd;
-
-    document.addEventListener("mousemove", dividerDrag, true);
-    document.addEventListener("mouseup", elementDragEnd, true);
-
-    document.body.style.cursor = cursor;
-
-    event.preventDefault();
-}
-
-WebInspector.elementDragEnd = function(event)
-{
-    document.removeEventListener("mousemove", this._elementDraggingEventListener, true);
-    document.removeEventListener("mouseup", this._elementEndDraggingEventListener, true);
-
-    document.body.style.removeProperty("cursor");
-
-    delete this._elementDraggingEventListener;
-    delete this._elementEndDraggingEventListener;
-
-    event.preventDefault();
-}
-
-WebInspector.showConsole = function()
-{
-    this.drawer.showView(this.console);
-}
-
-WebInspector.showChanges = function()
-{
-    this.drawer.showView(this.changes);
-}
-
-WebInspector.showElementsPanel = function()
-{
-    this.currentPanel = this.panels.elements;
-}
-
-WebInspector.showResourcesPanel = function()
-{
-    this.currentPanel = this.panels.resources;
-}
-
-WebInspector.showScriptsPanel = function()
-{
-    this.currentPanel = this.panels.scripts;
-}
-
-WebInspector.showTimelinePanel = function()
-{
-    this.currentPanel = this.panels.timeline;
-}
-
-WebInspector.showProfilesPanel = function()
-{
-    this.currentPanel = this.panels.profiles;
-}
-
-WebInspector.showStoragePanel = function()
-{
-    this.currentPanel = this.panels.storage;
-}
-
-WebInspector.showConsolePanel = function()
-{
-    this.currentPanel = this.panels.console;
-}
-
-WebInspector.clearConsoleMessages = function()
-{
-    WebInspector.console.clearMessages();
-}
-
-WebInspector.selectDatabase = function(o)
-{
-    WebInspector.showStoragePanel();
-    WebInspector.panels.storage.selectDatabase(o);
-}
-
-WebInspector.selectDOMStorage = function(o)
-{
-    WebInspector.showStoragePanel();
-    WebInspector.panels.storage.selectDOMStorage(o);
-}
-
-WebInspector.updateResource = function(identifier, payload)
-{
-    var resource = this.resources[identifier];
-    if (!resource) {
-        resource = new WebInspector.Resource(identifier, payload.url);
-        this.resources[identifier] = resource;
-        this.resourceURLMap[resource.url] = resource;
-        if (this.panels.resources)
-            this.panels.resources.addResource(resource);
-    }
-
-    if (payload.didRequestChange) {
-        resource.domain = payload.host;
-        resource.path = payload.path;
-        resource.lastPathComponent = payload.lastPathComponent;
-        resource.requestHeaders = payload.requestHeaders;
-        resource.mainResource = payload.mainResource;
-        resource.requestMethod = payload.requestMethod;
-        resource.requestFormData = payload.requestFormData;
-        resource.cached = payload.cached;
-        resource.documentURL = payload.documentURL;
-
-        if (resource.mainResource)
-            this.mainResource = resource;
-
-        var match = payload.documentURL.match(WebInspector.URLRegExp);
-        if (match) {
-            var protocol = match[1].toLowerCase();
-            if (protocol.indexOf("http") === 0 || protocol === "file")
-                this.addCookieDomain(protocol === "file" ? "" : match[2]);
-        }
-    }
-
-    if (payload.didResponseChange) {
-        resource.mimeType = payload.mimeType;
-        resource.suggestedFilename = payload.suggestedFilename;
-        resource.expectedContentLength = payload.expectedContentLength;
-        resource.statusCode = payload.statusCode;
-        resource.suggestedFilename = payload.suggestedFilename;
-        resource.responseHeaders = payload.responseHeaders;
-    }
-
-    if (payload.didTypeChange) {
-        resource.type = payload.type;
-    }
-
-    if (payload.didLengthChange) {
-        resource.contentLength = payload.contentLength;
-    }
-
-    if (payload.didCompletionChange) {
-        resource.failed = payload.failed;
-        resource.finished = payload.finished;
-    }
-
-    if (payload.didTimingChange) {
-        if (payload.startTime)
-            resource.startTime = payload.startTime;
-        if (payload.responseReceivedTime)
-            resource.responseReceivedTime = payload.responseReceivedTime;
-        if (payload.endTime)
-            resource.endTime = payload.endTime;
-
-        if (payload.loadEventTime) {
-            // This loadEventTime is for the main resource, and we want to show it
-            // for all resources on this page. This means we want to set it as a member
-            // of the resources panel instead of the individual resource.
-            if (this.panels.resources)
-                this.panels.resources.mainResourceLoadTime = payload.loadEventTime;
-            if (this.panels.audits)
-                this.panels.audits.mainResourceLoadTime = payload.loadEventTime;
-        }
-
-        if (payload.domContentEventTime) {
-            // This domContentEventTime is for the main resource, so it should go in
-            // the resources panel for the same reasons as above.
-            if (this.panels.resources)
-                this.panels.resources.mainResourceDOMContentTime = payload.domContentEventTime;
-            if (this.panels.audits)
-                this.panels.audits.mainResourceDOMContentTime = payload.domContentEventTime;
-        }
-    }
-}
-
-WebInspector.removeResource = function(identifier)
-{
-    var resource = this.resources[identifier];
-    if (!resource)
-        return;
-
-    resource.category.removeResource(resource);
-    delete this.resourceURLMap[resource.url];
-    delete this.resources[identifier];
-
-    if (this.panels.resources)
-        this.panels.resources.removeResource(resource);
-}
-
-WebInspector.addDatabase = function(payload)
-{
-    if (!this.panels.storage)
-        return;
-    var database = new WebInspector.Database(
-        payload.id,
-        payload.domain,
-        payload.name,
-        payload.version);
-    this.panels.storage.addDatabase(database);
-}
-
-WebInspector.addCookieDomain = function(domain)
-{
-    // Eliminate duplicate domains from the list.
-    if (domain in this.cookieDomains)
-        return;
-    this.cookieDomains[domain] = true;
-
-    if (!this.panels.storage)
-        return;
-    this.panels.storage.addCookieDomain(domain);
-}
-
-WebInspector.addDOMStorage = function(payload)
-{
-    if (!this.panels.storage)
-        return;
-    var domStorage = new WebInspector.DOMStorage(
-        payload.id,
-        payload.host,
-        payload.isLocalStorage);
-    this.panels.storage.addDOMStorage(domStorage);
-}
-
-WebInspector.updateDOMStorage = function(storageId)
-{
-    if (!this.panels.storage)
-        return;
-    this.panels.storage.updateDOMStorage(storageId);
-}
-
-WebInspector.resourceTrackingWasEnabled = function()
-{
-    this.panels.resources.resourceTrackingWasEnabled();
-}
-
-WebInspector.resourceTrackingWasDisabled = function()
-{
-    this.panels.resources.resourceTrackingWasDisabled();
-}
-
-WebInspector.attachDebuggerWhenShown = function()
-{
-    this.panels.scripts.attachDebuggerWhenShown();
-}
-
-WebInspector.debuggerWasEnabled = function()
-{
-    this.panels.scripts.debuggerWasEnabled();
-}
-
-WebInspector.debuggerWasDisabled = function()
-{
-    this.panels.scripts.debuggerWasDisabled();
-}
-
-WebInspector.profilerWasEnabled = function()
-{
-    this.panels.profiles.profilerWasEnabled();
-}
-
-WebInspector.profilerWasDisabled = function()
-{
-    this.panels.profiles.profilerWasDisabled();
-}
-
-WebInspector.parsedScriptSource = function(sourceID, sourceURL, source, startingLine)
-{
-    this.panels.scripts.addScript(sourceID, sourceURL, source, startingLine);
-}
-
-WebInspector.failedToParseScriptSource = function(sourceURL, source, startingLine, errorLine, errorMessage)
-{
-    this.panels.scripts.addScript(null, sourceURL, source, startingLine, errorLine, errorMessage);
-}
-
-WebInspector.pausedScript = function(callFrames)
-{
-    this.panels.scripts.debuggerPaused(callFrames);
-}
-
-WebInspector.resumedScript = function()
-{
-    this.panels.scripts.debuggerResumed();
-}
-
-WebInspector.populateInterface = function()
-{
-    for (var panelName in this.panels) {
-        var panel = this.panels[panelName];
-        if ("populateInterface" in panel)
-            panel.populateInterface();
-    }
-}
-
-WebInspector.reset = function()
-{
-    for (var panelName in this.panels) {
-        var panel = this.panels[panelName];
-        if ("reset" in panel)
-            panel.reset();
-    }
-
-    for (var category in this.resourceCategories)
-        this.resourceCategories[category].removeAllResources();
-
-    this.resources = {};
-    this.resourceURLMap = {};
-    this.cookieDomains = {};
-    this.hoveredDOMNode = null;
-
-    delete this.mainResource;
-
-    this.console.clearMessages();
-}
-
-WebInspector.resourceURLChanged = function(resource, oldURL)
-{
-    delete this.resourceURLMap[oldURL];
-    this.resourceURLMap[resource.url] = resource;
-}
-
-WebInspector.didCommitLoad = function()
-{
-    // Cleanup elements panel early on inspected page refresh.
-    WebInspector.setDocument(null);
-}
-
-WebInspector.updateConsoleMessageExpiredCount = function(count)
-{
-    var message = String.sprintf(WebInspector.UIString("%d console messages are not shown."), count);
-    WebInspector.console.addMessage(new WebInspector.ConsoleTextMessage(message, WebInspector.ConsoleMessage.MessageLevel.Warning));
-}
-
-WebInspector.addConsoleMessage = function(payload)
-{
-    var consoleMessage = new WebInspector.ConsoleMessage(
-        payload.source,
-        payload.type,
-        payload.level,
-        payload.line,
-        payload.url,
-        payload.groupLevel,
-        payload.repeatCount);
-    consoleMessage.setMessageBody(Array.prototype.slice.call(arguments, 1));
-    this.console.addMessage(consoleMessage);
-}
-
-WebInspector.updateConsoleMessageRepeatCount = function(count)
-{
-    this.console.updateMessageRepeatCount(count);
-}
-
-WebInspector.log = function(message)
-{
-    // remember 'this' for setInterval() callback
-    var self = this;
-
-    // return indication if we can actually log a message
-    function isLogAvailable()
-    {
-        return WebInspector.ConsoleMessage && WebInspector.ObjectProxy && self.console;
-    }
-
-    // flush the queue of pending messages
-    function flushQueue()
-    {
-        var queued = WebInspector.log.queued;
-        if (!queued)
-            return;
-
-        for (var i = 0; i < queued.length; ++i)
-            logMessage(queued[i]);
-
-        delete WebInspector.log.queued;
-    }
-
-    // flush the queue if it console is available
-    // - this function is run on an interval
-    function flushQueueIfAvailable()
-    {
-        if (!isLogAvailable())
-            return;
-
-        clearInterval(WebInspector.log.interval);
-        delete WebInspector.log.interval;
-
-        flushQueue();
-    }
-
-    // actually log the message
-    function logMessage(message)
-    {
-        var repeatCount = 1;
-        if (message == WebInspector.log.lastMessage)
-            repeatCount = WebInspector.log.repeatCount + 1;
-
-        WebInspector.log.lastMessage = message;
-        WebInspector.log.repeatCount = repeatCount;
-
-        // ConsoleMessage expects a proxy object
-        message = new WebInspector.ObjectProxy(null, [], 0, message, false);
-
-        // post the message
-        var msg = new WebInspector.ConsoleMessage(
-            WebInspector.ConsoleMessage.MessageSource.Other,
-            WebInspector.ConsoleMessage.MessageType.Log,
-            WebInspector.ConsoleMessage.MessageLevel.Debug,
-            -1,
-            null,
-            null,
-            repeatCount,
-            message);
-
-        self.console.addMessage(msg);
-    }
-
-    // if we can't log the message, queue it
-    if (!isLogAvailable()) {
-        if (!WebInspector.log.queued)
-            WebInspector.log.queued = [];
-
-        WebInspector.log.queued.push(message);
-
-        if (!WebInspector.log.interval)
-            WebInspector.log.interval = setInterval(flushQueueIfAvailable, 1000);
-
-        return;
-    }
-
-    // flush the pending queue if any
-    flushQueue();
-
-    // log the message
-    logMessage(message);
-}
-
-WebInspector.addProfileHeader = function(profile)
-{
-    this.panels.profiles.addProfileHeader(profile);
-}
-
-WebInspector.setRecordingProfile = function(isProfiling)
-{
-    this.panels.profiles.getProfileType(WebInspector.CPUProfileType.TypeId).setRecordingProfile(isProfiling);
-    this.panels.profiles.updateProfileTypeButtons();
-}
-
-WebInspector.drawLoadingPieChart = function(canvas, percent) {
-    var g = canvas.getContext("2d");
-    var darkColor = "rgb(122, 168, 218)";
-    var lightColor = "rgb(228, 241, 251)";
-    var cx = 8;
-    var cy = 8;
-    var r = 7;
-
-    g.beginPath();
-    g.arc(cx, cy, r, 0, Math.PI * 2, false);
-    g.closePath();
-
-    g.lineWidth = 1;
-    g.strokeStyle = darkColor;
-    g.fillStyle = lightColor;
-    g.fill();
-    g.stroke();
-
-    var startangle = -Math.PI / 2;
-    var endangle = startangle + (percent * Math.PI * 2);
-
-    g.beginPath();
-    g.moveTo(cx, cy);
-    g.arc(cx, cy, r, startangle, endangle, false);
-    g.closePath();
-
-    g.fillStyle = darkColor;
-    g.fill();
-}
-
-WebInspector.updateFocusedNode = function(nodeId)
-{
-    var node = WebInspector.domAgent.nodeForId(nodeId);
-    if (!node)
-        // FIXME: Should we deselect if null is passed in?
-        return;
-
-    this.currentPanel = this.panels.elements;
-    this.panels.elements.focusedDOMNode = node;
-}
-
-WebInspector.displayNameForURL = function(url)
-{
-    if (!url)
-        return "";
-    var resource = this.resourceURLMap[url];
-    if (resource)
-        return resource.displayName;
-    return url.trimURL(WebInspector.mainResource ? WebInspector.mainResource.domain : "");
-}
-
-WebInspector.resourceForURL = function(url)
-{
-    if (url in this.resourceURLMap)
-        return this.resourceURLMap[url];
-
-    // No direct match found. Search for resources that contain
-    // a substring of the URL.
-    for (var resourceURL in this.resourceURLMap) {
-        if (resourceURL.hasSubstring(url))
-            return this.resourceURLMap[resourceURL];
-    }
-
-    return null;
-}
-
-WebInspector._choosePanelToShowSourceLineForURL = function(url, preferredPanel)
-{
-    preferredPanel = preferredPanel || "resources";
-    var panel = this.panels[preferredPanel];
-    if (panel && panel.canShowSourceLineForURL(url))
-        return panel;
-    panel = this.panels.resources;
-    return panel.canShowSourceLineForURL(url) ? panel : null;
-}
-
-WebInspector.canShowSourceLineForURL = function(url, preferredPanel)
-{
-    return !!this._choosePanelToShowSourceLineForURL(url, preferredPanel);
-}
-
-WebInspector.showSourceLineForURL = function(url, line, preferredPanel)
-{
-    this.currentPanel = this._choosePanelToShowSourceLineForURL(url, preferredPanel);
-    if (!this.currentPanel)
-        return false;
-    this.currentPanel.showSourceLineForURL(url, line);
-    return true;
-}
-
-WebInspector.linkifyStringAsFragment = function(string)
-{
-    var container = document.createDocumentFragment();
-    var linkStringRegEx = /(?:[a-zA-Z][a-zA-Z0-9+.-]{2,}:\/\/|www\.)[\w$\-_+*'=\|\/\\(){}[\]%@&#~,:;.!?]{2,}[\w$\-_+*=\|\/\\({%@&#~]/;
-
-    while (string) {
-        var linkString = linkStringRegEx.exec(string);
-        if (!linkString)
-            break;
-
-        linkString = linkString[0];
-        var title = linkString;
-        var linkIndex = string.indexOf(linkString);
-        var nonLink = string.substring(0, linkIndex);
-        container.appendChild(document.createTextNode(nonLink));
-
-        var profileStringMatches = WebInspector.ProfileType.URLRegExp.exec(title);
-        if (profileStringMatches)
-            title = WebInspector.panels.profiles.displayTitleForProfileLink(profileStringMatches[2], profileStringMatches[1]);
-
-        var realURL = (linkString.indexOf("www.") === 0 ? "http://" + linkString : linkString);
-        container.appendChild(WebInspector.linkifyURLAsNode(realURL, title, null, (realURL in WebInspector.resourceURLMap)));
-        string = string.substring(linkIndex + linkString.length, string.length);
-    }
-
-    if (string)
-        container.appendChild(document.createTextNode(string));
-
-    return container;
-}
-
-WebInspector.showProfileForURL = function(url)
-{
-    WebInspector.showProfilesPanel();
-    WebInspector.panels.profiles.showProfileForURL(url);
-}
-
-WebInspector.linkifyURLAsNode = function(url, linkText, classes, isExternal, tooltipText)
-{
-    if (!linkText)
-        linkText = url;
-    classes = (classes ? classes + " " : "");
-    classes += isExternal ? "webkit-html-external-link" : "webkit-html-resource-link";
-
-    var a = document.createElement("a");
-    a.href = url;
-    a.className = classes;
-    a.title = tooltipText || url;
-    a.target = "_blank";
-    a.textContent = linkText;
-
-    return a;
-}
-
-WebInspector.linkifyURL = function(url, linkText, classes, isExternal, tooltipText)
-{
-    // Use the DOM version of this function so as to avoid needing to escape attributes.
-    // FIXME:  Get rid of linkifyURL entirely.
-    return WebInspector.linkifyURLAsNode(url, linkText, classes, isExternal, tooltipText).outerHTML;
-}
-
-WebInspector.addMainEventListeners = function(doc)
-{
-    doc.defaultView.addEventListener("focus", this.windowFocused.bind(this), false);
-    doc.defaultView.addEventListener("blur", this.windowBlurred.bind(this), false);
-    doc.addEventListener("click", this.documentClick.bind(this), true);
-}
-
-WebInspector._searchFieldManualFocus = function(event)
-{
-    this.currentFocusElement = event.target;
-    this._previousFocusElement = event.target;
-}
-
-WebInspector._searchKeyDown = function(event)
-{
-    // Escape Key will clear the field and clear the search results
-    if (event.keyCode === WebInspector.KeyboardShortcut.KeyCodes.Esc) {
-        // If focus belongs here and text is empty - nothing to do, return unhandled.
-        if (event.target.value === "" && this.currentFocusElement === this.previousFocusElement)
-            return;
-        event.preventDefault();
-        event.stopPropagation();
-        // When search was selected manually and is currently blank, we'd like Esc stay unhandled
-        // and hit console drawer handler.
-        event.target.value = "";
-
-        this.performSearch(event);
-        this.currentFocusElement = this.previousFocusElement;
-        if (this.currentFocusElement === event.target)
-            this.currentFocusElement.select();
-        return false;
-    }
-
-    if (!isEnterKey(event))
-        return false;
-
-    // Select all of the text so the user can easily type an entirely new query.
-    event.target.select();
-
-    // Only call performSearch if the Enter key was pressed. Otherwise the search
-    // performance is poor because of searching on every key. The search field has
-    // the incremental attribute set, so we still get incremental searches.
-    this.performSearch(event);
-
-    // Call preventDefault since this was the Enter key. This prevents a "search" event
-    // from firing for key down. This stops performSearch from being called twice in a row.
-    event.preventDefault();
-}
-
-WebInspector.performSearch = function(event)
-{
-    var query = event.target.value;
-    var forceSearch = event.keyIdentifier === "Enter";
-    var isShortSearch = (query.length < 3);
-
-    // Clear a leftover short search flag due to a non-conflicting forced search.
-    if (isShortSearch && this.shortSearchWasForcedByKeyEvent && this.currentQuery !== query)
-        delete this.shortSearchWasForcedByKeyEvent;
-
-    // Indicate this was a forced search on a short query.
-    if (isShortSearch && forceSearch)
-        this.shortSearchWasForcedByKeyEvent = true;
-
-    if (!query || !query.length || (!forceSearch && isShortSearch)) {
-        // Prevent clobbering a short search forced by the user.
-        if (this.shortSearchWasForcedByKeyEvent) {
-            delete this.shortSearchWasForcedByKeyEvent;
-            return;
-        }
-
-        delete this.currentQuery;
-
-        for (var panelName in this.panels) {
-            var panel = this.panels[panelName];
-            if (panel.currentQuery && panel.searchCanceled)
-                panel.searchCanceled();
-            delete panel.currentQuery;
-        }
-
-        this.updateSearchMatchesCount();
-
-        return;
-    }
-
-    if (query === this.currentPanel.currentQuery && this.currentPanel.currentQuery === this.currentQuery) {
-        // When this is the same query and a forced search, jump to the next
-        // search result for a good user experience.
-        if (forceSearch && this.currentPanel.jumpToNextSearchResult)
-            this.currentPanel.jumpToNextSearchResult();
-        return;
-    }
-
-    this.currentQuery = query;
-
-    this.updateSearchMatchesCount();
-
-    if (!this.currentPanel.performSearch)
-        return;
-
-    this.currentPanel.currentQuery = query;
-    this.currentPanel.performSearch(query);
-}
-
-WebInspector.addNodesToSearchResult = function(nodeIds)
-{
-    WebInspector.panels.elements.addNodesToSearchResult(nodeIds);
-}
-
-WebInspector.updateSearchMatchesCount = function(matches, panel)
-{
-    if (!panel)
-        panel = this.currentPanel;
-
-    panel.currentSearchMatches = matches;
-
-    if (panel !== this.currentPanel)
-        return;
-
-    if (!this.currentPanel.currentQuery) {
-        document.getElementById("search-results-matches").addStyleClass("hidden");
-        return;
-    }
-
-    if (matches) {
-        if (matches === 1)
-            var matchesString = WebInspector.UIString("1 match");
-        else
-            var matchesString = WebInspector.UIString("%d matches", matches);
-    } else
-        var matchesString = WebInspector.UIString("Not Found");
-
-    var matchesToolbarElement = document.getElementById("search-results-matches");
-    matchesToolbarElement.removeStyleClass("hidden");
-    matchesToolbarElement.textContent = matchesString;
-}
-
-WebInspector.UIString = function(string)
-{
-    if (window.localizedStrings && string in window.localizedStrings)
-        string = window.localizedStrings[string];
-    else {
-        if (!(string in this.missingLocalizedStrings)) {
-            if (!WebInspector.InspectorBackendStub)
-                console.error("Localized string \"" + string + "\" not found.");
-            this.missingLocalizedStrings[string] = true;
-        }
-
-        if (Preferences.showMissingLocalizedStrings)
-            string += " (not localized)";
-    }
-
-    return String.vsprintf(string, Array.prototype.slice.call(arguments, 1));
-}
-
-WebInspector.isMac = function()
-{
-    if (!("_isMac" in this))
-        this._isMac = WebInspector.platform.indexOf("mac-") === 0;
-
-    return this._isMac;
-}
-
-WebInspector.isBeingEdited = function(element)
-{
-    return element.__editing;
-}
-
-WebInspector.startEditing = function(element, committedCallback, cancelledCallback, context, multiline)
-{
-    if (element.__editing)
-        return;
-    element.__editing = true;
-
-    var oldText = getContent(element);
-    var moveDirection = "";
-
-    element.addStyleClass("editing");
-
-    var oldTabIndex = element.tabIndex;
-    if (element.tabIndex < 0)
-        element.tabIndex = 0;
-
-    function blurEventListener() {
-        editingCommitted.call(element);
-    }
-
-    function getContent(element) {
-        if (element.tagName === "INPUT" && element.type === "text")
-            return element.value;
-        else
-            return element.textContent;
-    }
-
-    function cleanUpAfterEditing() {
-        delete this.__editing;
-
-        this.removeStyleClass("editing");
-        this.tabIndex = oldTabIndex;
-        this.scrollTop = 0;
-        this.scrollLeft = 0;
-
-        element.removeEventListener("blur", blurEventListener, false);
-        element.removeEventListener("keydown", keyDownEventListener, true);
-
-        if (element === WebInspector.currentFocusElement || element.isAncestor(WebInspector.currentFocusElement))
-            WebInspector.currentFocusElement = WebInspector.previousFocusElement;
-    }
-
-    function editingCancelled() {
-        if (this.tagName === "INPUT" && this.type === "text")
-            this.value = oldText;
-        else
-            this.textContent = oldText;
-
-        cleanUpAfterEditing.call(this);
-
-        if (cancelledCallback)
-            cancelledCallback(this, context);
-    }
-
-    function editingCommitted() {
-        cleanUpAfterEditing.call(this);
-
-        if (committedCallback)
-            committedCallback(this, getContent(this), oldText, context, moveDirection);
-    }
-
-    function keyDownEventListener(event) {
-        var isMetaOrCtrl = WebInspector.isMac() ?
-            event.metaKey && !event.shiftKey && !event.ctrlKey && !event.altKey :
-            event.ctrlKey && !event.shiftKey && !event.metaKey && !event.altKey;
-        if (isEnterKey(event) && (!multiline || isMetaOrCtrl)) {
-            editingCommitted.call(element);
-            event.preventDefault();
-            event.stopPropagation();
-        } else if (event.keyCode === WebInspector.KeyboardShortcut.KeyCodes.Esc) {
-            editingCancelled.call(element);
-            event.preventDefault();
-            event.stopPropagation();
-        } else if (event.keyIdentifier === "U+0009") // Tab key
-            moveDirection = (event.shiftKey ? "backward" : "forward");
-    }
-
-    element.addEventListener("blur", blurEventListener, false);
-    element.addEventListener("keydown", keyDownEventListener, true);
-
-    WebInspector.currentFocusElement = element;
-}
-
-WebInspector._toolbarItemClicked = function(event)
-{
-    var toolbarItem = event.currentTarget;
-    this.currentPanel = toolbarItem.panel;
-}
-
-// This table maps MIME types to the Resource.Types which are valid for them.
-// The following line:
-//    "text/html":                {0: 1},
-// means that text/html is a valid MIME type for resources that have type
-// WebInspector.Resource.Type.Document (which has a value of 0).
-WebInspector.MIMETypes = {
-    "text/html":                   {0: true},
-    "text/xml":                    {0: true},
-    "text/plain":                  {0: true},
-    "application/xhtml+xml":       {0: true},
-    "text/css":                    {1: true},
-    "text/xsl":                    {1: true},
-    "image/jpeg":                  {2: true},
-    "image/png":                   {2: true},
-    "image/gif":                   {2: true},
-    "image/bmp":                   {2: true},
-    "image/vnd.microsoft.icon":    {2: true},
-    "image/x-icon":                {2: true},
-    "image/x-xbitmap":             {2: true},
-    "font/ttf":                    {3: true},
-    "font/opentype":               {3: true},
-    "application/x-font-type1":    {3: true},
-    "application/x-font-ttf":      {3: true},
-    "application/x-truetype-font": {3: true},
-    "text/javascript":             {4: true},
-    "text/ecmascript":             {4: true},
-    "application/javascript":      {4: true},
-    "application/ecmascript":      {4: true},
-    "application/x-javascript":    {4: true},
-    "text/javascript1.1":          {4: true},
-    "text/javascript1.2":          {4: true},
-    "text/javascript1.3":          {4: true},
-    "text/jscript":                {4: true},
-    "text/livescript":             {4: true},
-}
-
-/* InspectorBackendStub.js */
-
-/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
- *
- * Redistribution and use 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 Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * 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.
- */
-
-if (!window.InspectorBackend) {
-
-WebInspector.InspectorBackendStub = function()
-{
-    this._searchingForNode = false;
-    this._attachedWindowHeight = 0;
-    this._debuggerEnabled = true;
-    this._profilerEnabled = true;
-    this._resourceTrackingEnabled = false;
-    this._timelineEnabled = false;
-}
-
-WebInspector.InspectorBackendStub.prototype = {
-    wrapCallback: function(func)
-    {
-        return func;
-    },
-
-    platform: function()
-    {
-        return "mac-leopard";
-    },
-
-    port: function()
-    {
-        return "unknown";
-    },
-
-
-    closeWindow: function()
-    {
-        this._windowVisible = false;
-    },
-
-    attach: function()
-    {
-    },
-
-    detach: function()
-    {
-    },
-
-    storeLastActivePanel: function(panel)
-    {
-    },
-
-    clearMessages: function()
-    {
-    },
-
-    searchingForNode: function()
-    {
-        return this._searchingForNode;
-    },
-
-    search: function(sourceRow, query)
-    {
-    },
-
-    toggleNodeSearch: function()
-    {
-        this._searchingForNode = !this._searchingForNode;
-    },
-
-    setAttachedWindowHeight: function(height)
-    {
-    },
-
-    moveByUnrestricted: function(x, y)
-    {
-    },
-
-
-    addResourceSourceToFrame: function(identifier, element)
-    {
-    },
-
-    addSourceToFrame: function(mimeType, source, element)
-    {
-        return false;
-    },
-
-    getResourceDocumentNode: function(identifier)
-    {
-        return undefined;
-    },
-
-    highlightDOMNode: function(node)
-    {
-    },
-
-    hideDOMNodeHighlight: function()
-    {
-    },
-
-    inspectedWindow: function()
-    {
-        return window;
-    },
-
-    loaded: function()
-    {
-    },
-
-    localizedStringsURL: function()
-    {
-        return undefined;
-    },
-
-    windowUnloading: function()
-    {
-        return false;
-    },
-
-    hiddenPanels: function()
-    {
-        return "";
-    },
-
-    debuggerEnabled: function()
-    {
-        return this._debuggerEnabled;
-    },
-
-    enableResourceTracking: function()
-    {
-        this._resourceTrackingEnabled = true;
-        WebInspector.resourceTrackingWasEnabled();
-    },
-
-    disableResourceTracking: function()
-    {
-        this._resourceTrackingEnabled = false;
-        WebInspector.resourceTrackingWasDisabled();
-    },
-
-    resourceTrackingEnabled: function()
-    {
-        return this._resourceTrackingEnabled;
-    },
-
-    enableDebugger: function()
-    {
-        this._debuggerEnabled = true;
-    },
-
-    disableDebugger: function()
-    {
-        this._debuggerEnabled = false;
-    },
-
-    addBreakpoint: function(sourceID, line, condition)
-    {
-    },
-
-    removeBreakpoint: function(sourceID, line)
-    {
-    },
-
-    updateBreakpoint: function(sourceID, line, condition)
-    {
-    },
-
-    pauseInDebugger: function()
-    {
-    },
-
-    pauseOnExceptions: function()
-    {
-        return false;
-    },
-
-    setPauseOnExceptions: function(value)
-    {
-    },
-
-    resumeDebugger: function()
-    {
-    },
-
-    profilerEnabled: function()
-    {
-        return true;
-    },
-
-    enableProfiler: function()
-    {
-        this._profilerEnabled = true;
-    },
-
-    disableProfiler: function()
-    {
-        this._profilerEnabled = false;
-    },
-
-    startProfiling: function()
-    {
-    },
-
-    stopProfiling: function()
-    {
-    },
-
-    getProfileHeaders: function(callId)
-    {
-        WebInspector.didGetProfileHeaders(callId, []);
-    },
-
-    getProfile: function(callId, uid)
-    {
-        if (WebInspector.__fullProfiles && (uid in WebInspector.__fullProfiles))
-        {
-            WebInspector.didGetProfile(callId, WebInspector.__fullProfiles[uid]);
-        }
-    },
-
-    takeHeapSnapshot: function()
-    {
-    },
-
-    databaseTableNames: function(database)
-    {
-        return [];
-    },
-
-    stepIntoStatementInDebugger: function()
-    {
-    },
-
-    stepOutOfFunctionInDebugger: function()
-    {
-    },
-
-    stepOverStatementInDebugger: function()
-    {
-    },
-
-    saveFrontendSettings: function()
-    {
-    },
-
-    dispatchOnInjectedScript: function()
-    {
-    },
-
-    releaseWrapperObjectGroup: function()
-    {
-    }
-}
-
-InspectorBackend = new WebInspector.InspectorBackendStub();
-
-}
-
-/* InspectorFrontendHostStub.js */
-
-/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
- *
- * Redistribution and use 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 Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * 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.
- */
-
-if (!window.InspectorFrontendHost) {
-
-WebInspector.InspectorFrontendHostStub = function()
-{
-    this._attachedWindowHeight = 0;
-}
-
-WebInspector.InspectorFrontendHostStub.prototype = {
-    platform: function()
-    {
-        return "mac-leopard";
-    },
-
-    port: function()
-    {
-        return "unknown";
-    },
-
-    closeWindow: function()
-    {
-        this._windowVisible = false;
-    },
-
-    attach: function()
-    {
-    },
-
-    detach: function()
-    {
-    },
-
-    search: function(sourceRow, query)
-    {
-    },
-
-    setAttachedWindowHeight: function(height)
-    {
-    },
-
-    moveWindowBy: function(x, y)
-    {
-    },
-
-    addResourceSourceToFrame: function(identifier, element)
-    {
-    },
-
-    addSourceToFrame: function(mimeType, source, element)
-    {
-        return false;
-    },
-
-    loaded: function()
-    {
-    },
-
-    localizedStringsURL: function()
-    {
-        return undefined;
-    },
-
-    hiddenPanels: function()
-    {
-        return "";
-    },
-
-    windowUnloading: function()
-    {
-    }
-}
-
-InspectorFrontendHost = new WebInspector.InspectorFrontendHostStub();
-
-}
-
-/* Object.js */
-
-/*
- * Copyright (C) 2008 Apple Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. 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.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``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 APPLE INC. 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.
- */
-
-WebInspector.Object = function() {
-}
-
-WebInspector.Object.prototype = {
-    addEventListener: function(eventType, listener, thisObject) {
-        if (!("_listeners" in this))
-            this._listeners = {};
-        if (!(eventType in this._listeners))
-            this._listeners[eventType] = [];
-        this._listeners[eventType].push({ thisObject: thisObject, listener: listener });
-    },
-
-    removeEventListener: function(eventType, listener, thisObject) {
-        if (!("_listeners" in this) || !(eventType in this._listeners))
-            return;
-        var listeners = this._listeners[eventType];
-        for (var i = 0; i < listeners.length; ++i) {
-            if (listener && listeners[i].listener === listener && listeners[i].thisObject === thisObject)
-                listeners.splice(i, 1);
-            else if (!listener && thisObject && listeners[i].thisObject === thisObject)
-                listeners.splice(i, 1);
-        }
-
-        if (!listeners.length)
-            delete this._listeners[eventType];
-    },
-
-    dispatchEventToListeners: function(eventType) {
-        if (!("_listeners" in this) || !(eventType in this._listeners))
-            return;
-
-        var stoppedPropagation = false;
-
-        function stopPropagation()
-        {
-            stoppedPropagation = true;
-        }
-
-        function preventDefault()
-        {
-            this.defaultPrevented = true;
-        }
-
-        var event = {target: this, type: eventType, defaultPrevented: false};
-        event.stopPropagation = stopPropagation;
-        event.preventDefault = preventDefault;
-
-        var listeners = this._listeners[eventType].slice(0);
-        for (var i = 0; i < listeners.length; ++i) {
-            listeners[i].listener.call(listeners[i].thisObject, event);
-            if (stoppedPropagation)
-                break;
-        }
-
-        return event.defaultPrevented;
-    }
-}
-
-/* Settings.js */
-
-/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
- *
- * Redistribution and use 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 Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * 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.
- */
-
-
-var Preferences = {
-    maxInlineTextChildLength: 80,
-    minConsoleHeight: 75,
-    minSidebarWidth: 100,
-    minElementsSidebarWidth: 200,
-    minScriptsSidebarWidth: 200,
-    styleRulesExpandedState: {},
-    showMissingLocalizedStrings: false,
-    heapProfilerPresent: false,
-    samplingCPUProfiler: false,
-    showColorNicknames: true
-}
-
-WebInspector.populateFrontendSettings = function(settingsString)
-{
-    WebInspector.settings._load(settingsString);
-}
-
-WebInspector.Settings = function()
-{
-}
-
-WebInspector.Settings.prototype = {
-    _load: function(settingsString)
-    {
-        try {
-            this._store = JSON.parse(settingsString);
-        } catch (e) {
-            // May fail;
-            this._store = {};
-        }
-
-        this._installSetting("eventListenersFilter", "event-listeners-filter", "all");
-        this._installSetting("colorFormat", "color-format", "hex");
-        this._installSetting("resourcesLargeRows", "resources-large-rows", true);
-        this._installSetting("watchExpressions", "watch-expressions", []);
-        this._installSetting("lastViewedScriptFile", "last-viewed-script-file");
-        this._installSetting("showInheritedComputedStyleProperties", "show-inherited-computed-style-properties", false);
-        this._installSetting("showUserAgentStyles", "show-user-agent-styles", true);
-        this.dispatchEventToListeners("loaded");
-    },
-
-    _installSetting: function(name, propertyName, defaultValue)
-    {
-        this.__defineGetter__(name, this._get.bind(this, propertyName));
-        this.__defineSetter__(name, this._set.bind(this, propertyName));
-        if (!(propertyName in this._store)) {
-            this._store[propertyName] = defaultValue;
-        }
-    },
-
-    _get: function(propertyName)
-    {
-        return this._store[propertyName];
-    },
-
-    _set: function(propertyName, newValue)
-    {
-        this._store[propertyName] = newValue;
-        try {
-            InspectorBackend.saveFrontendSettings(JSON.stringify(this._store));
-        } catch (e) {
-            // May fail;
-        }
-    }
-}
-
-WebInspector.Settings.prototype.__proto__ = WebInspector.Object.prototype;
-
-/* ContextMenu.js */
-
-/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
- *
- * Redistribution and use 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 Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * 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.
- */
-
-WebInspector.ContextMenu = function() {
-    this._items = [];
-    this._handlers = {};
-}
-
-WebInspector.ContextMenu.prototype = {
-    show: function(event)
-    {
-        // Remove trailing separator.
-        while (this._items.length > 0 && !("id" in this._items[this._items.length - 1]))
-            this._items.splice(this._items.length - 1, 1);
-
-        if (this._items.length) {
-            WebInspector._contextMenu = this;
-            InspectorFrontendHost.showContextMenu(event, this._items);
-        }
-    },
-
-    appendItem: function(label, handler)
-    {
-        var id = this._items.length;
-        this._items.push({id: id, label: label});
-        this._handlers[id] = handler;
-    },
-
-    appendSeparator: function()
-    {
-        // No separator dupes allowed.
-        if (this._items.length === 0)
-            return;
-        if (!("id" in this._items[this._items.length - 1]))
-            return;
-        this._items.push({});
-    },
-
-    _itemSelected: function(id)
-    {
-        if (this._handlers[id])
-            this._handlers[id].call(this);
-    }
-}
-
-WebInspector.contextMenuItemSelected = function(id)
-{
-    if (WebInspector._contextMenu)
-        WebInspector._contextMenu._itemSelected(id);
-}
-
-WebInspector.contextMenuCleared = function()
-{
-    // FIXME: Unfortunately, contextMenuCleared is invoked between show and item selected
-    // so we can't delete last menu object from WebInspector. Fix the contract.
-}
-
-/* KeyboardShortcut.js */
-
-/*
- * Copyright (C) 2009 Apple Inc. All rights reserved.
- * Copyright (C) 2009 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer. 
- * 2.  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. 
- * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission. 
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS 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 APPLE OR ITS 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.
- */
-
-WebInspector.KeyboardShortcut = function()
-{
-};
-
-/**
- * Constants for encoding modifier key set as a bit mask.
- * @see #_makeKeyFromCodeAndModifiers
- */
-WebInspector.KeyboardShortcut.Modifiers = {
-    None: 0,   // Constant for empty modifiers set.
-    Shift: 1,
-    Ctrl: 2,
-    Alt: 4,
-    Meta: 8    // Command key on Mac, Win key on other platforms.
-};
-
-WebInspector.KeyboardShortcut.KeyCodes = {
-    Backspace: 8,
-    Esc: 27,
-    Space: 32,
-    PageUp: 33,      // also NUM_NORTH_EAST
-    PageDown: 34,    // also NUM_SOUTH_EAST
-    End: 35,         // also NUM_SOUTH_WEST
-    Home: 36,        // also NUM_NORTH_WEST
-    Left: 37,        // also NUM_WEST
-    Up: 38,          // also NUM_NORTH
-    Right: 39,       // also NUM_EAST
-    Down: 40,        // also NUM_SOUTH
-    Delete: 46,
-    F1: 112,
-    F2: 113,
-    F3: 114,
-    F4: 115,
-    F5: 116,
-    F6: 117,
-    F7: 118,
-    F8: 119,
-    F9: 120,
-    F10: 121,
-    F11: 122,
-    F12: 123,
-    Semicolon: 186,    // ;
-    Comma: 188,        // ,
-    Period: 190,       // .
-    Slash: 191,        // /
-    Apostrophe: 192,   // `
-    SingleQuote: 222,  // '
-};
-
-/**
- * Creates a number encoding keyCode in the lower 8 bits and modifiers mask in the higher 8 bits.
- * It is useful for matching pressed keys.
- * keyCode is the Code of the key, or a character "a-z" which is converted to a keyCode value.
- * optModifiers is an Optional list of modifiers passed as additional paramerters.
- */
-WebInspector.KeyboardShortcut.makeKey = function(keyCode, optModifiers)
-{
-    if (typeof keyCode === "string")
-        keyCode = keyCode.charCodeAt(0) - 32;
-    var modifiers = WebInspector.KeyboardShortcut.Modifiers.None;
-    for (var i = 1; i < arguments.length; i++)
-        modifiers |= arguments[i];
-    return WebInspector.KeyboardShortcut._makeKeyFromCodeAndModifiers(keyCode, modifiers);
-};
-
-WebInspector.KeyboardShortcut.makeKeyFromEvent = function(keyboardEvent)
-{
-    var modifiers = WebInspector.KeyboardShortcut.Modifiers.None;
-    if (keyboardEvent.shiftKey)
-        modifiers |= WebInspector.KeyboardShortcut.Modifiers.Shift;
-    if (keyboardEvent.ctrlKey)
-        modifiers |= WebInspector.KeyboardShortcut.Modifiers.Ctrl;
-    if (keyboardEvent.altKey)
-        modifiers |= WebInspector.KeyboardShortcut.Modifiers.Alt;
-    if (keyboardEvent.metaKey)
-        modifiers |= WebInspector.KeyboardShortcut.Modifiers.Meta;
-    return WebInspector.KeyboardShortcut._makeKeyFromCodeAndModifiers(keyboardEvent.keyCode, modifiers);
-};
-
-WebInspector.KeyboardShortcut._makeKeyFromCodeAndModifiers = function(keyCode, modifiers)
-{
-    return (keyCode & 255) | (modifiers << 8);
-};
-
-/* TextPrompt.js */
-
-/*
- * Copyright (C) 2008 Apple Inc.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  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.
- * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS 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 APPLE OR ITS 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.
- */
-
-WebInspector.TextPrompt = function(element, completions, stopCharacters)
-{
-    this.element = element;
-    this.completions = completions;
-    this.completionStopCharacters = stopCharacters;
-    this.history = [];
-    this.historyOffset = 0;
-    this.element.addEventListener("keydown", this._onKeyDown.bind(this), true);
-}
-
-WebInspector.TextPrompt.prototype = {
-    get text()
-    {
-        return this.element.textContent;
-    },
-
-    set text(x)
-    {
-        if (!x) {
-            // Append a break element instead of setting textContent to make sure the selection is inside the prompt.
-            this.element.removeChildren();
-            this.element.appendChild(document.createElement("br"));
-        } else
-            this.element.textContent = x;
-
-        this.moveCaretToEndOfPrompt();
-    },
-
-    _onKeyDown: function(event)
-    {
-        function defaultAction()
-        {
-            this.clearAutoComplete();
-            this.autoCompleteSoon();
-        }
-
-        var handled = false;
-        switch (event.keyIdentifier) {
-            case "Up":
-                this._upKeyPressed(event);
-                break;
-            case "Down":
-                this._downKeyPressed(event);
-                break;
-            case "U+0009": // Tab
-                this._tabKeyPressed(event);
-                break;
-            case "Right":
-            case "End":
-                if (!this.acceptAutoComplete())
-                    this.autoCompleteSoon();
-                break;
-            case "Alt":
-            case "Meta":
-            case "Shift":
-            case "Control":
-                break;
-            case "U+0050": // Ctrl+P = Previous
-                if (WebInspector.isMac() && event.ctrlKey && !event.metaKey && !event.altKey && !event.shiftKey) {
-                    handled = true;
-                    this._moveBackInHistory();
-                    break;
-                }
-                defaultAction.call(this);
-                break;
-            case "U+004E": // Ctrl+N = Next
-                if (WebInspector.isMac() && event.ctrlKey && !event.metaKey && !event.altKey && !event.shiftKey) {
-                    handled = true;
-                    this._moveForwardInHistory();
-                    break;
-                }
-                defaultAction.call(this);
-                break;
-            default:
-                defaultAction.call(this);
-                break;
-        }
-
-        if (handled) {
-            event.preventDefault();
-            event.stopPropagation();
-        }
-    },
-
-    acceptAutoComplete: function()
-    {
-        if (!this.autoCompleteElement || !this.autoCompleteElement.parentNode)
-            return false;
-
-        var text = this.autoCompleteElement.textContent;
-        var textNode = document.createTextNode(text);
-        this.autoCompleteElement.parentNode.replaceChild(textNode, this.autoCompleteElement);
-        delete this.autoCompleteElement;
-
-        var finalSelectionRange = document.createRange();
-        finalSelectionRange.setStart(textNode, text.length);
-        finalSelectionRange.setEnd(textNode, text.length);
-
-        var selection = window.getSelection();
-        selection.removeAllRanges();
-        selection.addRange(finalSelectionRange);
-
-        return true;
-    },
-
-    clearAutoComplete: function(includeTimeout)
-    {
-        if (includeTimeout && "_completeTimeout" in this) {
-            clearTimeout(this._completeTimeout);
-            delete this._completeTimeout;
-        }
-
-        if (!this.autoCompleteElement)
-            return;
-
-        if (this.autoCompleteElement.parentNode)
-            this.autoCompleteElement.parentNode.removeChild(this.autoCompleteElement);
-        delete this.autoCompleteElement;
-
-        if (!this._userEnteredRange || !this._userEnteredText)
-            return;
-
-        this._userEnteredRange.deleteContents();
-
-        var userTextNode = document.createTextNode(this._userEnteredText);
-        this._userEnteredRange.insertNode(userTextNode);
-
-        var selectionRange = document.createRange();
-        selectionRange.setStart(userTextNode, this._userEnteredText.length);
-        selectionRange.setEnd(userTextNode, this._userEnteredText.length);
-
-        var selection = window.getSelection();
-        selection.removeAllRanges();
-        selection.addRange(selectionRange);
-
-        delete this._userEnteredRange;
-        delete this._userEnteredText;
-    },
-
-    autoCompleteSoon: function()
-    {
-        if (!("_completeTimeout" in this))
-            this._completeTimeout = setTimeout(this.complete.bind(this, true), 250);
-    },
-
-    complete: function(auto)
-    {
-        this.clearAutoComplete(true);
-        var selection = window.getSelection();
-        if (!selection.rangeCount)
-            return;
-
-        var selectionRange = selection.getRangeAt(0);
-        if (!selectionRange.commonAncestorContainer.isDescendant(this.element))
-            return;
-        if (auto && !this.isCaretAtEndOfPrompt())
-            return;
-        var wordPrefixRange = selectionRange.startContainer.rangeOfWord(selectionRange.startOffset, this.completionStopCharacters, this.element, "backward");
-        this.completions(wordPrefixRange, auto, this._completionsReady.bind(this, selection, auto, wordPrefixRange));
-    },
-
-    _completionsReady: function(selection, auto, originalWordPrefixRange, completions)
-    {
-        if (!completions || !completions.length)
-            return;
-
-        var selectionRange = selection.getRangeAt(0);
-
-        var fullWordRange = document.createRange();
-        fullWordRange.setStart(originalWordPrefixRange.startContainer, originalWordPrefixRange.startOffset);
-        fullWordRange.setEnd(selectionRange.endContainer, selectionRange.endOffset);
-
-        if (originalWordPrefixRange.toString() + selectionRange.toString() != fullWordRange.toString())
-            return;
-
-        if (completions.length === 1 || selection.isCollapsed || auto) {
-            var completionText = completions[0];
-        } else {
-            var currentText = fullWordRange.toString();
-
-            var foundIndex = null;
-            for (var i = 0; i < completions.length; ++i)
-                if (completions[i] === currentText)
-                    foundIndex = i;
-
-            if (foundIndex === null || (foundIndex + 1) >= completions.length)
-                var completionText = completions[0];
-            else
-                var completionText = completions[foundIndex + 1];
-        }
-
-        var wordPrefixLength = originalWordPrefixRange.toString().length;
-
-        this._userEnteredRange = fullWordRange;
-        this._userEnteredText = fullWordRange.toString();
-
-        fullWordRange.deleteContents();
-
-        var finalSelectionRange = document.createRange();
-
-        if (auto) {
-            var prefixText = completionText.substring(0, wordPrefixLength);
-            var suffixText = completionText.substring(wordPrefixLength);
-
-            var prefixTextNode = document.createTextNode(prefixText);
-            fullWordRange.insertNode(prefixTextNode);
-
-            this.autoCompleteElement = document.createElement("span");
-            this.autoCompleteElement.className = "auto-complete-text";
-            this.autoCompleteElement.textContent = suffixText;
-
-            prefixTextNode.parentNode.insertBefore(this.autoCompleteElement, prefixTextNode.nextSibling);
-
-            finalSelectionRange.setStart(prefixTextNode, wordPrefixLength);
-            finalSelectionRange.setEnd(prefixTextNode, wordPrefixLength);
-        } else {
-            var completionTextNode = document.createTextNode(completionText);
-            fullWordRange.insertNode(completionTextNode);
-
-            if (completions.length > 1)
-                finalSelectionRange.setStart(completionTextNode, wordPrefixLength);
-            else
-                finalSelectionRange.setStart(completionTextNode, completionText.length);
-
-            finalSelectionRange.setEnd(completionTextNode, completionText.length);
-        }
-
-        selection.removeAllRanges();
-        selection.addRange(finalSelectionRange);
-    },
-
-    isCaretInsidePrompt: function()
-    {
-        return this.element.isInsertionCaretInside();
-    },
-
-    isCaretAtEndOfPrompt: function()
-    {
-        var selection = window.getSelection();
-        if (!selection.rangeCount || !selection.isCollapsed)
-            return false;
-
-        var selectionRange = selection.getRangeAt(0);
-        var node = selectionRange.startContainer;
-        if (node !== this.element && !node.isDescendant(this.element))
-            return false;
-
-        if (node.nodeType === Node.TEXT_NODE && selectionRange.startOffset < node.nodeValue.length)
-            return false;
-
-        var foundNextText = false;
-        while (node) {
-            if (node.nodeType === Node.TEXT_NODE && node.nodeValue.length) {
-                if (foundNextText)
-                    return false;
-                foundNextText = true;
-            }
-
-            node = node.traverseNextNode(this.element);
-        }
-
-        return true;
-    },
-
-    isCaretOnFirstLine: function()
-    {
-        var selection = window.getSelection();
-        var focusNode = selection.focusNode;
-        if (!focusNode || focusNode.nodeType !== Node.TEXT_NODE || focusNode.parentNode !== this.element)
-            return true;
-
-        if (focusNode.textContent.substring(0, selection.focusOffset).indexOf("\n") !== -1)
-            return false;
-        focusNode = focusNode.previousSibling;
-
-        while (focusNode) {
-            if (focusNode.nodeType !== Node.TEXT_NODE)
-                return true;
-            if (focusNode.textContent.indexOf("\n") !== -1)
-                return false;
-            focusNode = focusNode.previousSibling;
-        }
-
-        return true;
-    },
-
-    isCaretOnLastLine: function()
-    {
-        var selection = window.getSelection();
-        var focusNode = selection.focusNode;
-        if (!focusNode || focusNode.nodeType !== Node.TEXT_NODE || focusNode.parentNode !== this.element)
-            return true;
-
-        if (focusNode.textContent.substring(selection.focusOffset).indexOf("\n") !== -1)
-            return false;
-        focusNode = focusNode.nextSibling;
-
-        while (focusNode) {
-            if (focusNode.nodeType !== Node.TEXT_NODE)
-                return true;
-            if (focusNode.textContent.indexOf("\n") !== -1)
-                return false;
-            focusNode = focusNode.nextSibling;
-        }
-
-        return true;
-    },
-
-    moveCaretToEndOfPrompt: function()
-    {
-        var selection = window.getSelection();
-        var selectionRange = document.createRange();
-
-        var offset = this.element.childNodes.length;
-        selectionRange.setStart(this.element, offset);
-        selectionRange.setEnd(this.element, offset);
-
-        selection.removeAllRanges();
-        selection.addRange(selectionRange);
-    },
-
-    _tabKeyPressed: function(event)
-    {
-        event.preventDefault();
-        event.stopPropagation();
-
-        this.complete();
-    },
-
-    _upKeyPressed: function(event)
-    {
-        if (!this.isCaretOnFirstLine())
-            return;
-
-        event.preventDefault();
-        event.stopPropagation();
-
-        this._moveBackInHistory();
-    },
-
-    _downKeyPressed: function(event)
-    {
-        if (!this.isCaretOnLastLine())
-            return;
-
-        event.preventDefault();
-        event.stopPropagation();
-
-        this._moveForwardInHistory();
-    },
-
-    _moveBackInHistory: function()
-    {
-        if (this.historyOffset == this.history.length)
-            return;
-
-        this.clearAutoComplete(true);
-
-        if (this.historyOffset === 0)
-            this.tempSavedCommand = this.text;
-
-        ++this.historyOffset;
-        this.text = this.history[this.history.length - this.historyOffset];
-
-        this.element.scrollIntoViewIfNeeded();
-        var firstNewlineIndex = this.text.indexOf("\n");
-        if (firstNewlineIndex === -1)
-            this.moveCaretToEndOfPrompt();
-        else {
-            var selection = window.getSelection();
-            var selectionRange = document.createRange();
-
-            selectionRange.setStart(this.element.firstChild, firstNewlineIndex);
-            selectionRange.setEnd(this.element.firstChild, firstNewlineIndex);
-
-            selection.removeAllRanges();
-            selection.addRange(selectionRange);
-        }
-    },
-
-    _moveForwardInHistory: function()
-    {
-        if (this.historyOffset === 0)
-            return;
-
-        this.clearAutoComplete(true);
-
-        --this.historyOffset;
-
-        if (this.historyOffset === 0) {
-            this.text = this.tempSavedCommand;
-            delete this.tempSavedCommand;
-            return;
-        }
-
-        this.text = this.history[this.history.length - this.historyOffset];
-        this.element.scrollIntoViewIfNeeded();
-    }
-}
-
-/* Popup.js */
-
-/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
- *
- * Redistribution and use 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 Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * 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.
- */
-
-/**
- * This class provides a popup that can be shown relative to an anchor element
- * or at an arbitrary absolute position.
- * Points are Objects: {x: xValue, y: yValue}.
- * Rectangles are Objects: {x: xValue, y: yValue, width: widthValue, height: heightValue}.
- *
- * element is an optional unparented visible element (style.display != "none" AND style.visibility != "hidden").
- * If the element is absent/undefined, it must have been set with the element(x) setter before the show() method invocation.
- */
-WebInspector.Popup = function(element)
-{
-    if (element)
-        this.element = element;
-    this._keyHandler = this._keyEventHandler.bind(this);
-    this._mouseDownHandler = this._mouseDownEventHandler.bind(this);
-    this._visible = false;
-    this._autoHide = true;
-}
-
-WebInspector.Popup.prototype = {
-    show: function()
-    {
-        if (this.visible)
-            return;
-        var ownerDocument = this._contentElement.ownerDocument;
-        if (!ownerDocument)
-            return;
-
-        this._glasspaneElement = ownerDocument.createElement("div");
-        this._glasspaneElement.className = "popup-glasspane";
-        ownerDocument.body.appendChild(this._glasspaneElement);
-
-        this._contentElement.positionAt(0, 0);
-        this._contentElement.removeStyleClass("hidden");
-        ownerDocument.body.appendChild(this._contentElement);
-
-        this.positionElement();
-        this._visible = true;
-        ownerDocument.addEventListener("keydown", this._keyHandler, false);
-        ownerDocument.addEventListener("mousedown", this._mouseDownHandler, false);
-    },
-
-    hide: function()
-    {
-        if (this.visible) {
-            this._visible = false;
-            this._contentElement.ownerDocument.removeEventListener("keydown", this._keyHandler, false);
-            this._contentElement.ownerDocument.removeEventListener("mousedown", this._mouseDownHandler, false);
-            this._glasspaneElement.parentElement.removeChild(this._glasspaneElement);
-            this._contentElement.parentElement.removeChild(this._contentElement);
-        }
-    },
-
-    get visible()
-    {
-        return this._visible;
-    },
-
-    set element(x)
-    {
-        this._checkNotVisible();
-        this._contentElement = x;
-        this._contentElement.addStyleClass("hidden");
-    },
-
-    get element()
-    {
-        return this._contentElement;
-    },
-
-    positionElement: function()
-    {
-        var element = this._contentElement;
-        var anchorElement = this._anchorElement;
-
-        var targetDocument = element.ownerDocument;
-        var targetDocumentBody = targetDocument.body;
-        var targetDocumentElement = targetDocument.documentElement;
-        var clippingBox = {x: 0, y: 0, width: targetDocumentElement.clientWidth, height: targetDocumentElement.clientHeight};
-        var parentElement = element.offsetParent || element.parentElement;
-
-        var anchorPosition = {x: anchorElement.totalOffsetLeft, y: anchorElement.totalOffsetTop};
-
-        // FIXME(apavlov@chromium.org): Translate anchorPosition to the element.ownerDocument frame when https://bugs.webkit.org/show_bug.cgi?id=28913 is fixed.
-        var anchorBox = {x: anchorPosition.x, y: anchorPosition.y, width: anchorElement.offsetWidth, height: anchorElement.offsetHeight};
-        var elementBox = {x: element.totalOffsetLeft, y: element.totalOffsetTop, width: element.offsetWidth, height: element.offsetHeight};
-        var newElementPosition = {x: 0, y: 0};
-
-        if (anchorBox.y - elementBox.height >= clippingBox.y)
-            newElementPosition.y = anchorBox.y - elementBox.height;
-        else
-            newElementPosition.y = Math.min(anchorBox.y + anchorBox.height, Math.max(clippingBox.y, clippingBox.y + clippingBox.height - elementBox.height));
-
-        if (anchorBox.x + elementBox.height <= clippingBox.x + clippingBox.height)
-            newElementPosition.x = anchorBox.x;
-        else
-            newElementPosition.x = Math.max(clippingBox.x, clippingBox.x + clippingBox.height - elementBox.height);
-        element.positionAt(newElementPosition.x, newElementPosition.y);
-    },
-
-    set anchor(x)
-    {
-        this._checkNotVisible();
-        this._anchorElement = x;
-    },
-
-    get anchor()
-    {
-        return this._anchorElement;
-    },
-
-    set autoHide(x)
-    {
-        this._autoHide = x;
-    },
-
-    _checkNotVisible: function()
-    {
-        if (this.visible)
-            throw new Error("The popup must not be visible.");
-    },
-
-    _keyEventHandler: function(event)
-    {
-        // Escape hides the popup.
-        if (event.keyIdentifier == "U+001B") {
-            this.hide();
-            event.preventDefault();
-            event.handled = true;
-        }
-    },
-
-    _mouseDownEventHandler: function(event)
-    {
-        if (this._autoHide && event.originalTarget === this._glasspaneElement)
-            this.hide();
-    }
-}
-
-/* Placard.js */
-
-/*
- * Copyright (C) 2008 Apple Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. 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.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``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 APPLE INC. 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.
- */
-
-WebInspector.Placard = function(title, subtitle)
-{
-    this.element = document.createElement("div");
-    this.element.className = "placard";
-    this.element.placard = this;
-
-    this.titleElement = document.createElement("div");
-    this.titleElement.className = "title";
-
-    this.subtitleElement = document.createElement("div");
-    this.subtitleElement.className = "subtitle";
-
-    this.element.appendChild(this.subtitleElement);
-    this.element.appendChild(this.titleElement);
-
-    this.title = title;
-    this.subtitle = subtitle;
-    this.selected = false;
-}
-
-WebInspector.Placard.prototype = {
-    get title()
-    {
-        return this._title;
-    },
-
-    set title(x)
-    {
-        if (this._title === x)
-            return;
-        this._title = x;
-        this.titleElement.textContent = x;
-    },
-
-    get subtitle()
-    {
-        return this._subtitle;
-    },
-
-    set subtitle(x)
-    {
-        if (this._subtitle === x)
-            return;
-        this._subtitle = x;
-        this.subtitleElement.innerHTML = x;
-    },
-
-    get selected()
-    {
-        return this._selected;
-    },
-
-    set selected(x)
-    {
-        if (x)
-            this.select();
-        else
-            this.deselect();
-    },
-
-    select: function()
-    {
-        if (this._selected)
-            return;
-        this._selected = true;
-        this.element.addStyleClass("selected");
-    },
-
-    deselect: function()
-    {
-        if (!this._selected)
-            return;
-        this._selected = false;
-        this.element.removeStyleClass("selected");
-    },
-
-    toggleSelected: function()
-    {
-        this.selected = !this.selected;
-    }
-}
-
-/* View.js */
-
-/*
- * Copyright (C) 2008 Apple Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. 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.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``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 APPLE INC. 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.
- */
-
-WebInspector.View = function(element)
-{
-    this.element = element || document.createElement("div");
-    this._visible = false;
-}
-
-WebInspector.View.prototype = {
-    get visible()
-    {
-        return this._visible;
-    },
-
-    set visible(x)
-    {
-        if (this._visible === x)
-            return;
-
-        if (x)
-            this.show();
-        else
-            this.hide();
-    },
-
-    show: function(parentElement)
-    {
-        this._visible = true;
-        if (parentElement && parentElement !== this.element.parentNode) {
-            this.detach();
-            parentElement.appendChild(this.element);
-        }
-        if (!this.element.parentNode && this.attach)
-            this.attach();
-        this.element.addStyleClass("visible");
-    },
-
-    hide: function()
-    {
-        this.element.removeStyleClass("visible");
-        this._visible = false;
-    },
-
-    detach: function()
-    {
-        if (this.element.parentNode)
-            this.element.parentNode.removeChild(this.element);
-    }
-}
-
-WebInspector.View.prototype.__proto__ = WebInspector.Object.prototype;
-
-/* Callback.js */
-
-/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
- *
- * Redistribution and use 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 Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * 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.
- */
-
-WebInspector.Callback = function()
-{
-    this._lastCallbackId = 1;
-    this._callbacks = {};
-}
-
-WebInspector.Callback.prototype = {
-    wrap: function(callback)
-    {
-        var callbackId = this._lastCallbackId++;
-        this._callbacks[callbackId] = callback || function() {};
-        return callbackId;
-    },
-
-    processCallback: function(callbackId, opt_vararg)
-    {
-        var args = Array.prototype.slice.call(arguments, 1);
-        var callback = this._callbacks[callbackId];
-        callback.apply(null, args);
-        delete this._callbacks[callbackId];
-    }
-}
-
-WebInspector.Callback._INSTANCE = new WebInspector.Callback();
-WebInspector.Callback.wrap = WebInspector.Callback._INSTANCE.wrap.bind(WebInspector.Callback._INSTANCE);
-WebInspector.Callback.processCallback = WebInspector.Callback._INSTANCE.processCallback.bind(WebInspector.Callback._INSTANCE);
-
-/* Drawer.js */
-
-/*
- * Copyright (C) 2007, 2008 Apple Inc.  All rights reserved.
- * Copyright (C) 2009 Joseph Pecoraro
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  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.
- * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS 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 APPLE OR ITS 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.
- */
-
-WebInspector.Drawer = function()
-{
-    WebInspector.View.call(this, document.getElementById("drawer"));
-
-    this._savedHeight = 200; // Default.
-    this.state = WebInspector.Drawer.State.Hidden;
-    this.fullPanel = false;
-
-    this.mainElement = document.getElementById("main");
-    this.toolbarElement = document.getElementById("toolbar");
-    this.mainStatusBar = document.getElementById("main-status-bar");
-    this.mainStatusBar.addEventListener("mousedown", this._startStatusBarDragging.bind(this), true);
-    this.viewStatusBar = document.getElementById("other-drawer-status-bar-items");
-}
-
-WebInspector.Drawer.prototype = {
-    get visibleView()
-    {
-        return this._visibleView;
-    },
-
-    set visibleView(x)
-    {
-        if (this._visibleView === x) {
-            if (this.visible && this.fullPanel)
-                return;
-            this.visible = !this.visible;
-            return;
-        }
-
-        var firstTime = !this._visibleView;
-        if (this._visibleView)
-            this._visibleView.hide();
-
-        this._visibleView = x;
-
-        if (x && !firstTime) {
-            this._safelyRemoveChildren();
-            this.viewStatusBar.removeChildren(); // optimize this? call old.detach()
-            x.attach(this.element, this.viewStatusBar);
-            x.show();
-            this.visible = true;
-        }
-    },
-
-    get savedHeight()
-    {
-        var height = this._savedHeight || this.element.offsetHeight;
-        return Number.constrain(height, Preferences.minConsoleHeight, window.innerHeight - this.mainElement.totalOffsetTop - Preferences.minConsoleHeight);
-    },
-
-    showView: function(view)
-    {
-        if (!this.visible || this.visibleView !== view)
-            this.visibleView = view;
-    },
-
-    show: function()
-    {
-        if (this._animating || this.visible)
-            return;
-
-        if (this.visibleView)
-            this.visibleView.show();
-
-        WebInspector.View.prototype.show.call(this);
-
-        this._animating = true;
-
-        document.body.addStyleClass("drawer-visible");
-
-        var anchoredItems = document.getElementById("anchored-status-bar-items");
-        var height = (this.fullPanel ? window.innerHeight - this.toolbarElement.offsetHeight : this.savedHeight);
-        var animations = [
-            {element: this.element, end: {height: height}},
-            {element: document.getElementById("main"), end: {bottom: height}},
-            {element: document.getElementById("main-status-bar"), start: {"padding-left": anchoredItems.offsetWidth - 1}, end: {"padding-left": 0}},
-            {element: document.getElementById("other-drawer-status-bar-items"), start: {opacity: 0}, end: {opacity: 1}}
-        ];
-
-        var drawerStatusBar = document.getElementById("drawer-status-bar");
-        drawerStatusBar.insertBefore(anchoredItems, drawerStatusBar.firstChild);
-
-        function animationFinished()
-        {
-            if ("updateStatusBarItems" in WebInspector.currentPanel)
-                WebInspector.currentPanel.updateStatusBarItems();
-            if (this.visibleView.afterShow)
-                this.visibleView.afterShow();
-            delete this._animating;
-            delete this._currentAnimationInterval;
-            this.state = (this.fullPanel ? WebInspector.Drawer.State.Full : WebInspector.Drawer.State.Variable);
-        }
-
-        this._currentAnimationInterval = WebInspector.animateStyle(animations, this._animationDuration(), animationFinished.bind(this));
-    },
-
-    hide: function()
-    {
-        if (this._animating || !this.visible)
-            return;
-
-        WebInspector.View.prototype.hide.call(this);
-
-        if (this.visibleView)
-            this.visibleView.hide();
-
-        this._animating = true;
-
-        if (!this.fullPanel)
-            this._savedHeight = this.element.offsetHeight;
-
-        if (this.element === WebInspector.currentFocusElement || this.element.isAncestor(WebInspector.currentFocusElement))
-            WebInspector.currentFocusElement = WebInspector.previousFocusElement;
-
-        var anchoredItems = document.getElementById("anchored-status-bar-items");
-
-        // Temporarily set properties and classes to mimic the post-animation values so panels
-        // like Elements in their updateStatusBarItems call will size things to fit the final location.
-        this.mainStatusBar.style.setProperty("padding-left", (anchoredItems.offsetWidth - 1) + "px");
-        document.body.removeStyleClass("drawer-visible");
-        if ("updateStatusBarItems" in WebInspector.currentPanel)
-            WebInspector.currentPanel.updateStatusBarItems();
-        document.body.addStyleClass("drawer-visible");
-
-        var animations = [
-            {element: document.getElementById("main"), end: {bottom: 0}},
-            {element: document.getElementById("main-status-bar"), start: {"padding-left": 0}, end: {"padding-left": anchoredItems.offsetWidth - 1}},
-            {element: document.getElementById("other-drawer-status-bar-items"), start: {opacity: 1}, end: {opacity: 0}}
-        ];
-
-        function animationFinished()
-        {
-            var mainStatusBar = document.getElementById("main-status-bar");
-            mainStatusBar.insertBefore(anchoredItems, mainStatusBar.firstChild);
-            mainStatusBar.style.removeProperty("padding-left");
-            document.body.removeStyleClass("drawer-visible");
-            delete this._animating;
-            delete this._currentAnimationInterval;
-            this.state = WebInspector.Drawer.State.Hidden;
-        }
-
-        this._currentAnimationInterval = WebInspector.animateStyle(animations, this._animationDuration(), animationFinished.bind(this));
-    },
-
-    resize: function()
-    {
-        if (this.state === WebInspector.Drawer.State.Hidden)
-            return;
-
-        var height;
-        var mainElement = document.getElementById("main");
-        if (this.state === WebInspector.Drawer.State.Variable) {
-            height = parseInt(this.element.style.height);
-            height = Number.constrain(height, Preferences.minConsoleHeight, window.innerHeight - mainElement.totalOffsetTop - Preferences.minConsoleHeight);
-        } else
-            height = window.innerHeight - this.toolbarElement.offsetHeight;
-
-        mainElement.style.bottom = height + "px";
-        this.element.style.height = height + "px";
-    },
-
-    enterPanelMode: function()
-    {
-        this._cancelAnimationIfNeeded();
-        this.fullPanel = true;
-        
-        if (this.visible) {
-            this._savedHeight = this.element.offsetHeight;
-            var height = window.innerHeight - this.toolbarElement.offsetHeight;
-            this._animateDrawerHeight(height, WebInspector.Drawer.State.Full);
-        }
-    },
-
-    exitPanelMode: function()
-    {
-        this._cancelAnimationIfNeeded();
-        this.fullPanel = false;
-
-        if (this.visible) {
-            // If this animation gets cancelled, we want the state of the drawer to be Variable,
-            // so that the new animation can't do an immediate transition between Hidden/Full states.
-            this.state = WebInspector.Drawer.State.Variable;
-            var height = this.savedHeight;
-            this._animateDrawerHeight(height, WebInspector.Drawer.State.Variable);
-        }
-    },
-
-    immediatelyExitPanelMode: function()
-    {
-        this.visible = false;
-        this.fullPanel = false;
-    },
-
-    _cancelAnimationIfNeeded: function()
-    {
-        if (this._animating) {
-            clearInterval(this._currentAnimationInterval);
-            delete this._animating;
-            delete this._currentAnimationInterval;
-        }
-    },
-
-    _animateDrawerHeight: function(height, finalState)
-    {
-        this._animating = true;
-        var animations = [
-            {element: this.element, end: {height: height}},
-            {element: document.getElementById("main"), end: {bottom: height}}
-        ];
-
-        function animationFinished()
-        {
-            delete this._animating;
-            delete this._currentAnimationInterval;
-            this.state = finalState;
-        }
-
-        this._currentAnimationInterval = WebInspector.animateStyle(animations, this._animationDuration(), animationFinished.bind(this));
-    },
-
-    _animationDuration: function()
-    {
-        // Immediate if going between Hidden and Full in full panel mode
-        if (this.fullPanel && (this.state === WebInspector.Drawer.State.Hidden || this.state === WebInspector.Drawer.State.Full))
-            return 0;
-
-        return (window.event && window.event.shiftKey ? 2000 : 250);
-    },
-
-    _safelyRemoveChildren: function()
-    {
-        var child = this.element.firstChild;
-        while (child) {
-            if (child.id !== "drawer-status-bar") {
-                var moveTo = child.nextSibling;
-                this.element.removeChild(child);
-                child = moveTo;
-            } else
-                child = child.nextSibling;
-        }
-    },
-
-    _startStatusBarDragging: function(event)
-    {
-        if (!this.visible || event.target !== this.mainStatusBar)
-            return;
-
-        WebInspector.elementDragStart(this.mainStatusBar, this._statusBarDragging.bind(this), this._endStatusBarDragging.bind(this), event, "row-resize");
-
-        this._statusBarDragOffset = event.pageY - this.element.totalOffsetTop;
-
-        event.stopPropagation();
-    },
-
-    _statusBarDragging: function(event)
-    {
-        var mainElement = document.getElementById("main");
-        var height = window.innerHeight - event.pageY + this._statusBarDragOffset;
-        height = Number.constrain(height, Preferences.minConsoleHeight, window.innerHeight - mainElement.totalOffsetTop - Preferences.minConsoleHeight);
-
-        mainElement.style.bottom = height + "px";
-        this.element.style.height = height + "px";
-
-        event.preventDefault();
-        event.stopPropagation();
-    },
-
-    _endStatusBarDragging: function(event)
-    {
-        WebInspector.elementDragEnd(event);
-
-        this._savedHeight = this.element.offsetHeight;
-        delete this._statusBarDragOffset;
-
-        event.stopPropagation();
-    }
-}
-
-WebInspector.Drawer.prototype.__proto__ = WebInspector.View.prototype;
-
-WebInspector.Drawer.State = {
-    Hidden: 0,
-    Variable: 1,
-    Full: 2
-};
-
-/* ChangesView.js */
-
-/*
- * Copyright (C) 2007, 2008 Apple Inc.  All rights reserved.
- * Copyright (C) 2009 Joseph Pecoraro
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer. 
- * 2.  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. 
- * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission. 
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS 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 APPLE OR ITS 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.
- */
-
-WebInspector.ChangesView = function(drawer)
-{
-    WebInspector.View.call(this);
-    this.element.innerHTML = "<div style=\"bottom:25%;color:rgb(192,192,192);font-size:12px;height:65px;left:0px;margin:auto;position:absolute;right:0px;text-align:center;top:0px;\"><h1>Not Implemented Yet</h1></div>";
-
-    this.drawer = drawer;
-
-    this.clearButton = document.createElement("button");
-    this.clearButton.id = "clear-changes-status-bar-item";
-    this.clearButton.title = WebInspector.UIString("Clear changes log.");
-    this.clearButton.className = "status-bar-item";
-    this.clearButton.addEventListener("click", this._clearButtonClicked.bind(this), false);
-
-    this.toggleChangesButton = document.getElementById("changes-status-bar-item");
-    this.toggleChangesButton.title = WebInspector.UIString("Show changes view.");
-    this.toggleChangesButton.addEventListener("click", this._toggleChangesButtonClicked.bind(this), false);
-    var anchoredStatusBar = document.getElementById("anchored-status-bar-items");
-    anchoredStatusBar.appendChild(this.toggleChangesButton);
-}
-
-WebInspector.ChangesView.prototype = {
-    _clearButtonClicked: function()
-    {
-        // Not Implemented Yet
-    },
-
-    _toggleChangesButtonClicked: function()
-    {
-        this.drawer.visibleView = this;
-    },
-
-    attach: function(mainElement, statusBarElement)
-    {
-        mainElement.appendChild(this.element);
-        statusBarElement.appendChild(this.clearButton);
-    },
-
-    show: function()
-    {
-        this.toggleChangesButton.addStyleClass("toggled-on");
-        this.toggleChangesButton.title = WebInspector.UIString("Hide changes view.");
-    },
-
-    hide: function()
-    {
-        this.toggleChangesButton.removeStyleClass("toggled-on");
-        this.toggleChangesButton.title = WebInspector.UIString("Show changes view.");
-    }
-}
-
-WebInspector.ChangesView.prototype.__proto__ = WebInspector.View.prototype;
-
-/* ConsoleView.js */
-
-/*
- * Copyright (C) 2007, 2008 Apple Inc.  All rights reserved.
- * Copyright (C) 2009 Joseph Pecoraro
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer. 
- * 2.  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. 
- * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission. 
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS 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 APPLE OR ITS 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.
- */
-
-const ExpressionStopCharacters = " =:[({;,!+-*/&|^<>";
-
-WebInspector.ConsoleView = function(drawer)
-{
-    WebInspector.View.call(this, document.getElementById("console-view"));
-
-    this.messages = [];
-    this.drawer = drawer;
-
-    this.clearButton = document.getElementById("clear-console-status-bar-item");
-    this.clearButton.title = WebInspector.UIString("Clear console log.");
-    this.clearButton.addEventListener("click", this._clearButtonClicked.bind(this), false);
-
-    this.messagesElement = document.getElementById("console-messages");
-    this.messagesElement.addEventListener("selectstart", this._messagesSelectStart.bind(this), false);
-    this.messagesElement.addEventListener("click", this._messagesClicked.bind(this), true);
-
-    this.promptElement = document.getElementById("console-prompt");
-    this.promptElement.className = "source-code";
-    this.promptElement.addEventListener("keydown", this._promptKeyDown.bind(this), true);
-    this.prompt = new WebInspector.TextPrompt(this.promptElement, this.completions.bind(this), ExpressionStopCharacters + ".");
-
-    this.topGroup = new WebInspector.ConsoleGroup(null, 0);
-    this.messagesElement.insertBefore(this.topGroup.element, this.promptElement);
-    this.groupLevel = 0;
-    this.currentGroup = this.topGroup;
-
-    this.toggleConsoleButton = document.getElementById("console-status-bar-item");
-    this.toggleConsoleButton.title = WebInspector.UIString("Show console.");
-    this.toggleConsoleButton.addEventListener("click", this._toggleConsoleButtonClicked.bind(this), false);
-
-    // Will hold the list of filter elements
-    this.filterBarElement = document.getElementById("console-filter");
-
-    function createDividerElement() {
-        var dividerElement = document.createElement("div");
-        dividerElement.addStyleClass("divider");
-        this.filterBarElement.appendChild(dividerElement);
-    }
-
-    var updateFilterHandler = this._updateFilter.bind(this);
-    function createFilterElement(category) {
-        var categoryElement = document.createElement("li");
-        categoryElement.category = category;
-        categoryElement.addStyleClass(categoryElement.category);            
-        categoryElement.addEventListener("click", updateFilterHandler, false);
-
-        var label = category.toString();
-        categoryElement.appendChild(document.createTextNode(label));
-
-        this.filterBarElement.appendChild(categoryElement);
-        return categoryElement;
-    }
-    
-    this.allElement = createFilterElement.call(this, "All");
-    createDividerElement.call(this);
-    this.errorElement = createFilterElement.call(this, "Errors");
-    this.warningElement = createFilterElement.call(this, "Warnings");
-    this.logElement = createFilterElement.call(this, "Logs");
-
-    this.filter(this.allElement, false);
-
-    this._shortcuts = {};
-
-    var shortcut;
-    var clearConsoleHandler = this.requestClearMessages.bind(this);
-
-    shortcut = WebInspector.KeyboardShortcut.makeKey("k", WebInspector.KeyboardShortcut.Modifiers.Meta);
-    this._shortcuts[shortcut] = clearConsoleHandler;
-    this._shortcuts[shortcut].isMacOnly = true;
-    shortcut = WebInspector.KeyboardShortcut.makeKey("l", WebInspector.KeyboardShortcut.Modifiers.Ctrl);
-    this._shortcuts[shortcut] = clearConsoleHandler;
-
-    // Since the Context Menu for the Console View will always be the same, we can create it in
-    // the constructor.
-    this._contextMenu = new WebInspector.ContextMenu();
-    this._contextMenu.appendItem(WebInspector.UIString("Clear Console"), clearConsoleHandler);
-    this.messagesElement.addEventListener("contextmenu", this._handleContextMenuEvent.bind(this), true);
-    
-    this._customFormatters = {
-        "object": this._formatobject,
-        "array":  this._formatarray,
-        "node":   this._formatnode,
-        "string": this._formatstring
-    };
-}
-
-WebInspector.ConsoleView.prototype = {
-    
-    _updateFilter: function(e)
-    {
-        var isMac = WebInspector.isMac();
-        var selectMultiple = false;
-        if (isMac && e.metaKey && !e.ctrlKey && !e.altKey && !e.shiftKey)
-            selectMultiple = true;
-        if (!isMac && e.ctrlKey && !e.metaKey && !e.altKey && !e.shiftKey)
-            selectMultiple = true;
-
-        this.filter(e.target, selectMultiple);
-    },
-    
-    filter: function(target, selectMultiple)
-    {
-        function unselectAll()
-        {
-            this.allElement.removeStyleClass("selected");
-            this.errorElement.removeStyleClass("selected");
-            this.warningElement.removeStyleClass("selected");
-            this.logElement.removeStyleClass("selected");
-            
-            this.messagesElement.removeStyleClass("filter-all");
-            this.messagesElement.removeStyleClass("filter-errors");
-            this.messagesElement.removeStyleClass("filter-warnings");
-            this.messagesElement.removeStyleClass("filter-logs");
-        }
-        
-        var targetFilterClass = "filter-" + target.category.toLowerCase();
-
-        if (target.category == "All") {
-            if (target.hasStyleClass("selected")) {
-                // We can't unselect all, so we break early here
-                return;
-            }
-
-            unselectAll.call(this);
-        } else {
-            // Something other than all is being selected, so we want to unselect all
-            if (this.allElement.hasStyleClass("selected")) {
-                this.allElement.removeStyleClass("selected");
-                this.messagesElement.removeStyleClass("filter-all");
-            }
-        }
-        
-        if (!selectMultiple) {
-            // If multiple selection is off, we want to unselect everything else
-            // and just select ourselves.
-            unselectAll.call(this);
-            
-            target.addStyleClass("selected");
-            this.messagesElement.addStyleClass(targetFilterClass);
-            
-            return;
-        }
-        
-        if (target.hasStyleClass("selected")) {
-            // If selectMultiple is turned on, and we were selected, we just
-            // want to unselect ourselves.
-            target.removeStyleClass("selected");
-            this.messagesElement.removeStyleClass(targetFilterClass);
-        } else {
-            // If selectMultiple is turned on, and we weren't selected, we just
-            // want to select ourselves.
-            target.addStyleClass("selected");
-            this.messagesElement.addStyleClass(targetFilterClass);
-        }
-    },
-    
-    _toggleConsoleButtonClicked: function()
-    {
-        this.drawer.visibleView = this;
-    },
-
-    attach: function(mainElement, statusBarElement)
-    {
-        mainElement.appendChild(this.element);
-        statusBarElement.appendChild(this.clearButton);
-        statusBarElement.appendChild(this.filterBarElement);
-    },
-
-    show: function()
-    {
-        this.toggleConsoleButton.addStyleClass("toggled-on");
-        this.toggleConsoleButton.title = WebInspector.UIString("Hide console.");
-        if (!this.prompt.isCaretInsidePrompt())
-            this.prompt.moveCaretToEndOfPrompt();
-    },
-
-    afterShow: function()
-    {
-        WebInspector.currentFocusElement = this.promptElement;  
-    },
-
-    hide: function()
-    {
-        this.toggleConsoleButton.removeStyleClass("toggled-on");
-        this.toggleConsoleButton.title = WebInspector.UIString("Show console.");
-    },
-
-    addMessage: function(msg)
-    {
-        if (msg instanceof WebInspector.ConsoleMessage && !(msg instanceof WebInspector.ConsoleCommandResult)) {
-            this._incrementErrorWarningCount(msg);
-
-            // Add message to the resource panel
-            if (msg.url in WebInspector.resourceURLMap) {
-                msg.resource = WebInspector.resourceURLMap[msg.url];
-                if (WebInspector.panels.resources)
-                    WebInspector.panels.resources.addMessageToResource(msg.resource, msg);
-            }
-
-            this.commandSincePreviousMessage = false;
-            this.previousMessage = msg;
-        } else if (msg instanceof WebInspector.ConsoleCommand) {
-            if (this.previousMessage) {
-                this.commandSincePreviousMessage = true;
-            }
-        }
-
-        this.messages.push(msg);
-
-        if (msg.type === WebInspector.ConsoleMessage.MessageType.EndGroup) {
-            if (this.groupLevel < 1)
-                return;
-
-            this.groupLevel--;
-
-            this.currentGroup = this.currentGroup.parentGroup;
-        } else {
-            if (msg.type === WebInspector.ConsoleMessage.MessageType.StartGroup) {
-                this.groupLevel++;
-
-                var group = new WebInspector.ConsoleGroup(this.currentGroup, this.groupLevel);
-                this.currentGroup.messagesElement.appendChild(group.element);
-                this.currentGroup = group;
-            }
-
-            this.currentGroup.addMessage(msg);
-        }
-
-        this.promptElement.scrollIntoView(false);
-    },
-
-    updateMessageRepeatCount: function(count)
-    {
-        var msg = this.previousMessage;
-        var prevRepeatCount = msg.totalRepeatCount;
-        
-        if (!this.commandSincePreviousMessage) {
-            msg.repeatDelta = count - prevRepeatCount;
-            msg.repeatCount = msg.repeatCount + msg.repeatDelta;
-            msg.totalRepeatCount = count;
-            msg._updateRepeatCount();
-            this._incrementErrorWarningCount(msg);
-        } else {
-            msgCopy = new WebInspector.ConsoleMessage(msg.source, msg.type, msg.level, msg.line, msg.url, msg.groupLevel, count - prevRepeatCount);
-            msgCopy.totalRepeatCount = count;
-            msgCopy.setMessageBody(msg.args);
-            this.addMessage(msgCopy);
-        }
-    },
-
-    _incrementErrorWarningCount: function(msg)
-    {
-        switch (msg.level) {
-            case WebInspector.ConsoleMessage.MessageLevel.Warning:
-                WebInspector.warnings += msg.repeatDelta;
-                break;
-            case WebInspector.ConsoleMessage.MessageLevel.Error:
-                WebInspector.errors += msg.repeatDelta;
-                break;
-        }
-    },
-
-    requestClearMessages: function()
-    {
-        InjectedScriptAccess.clearConsoleMessages(function() {});
-    },
-
-    clearMessages: function()
-    {
-        if (WebInspector.panels.resources)
-            WebInspector.panels.resources.clearMessages();
-
-        this.messages = [];
-
-        this.groupLevel = 0;
-        this.currentGroup = this.topGroup;
-        this.topGroup.messagesElement.removeChildren();
-
-        WebInspector.errors = 0;
-        WebInspector.warnings = 0;
-
-        delete this.commandSincePreviousMessage;
-        delete this.previousMessage;
-    },
-
-    completions: function(wordRange, bestMatchOnly, completionsReadyCallback)
-    {
-        // Pass less stop characters to rangeOfWord so the range will be a more complete expression.
-        var expressionRange = wordRange.startContainer.rangeOfWord(wordRange.startOffset, ExpressionStopCharacters, this.promptElement, "backward");
-        var expressionString = expressionRange.toString();
-        var lastIndex = expressionString.length - 1;
-
-        var dotNotation = (expressionString[lastIndex] === ".");
-        var bracketNotation = (expressionString[lastIndex] === "[");
-
-        if (dotNotation || bracketNotation)
-            expressionString = expressionString.substr(0, lastIndex);
-
-        var prefix = wordRange.toString();
-        if (!expressionString && !prefix)
-            return;
-
-        var reportCompletions = this._reportCompletions.bind(this, bestMatchOnly, completionsReadyCallback, dotNotation, bracketNotation, prefix);
-        // Collect comma separated object properties for the completion.
-
-        var includeInspectorCommandLineAPI = (!dotNotation && !bracketNotation);
-        if (WebInspector.panels.scripts && WebInspector.panels.scripts.paused)
-            var callFrameId = WebInspector.panels.scripts.selectedCallFrameId();
-        InjectedScriptAccess.getCompletions(expressionString, includeInspectorCommandLineAPI, callFrameId, reportCompletions);
-    },
-
-    _reportCompletions: function(bestMatchOnly, completionsReadyCallback, dotNotation, bracketNotation, prefix, result, isException) {
-        if (isException)
-            return;
-
-        if (bracketNotation) {
-            if (prefix.length && prefix[0] === "'")
-                var quoteUsed = "'";
-            else
-                var quoteUsed = "\"";
-        }
-
-        var results = [];
-        var properties = Object.sortedProperties(result);
-
-        for (var i = 0; i < properties.length; ++i) {
-            var property = properties[i];
-
-            if (dotNotation && !/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(property))
-                continue;
-
-            if (bracketNotation) {
-                if (!/^[0-9]+$/.test(property))
-                    property = quoteUsed + property.escapeCharacters(quoteUsed + "\\") + quoteUsed;
-                property += "]";
-            }
-
-            if (property.length < prefix.length)
-                continue;
-            if (property.indexOf(prefix) !== 0)
-                continue;
-
-            results.push(property);
-            if (bestMatchOnly)
-                break;
-        }
-        completionsReadyCallback(results);
-    },
-
-    _clearButtonClicked: function()
-    {
-        this.requestClearMessages();
-    },
-
-    _handleContextMenuEvent: function(event)
-    {
-        if (!window.getSelection().isCollapsed) {
-            // If there is a selection, we want to show our normal context menu
-            // (with Copy, etc.), and not Clear Console.
-            return;
-        }
-
-        this._contextMenu.show(event);
-    },
-
-    _messagesSelectStart: function(event)
-    {
-        if (this._selectionTimeout)
-            clearTimeout(this._selectionTimeout);
-
-        this.prompt.clearAutoComplete();
-
-        function moveBackIfOutside()
-        {
-            delete this._selectionTimeout;
-            if (!this.prompt.isCaretInsidePrompt() && window.getSelection().isCollapsed)
-                this.prompt.moveCaretToEndOfPrompt();
-            this.prompt.autoCompleteSoon();
-        }
-
-        this._selectionTimeout = setTimeout(moveBackIfOutside.bind(this), 100);
-    },
-
-    _messagesClicked: function(event)
-    {
-        var link = event.target.enclosingNodeOrSelfWithNodeName("a");
-        if (!link || !link.representedNode)
-            return;
-
-        WebInspector.updateFocusedNode(link.representedNode.id);
-        event.stopPropagation();
-        event.preventDefault();
-    },
-
-    _promptKeyDown: function(event)
-    {
-        if (isEnterKey(event)) {
-            this._enterKeyPressed(event);
-            return;
-        }
-
-        var shortcut = WebInspector.KeyboardShortcut.makeKeyFromEvent(event);
-        var handler = this._shortcuts[shortcut];
-        if (handler) {
-            if (!this._shortcuts[shortcut].isMacOnly || WebInspector.isMac()) {
-                handler();
-                event.preventDefault();
-                return;
-            }
-        }
-    },
-
-    evalInInspectedWindow: function(expression, objectGroup, callback)
-    {
-        if (WebInspector.panels.scripts && WebInspector.panels.scripts.paused) {
-            WebInspector.panels.scripts.evaluateInSelectedCallFrame(expression, false, objectGroup, callback);
-            return;
-        }
-        this.doEvalInWindow(expression, objectGroup, callback);
-    },
-
-    doEvalInWindow: function(expression, objectGroup, callback)
-    {
-        if (!expression) {
-            // There is no expression, so the completion should happen against global properties.
-            expression = "this";
-        }
-
-        function evalCallback(result)
-        {
-            callback(result.value, result.isException);
-        };
-        InjectedScriptAccess.evaluate(expression, objectGroup, evalCallback);
-    },
-
-    _enterKeyPressed: function(event)
-    {
-        if (event.altKey)
-            return;
-
-        event.preventDefault();
-        event.stopPropagation();
-
-        this.prompt.clearAutoComplete(true);
-
-        var str = this.prompt.text;
-        if (!str.length)
-            return;
-
-        var commandMessage = new WebInspector.ConsoleCommand(str);
-        this.addMessage(commandMessage);
-
-        var self = this;
-        function printResult(result, exception)
-        {
-            self.prompt.history.push(str);
-            self.prompt.historyOffset = 0;
-            self.prompt.text = "";
-            self.addMessage(new WebInspector.ConsoleCommandResult(result, exception, commandMessage));
-        }
-        this.evalInInspectedWindow(str, "console", printResult);
-    },
-
-    _format: function(output, forceObjectFormat)
-    {
-        var isProxy = (output != null && typeof output === "object");
-        var type = (forceObjectFormat ? "object" : Object.proxyType(output));
-
-        var formatter = this._customFormatters[type];
-        if (!formatter || !isProxy) {
-            formatter = this._formatvalue;
-            output = output.description || output;
-        }
-
-        var span = document.createElement("span");
-        span.className = "console-formatted-" + type + " source-code";
-        formatter.call(this, output, span);
-        return span;
-    },
-
-    _formatvalue: function(val, elem)
-    {
-        elem.appendChild(document.createTextNode(val));
-    },
-
-    _formatobject: function(obj, elem)
-    {
-        elem.appendChild(new WebInspector.ObjectPropertiesSection(obj, obj.description, null, true).element);
-    },
-
-    _formatnode: function(object, elem)
-    {
-        function printNode(nodeId)
-        {
-            if (!nodeId)
-                return;
-            var treeOutline = new WebInspector.ElementsTreeOutline();
-            treeOutline.showInElementsPanelEnabled = true;
-            treeOutline.rootDOMNode = WebInspector.domAgent.nodeForId(nodeId);
-            treeOutline.element.addStyleClass("outline-disclosure");
-            if (!treeOutline.children[0].hasChildren)
-                treeOutline.element.addStyleClass("single-node");
-            elem.appendChild(treeOutline.element);
-        }
-
-        InjectedScriptAccess.pushNodeToFrontend(object, printNode);
-    },
-
-    _formatarray: function(arr, elem)
-    {
-        InjectedScriptAccess.getProperties(arr, false, false, this._printArray.bind(this, elem));
-    },
-
-    _formatstring: function(output, elem)
-    {
-        var span = document.createElement("span");
-        span.className = "console-formatted-string source-code";
-        span.appendChild(WebInspector.linkifyStringAsFragment(output.description));
-
-        // Make black quotes.
-        elem.removeStyleClass("console-formatted-string");
-        elem.appendChild(document.createTextNode("\""));
-        elem.appendChild(span);
-        elem.appendChild(document.createTextNode("\""));
-    },
-
-    _printArray: function(elem, properties)
-    {
-        if (!properties)
-            return;
-
-        var elements = [];
-        for (var i = 0; i < properties.length; ++i) {
-            var name = properties[i].name;
-            if (name == parseInt(name))
-                elements[name] = this._format(properties[i].value);
-        }
-
-        elem.appendChild(document.createTextNode("["));
-        for (var i = 0; i < elements.length; ++i) {
-            var element = elements[i];
-            if (element)
-                elem.appendChild(element);
-            else
-                elem.appendChild(document.createTextNode("undefined"))
-            if (i < elements.length - 1)
-                elem.appendChild(document.createTextNode(", "));
-        }
-        elem.appendChild(document.createTextNode("]"));
-    }
-}
-
-WebInspector.ConsoleView.prototype.__proto__ = WebInspector.View.prototype;
-
-WebInspector.ConsoleMessage = function(source, type, level, line, url, groupLevel, repeatCount)
-{
-    this.source = source;
-    this.type = type;
-    this.level = level;
-    this.line = line;
-    this.url = url;
-    this.groupLevel = groupLevel;
-    this.repeatCount = repeatCount;
-    this.repeatDelta = repeatCount;
-    this.totalRepeatCount = repeatCount;
-    if (arguments.length > 7)
-        this.setMessageBody(Array.prototype.slice.call(arguments, 7));
-}
-
-WebInspector.ConsoleMessage.prototype = {
-    setMessageBody: function(args)
-    {
-        this.args = args;
-        switch (this.type) {
-            case WebInspector.ConsoleMessage.MessageType.Trace:
-                var span = document.createElement("span");
-                span.className = "console-formatted-trace source-code";
-                var stack = Array.prototype.slice.call(args);
-                var funcNames = stack.map(function(f) {
-                    return f || WebInspector.UIString("(anonymous function)");
-                });
-                span.appendChild(document.createTextNode(funcNames.join("\n")));
-                this.formattedMessage = span;
-                break;
-            case WebInspector.ConsoleMessage.MessageType.Object:
-                this.formattedMessage = this._format(["%O", args[0]]);
-                break;
-            default:
-                this.formattedMessage = this._format(args);
-                break;
-        }
-
-        // This is used for inline message bubbles in SourceFrames, or other plain-text representations.
-        this.message = this.formattedMessage.textContent;
-    },
-
-    isErrorOrWarning: function()
-    {
-        return (this.level === WebInspector.ConsoleMessage.MessageLevel.Warning || this.level === WebInspector.ConsoleMessage.MessageLevel.Error);
-    },
-
-    _format: function(parameters)
-    {
-        // This node is used like a Builder. Values are contintually appended onto it.
-        var formattedResult = document.createElement("span");
-        if (!parameters.length)
-            return formattedResult;
-
-        // Formatting code below assumes that parameters are all wrappers whereas frontend console
-        // API allows passing arbitrary values as messages (strings, numbers, etc.). Wrap them here.
-        for (var i = 0; i < parameters.length; ++i)
-            if (typeof parameters[i] !== "object" && typeof parameters[i] !== "function")
-                parameters[i] = WebInspector.ObjectProxy.wrapPrimitiveValue(parameters[i]);
-
-        // There can be string log and string eval result. We distinguish between them based on message type.
-        var shouldFormatMessage = Object.proxyType(parameters[0]) === "string" && this.type !== WebInspector.ConsoleMessage.MessageType.Result;
-
-        // Multiple parameters with the first being a format string. Save unused substitutions.
-        if (shouldFormatMessage) {
-            // Multiple parameters with the first being a format string. Save unused substitutions.
-            var result = this._formatWithSubstitutionString(parameters, formattedResult);
-            parameters = result.unusedSubstitutions;
-            if (parameters.length)
-                formattedResult.appendChild(document.createTextNode(" "));
-        }
-
-        // Single parameter, or unused substitutions from above.
-        for (var i = 0; i < parameters.length; ++i) {
-            // Inline strings when formatting.
-            if (shouldFormatMessage && parameters[i].type === "string")
-                formattedResult.appendChild(document.createTextNode(parameters[i].description));
-            else
-                formattedResult.appendChild(WebInspector.console._format(parameters[i]));
-            if (i < parameters.length - 1)
-                formattedResult.appendChild(document.createTextNode(" "));
-        }
-        return formattedResult;
-    },
-
-    _formatWithSubstitutionString: function(parameters, formattedResult)
-    {
-        var formatters = {}
-        for (var i in String.standardFormatters)
-            formatters[i] = String.standardFormatters[i];
-
-        function consoleFormatWrapper(force)
-        {
-            return function(obj) {
-                return WebInspector.console._format(obj, force);
-            };
-        }
-
-        // Firebug uses %o for formatting objects.
-        formatters.o = consoleFormatWrapper();
-        // Firebug allows both %i and %d for formatting integers.
-        formatters.i = formatters.d;
-        // Support %O to force object formating, instead of the type-based %o formatting.
-        formatters.O = consoleFormatWrapper(true);
-
-        function append(a, b)
-        {
-            if (!(b instanceof Node))
-                a.appendChild(WebInspector.linkifyStringAsFragment(b.toString()));
-            else
-                a.appendChild(b);
-            return a;
-        }
-
-        // String.format does treat formattedResult like a Builder, result is an object.
-        return String.format(parameters[0].description, parameters.slice(1), formatters, formattedResult, append);
-    },
-
-    toMessageElement: function()
-    {
-        if (this._element)
-            return this._element;
-
-        var element = document.createElement("div");
-        element.message = this;
-        element.className = "console-message";
-
-        this._element = element;
-
-        switch (this.source) {
-            case WebInspector.ConsoleMessage.MessageSource.HTML:
-                element.addStyleClass("console-html-source");
-                break;
-            case WebInspector.ConsoleMessage.MessageSource.WML:
-                element.addStyleClass("console-wml-source");
-                break;
-            case WebInspector.ConsoleMessage.MessageSource.XML:
-                element.addStyleClass("console-xml-source");
-                break;
-            case WebInspector.ConsoleMessage.MessageSource.JS:
-                element.addStyleClass("console-js-source");
-                break;
-            case WebInspector.ConsoleMessage.MessageSource.CSS:
-                element.addStyleClass("console-css-source");
-                break;
-            case WebInspector.ConsoleMessage.MessageSource.Other:
-                element.addStyleClass("console-other-source");
-                break;
-        }
-
-        switch (this.level) {
-            case WebInspector.ConsoleMessage.MessageLevel.Tip:
-                element.addStyleClass("console-tip-level");
-                break;
-            case WebInspector.ConsoleMessage.MessageLevel.Log:
-                element.addStyleClass("console-log-level");
-                break;
-            case WebInspector.ConsoleMessage.MessageLevel.Debug:
-                element.addStyleClass("console-debug-level");
-                break;
-            case WebInspector.ConsoleMessage.MessageLevel.Warning:
-                element.addStyleClass("console-warning-level");
-                break;
-            case WebInspector.ConsoleMessage.MessageLevel.Error:
-                element.addStyleClass("console-error-level");
-                break;
-        }
-        
-        if (this.type === WebInspector.ConsoleMessage.MessageType.StartGroup)
-            element.addStyleClass("console-group-title");
-
-        if (this.elementsTreeOutline) {
-            element.addStyleClass("outline-disclosure");
-            element.appendChild(this.elementsTreeOutline.element);
-            return element;
-        }
-
-        if (this.url && this.url !== "undefined") {
-            var urlElement = document.createElement("a");
-            urlElement.className = "console-message-url webkit-html-resource-link";
-            urlElement.href = this.url;
-            urlElement.lineNumber = this.line;
-
-            if (this.source === WebInspector.ConsoleMessage.MessageSource.JS)
-                urlElement.preferredPanel = "scripts";
-
-            if (this.line > 0)
-                urlElement.textContent = WebInspector.displayNameForURL(this.url) + ":" + this.line;
-            else
-                urlElement.textContent = WebInspector.displayNameForURL(this.url);
-
-            element.appendChild(urlElement);
-        }
-
-        var messageTextElement = document.createElement("span");
-        messageTextElement.className = "console-message-text source-code";
-        if (this.type === WebInspector.ConsoleMessage.MessageType.Assert)
-            messageTextElement.appendChild(document.createTextNode(WebInspector.UIString("Assertion failed: ")));
-        messageTextElement.appendChild(this.formattedMessage);
-        element.appendChild(messageTextElement);
-
-        if (this.repeatCount > 1)
-            this._updateRepeatCount();
-
-        return element;
-    },
-
-    _updateRepeatCount: function() {
-        if (!this.repeatCountElement) {
-            this.repeatCountElement = document.createElement("span");
-            this.repeatCountElement.className = "bubble";
-    
-            this._element.insertBefore(this.repeatCountElement, this._element.firstChild);
-            this._element.addStyleClass("repeated-message");
-        }
-        this.repeatCountElement.textContent = this.repeatCount;
-    },
-
-    toString: function()
-    {
-        var sourceString;
-        switch (this.source) {
-            case WebInspector.ConsoleMessage.MessageSource.HTML:
-                sourceString = "HTML";
-                break;
-            case WebInspector.ConsoleMessage.MessageSource.WML:
-                sourceString = "WML";
-                break;
-            case WebInspector.ConsoleMessage.MessageSource.XML:
-                sourceString = "XML";
-                break;
-            case WebInspector.ConsoleMessage.MessageSource.JS:
-                sourceString = "JS";
-                break;
-            case WebInspector.ConsoleMessage.MessageSource.CSS:
-                sourceString = "CSS";
-                break;
-            case WebInspector.ConsoleMessage.MessageSource.Other:
-                sourceString = "Other";
-                break;
-        }
-
-        var typeString;
-        switch (this.type) {
-            case WebInspector.ConsoleMessage.MessageType.Log:
-                typeString = "Log";
-                break;
-            case WebInspector.ConsoleMessage.MessageType.Object:
-                typeString = "Object";
-                break;
-            case WebInspector.ConsoleMessage.MessageType.Trace:
-                typeString = "Trace";
-                break;
-            case WebInspector.ConsoleMessage.MessageType.StartGroup:
-                typeString = "Start Group";
-                break;
-            case WebInspector.ConsoleMessage.MessageType.EndGroup:
-                typeString = "End Group";
-                break;
-            case WebInspector.ConsoleMessage.MessageType.Assert:
-                typeString = "Assert";
-                break;
-            case WebInspector.ConsoleMessage.MessageType.Result:
-                typeString = "Result";
-                break;
-        }
-        
-        var levelString;
-        switch (this.level) {
-            case WebInspector.ConsoleMessage.MessageLevel.Tip:
-                levelString = "Tip";
-                break;
-            case WebInspector.ConsoleMessage.MessageLevel.Log:
-                levelString = "Log";
-                break;
-            case WebInspector.ConsoleMessage.MessageLevel.Warning:
-                levelString = "Warning";
-                break;
-            case WebInspector.ConsoleMessage.MessageLevel.Debug:
-                levelString = "Debug";
-                break;
-            case WebInspector.ConsoleMessage.MessageLevel.Error:
-                levelString = "Error";
-                break;
-        }
-
-        return sourceString + " " + typeString + " " + levelString + ": " + this.formattedMessage.textContent + "\n" + this.url + " line " + this.line;
-    },
-
-    isEqual: function(msg, disreguardGroup)
-    {
-        if (!msg)
-            return false;
-
-        var ret = (this.source == msg.source)
-            && (this.type == msg.type)
-            && (this.level == msg.level)
-            && (this.line == msg.line)
-            && (this.url == msg.url)
-            && (this.message == msg.message);
-
-        return (disreguardGroup ? ret : (ret && (this.groupLevel == msg.groupLevel)));
-    }
-}
-
-// Note: Keep these constants in sync with the ones in Console.h
-WebInspector.ConsoleMessage.MessageSource = {
-    HTML: 0,
-    WML: 1,
-    XML: 2,
-    JS: 3,
-    CSS: 4,
-    Other: 5
-}
-
-WebInspector.ConsoleMessage.MessageType = {
-    Log: 0,
-    Object: 1,
-    Trace: 2,
-    StartGroup: 3,
-    EndGroup: 4,
-    Assert: 5,
-    Result: 6
-}
-
-WebInspector.ConsoleMessage.MessageLevel = {
-    Tip: 0,
-    Log: 1,
-    Warning: 2,
-    Error: 3,
-    Debug: 4
-}
-
-WebInspector.ConsoleCommand = function(command)
-{
-    this.command = command;
-}
-
-WebInspector.ConsoleCommand.prototype = {
-    toMessageElement: function()
-    {
-        var element = document.createElement("div");
-        element.command = this;
-        element.className = "console-user-command";
-
-        var commandTextElement = document.createElement("span");
-        commandTextElement.className = "console-message-text source-code";
-        commandTextElement.textContent = this.command;
-        element.appendChild(commandTextElement);
-
-        return element;
-    }
-}
-
-WebInspector.ConsoleTextMessage = function(text, level)
-{
-    level = level || WebInspector.ConsoleMessage.MessageLevel.Log;
-    WebInspector.ConsoleMessage.call(this, WebInspector.ConsoleMessage.MessageSource.JS, WebInspector.ConsoleMessage.MessageType.Log, level, 0, null, null, 1, text);
-}
-
-WebInspector.ConsoleTextMessage.prototype.__proto__ = WebInspector.ConsoleMessage.prototype;
-
-WebInspector.ConsoleCommandResult = function(result, exception, originatingCommand)
-{
-    var level = (exception ? WebInspector.ConsoleMessage.MessageLevel.Error : WebInspector.ConsoleMessage.MessageLevel.Log);
-    var message = result;
-    if (exception) {
-        // Distinguish between strings and errors (no need to quote latter).
-        message = WebInspector.ObjectProxy.wrapPrimitiveValue(result);
-        message.type = "error";
-    }
-    var line = (exception ? result.line : -1);
-    var url = (exception ? result.sourceURL : null);
-
-    this.originatingCommand = originatingCommand;
-
-    WebInspector.ConsoleMessage.call(this, WebInspector.ConsoleMessage.MessageSource.JS, WebInspector.ConsoleMessage.MessageType.Result, level, line, url, null, 1, message);
-}
-
-WebInspector.ConsoleCommandResult.prototype = {
-    toMessageElement: function()
-    {
-        var element = WebInspector.ConsoleMessage.prototype.toMessageElement.call(this);
-        element.addStyleClass("console-user-command-result");
-        return element;
-    }
-}
-
-WebInspector.ConsoleCommandResult.prototype.__proto__ = WebInspector.ConsoleMessage.prototype;
-
-WebInspector.ConsoleGroup = function(parentGroup, level)
-{
-    this.parentGroup = parentGroup;
-    this.level = level;
-
-    var element = document.createElement("div");
-    element.className = "console-group";
-    element.group = this;
-    this.element = element;
-
-    var messagesElement = document.createElement("div");
-    messagesElement.className = "console-group-messages";
-    element.appendChild(messagesElement);
-    this.messagesElement = messagesElement;
-}
-
-WebInspector.ConsoleGroup.prototype = {
-    addMessage: function(msg)
-    {
-        var element = msg.toMessageElement();
-        
-        if (msg.type === WebInspector.ConsoleMessage.MessageType.StartGroup) {
-            this.messagesElement.parentNode.insertBefore(element, this.messagesElement);
-            element.addEventListener("click", this._titleClicked.bind(this), true);
-        } else
-            this.messagesElement.appendChild(element);
-
-        if (element.previousSibling && msg.originatingCommand && element.previousSibling.command === msg.originatingCommand)
-            element.previousSibling.addStyleClass("console-adjacent-user-command-result");
-    },
-
-    _titleClicked: function(event)
-    {
-        var groupTitleElement = event.target.enclosingNodeOrSelfWithClass("console-group-title");
-        if (groupTitleElement) {
-            var groupElement = groupTitleElement.enclosingNodeOrSelfWithClass("console-group");
-            if (groupElement)
-                if (groupElement.hasStyleClass("collapsed"))
-                    groupElement.removeStyleClass("collapsed");
-                else
-                    groupElement.addStyleClass("collapsed");
-            groupTitleElement.scrollIntoViewIfNeeded(true);
-        }
-
-        event.stopPropagation();
-        event.preventDefault();
-    }
-}
-
-/* Panel.js */
-
-/*
- * Copyright (C) 2007, 2008 Apple Inc.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  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.
- * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS 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 APPLE OR ITS 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.
- */
-
-WebInspector.Panel = function()
-{
-    WebInspector.View.call(this);
-
-    this.element.addStyleClass("panel");
-}
-
-WebInspector.Panel.prototype = {
-    get toolbarItem()
-    {
-        if (this._toolbarItem)
-            return this._toolbarItem;
-
-        // Sample toolbar item as markup:
-        // <button class="toolbar-item resources toggleable">
-        // <div class="toolbar-icon"></div>
-        // <div class="toolbar-label">Resources</div>
-        // </button>
-
-        this._toolbarItem = document.createElement("button");
-        this._toolbarItem.className = "toolbar-item toggleable";
-        this._toolbarItem.panel = this;
-
-        if ("toolbarItemClass" in this)
-            this._toolbarItem.addStyleClass(this.toolbarItemClass);
-
-        var iconElement = document.createElement("div");
-        iconElement.className = "toolbar-icon";
-        this._toolbarItem.appendChild(iconElement);
-
-        if ("toolbarItemLabel" in this) {
-            var labelElement = document.createElement("div");
-            labelElement.className = "toolbar-label";
-            labelElement.textContent = this.toolbarItemLabel;
-            this._toolbarItem.appendChild(labelElement);
-        }
-
-        return this._toolbarItem;
-    },
-
-    show: function()
-    {
-        WebInspector.View.prototype.show.call(this);
-
-        var statusBarItems = this.statusBarItems;
-        if (statusBarItems) {
-            this._statusBarItemContainer = document.createElement("div");
-            for (var i = 0; i < statusBarItems.length; ++i)
-                this._statusBarItemContainer.appendChild(statusBarItems[i]);
-            document.getElementById("main-status-bar").appendChild(this._statusBarItemContainer);
-        }
-
-        if ("_toolbarItem" in this)
-            this._toolbarItem.addStyleClass("toggled-on");
-
-        WebInspector.currentFocusElement = this.defaultFocusedElement;
-
-        this.updateSidebarWidth();
-    },
-
-    hide: function()
-    {
-        WebInspector.View.prototype.hide.call(this);
-
-        if (this._statusBarItemContainer && this._statusBarItemContainer.parentNode)
-            this._statusBarItemContainer.parentNode.removeChild(this._statusBarItemContainer);
-        delete this._statusBarItemContainer;
-        if ("_toolbarItem" in this)
-            this._toolbarItem.removeStyleClass("toggled-on");
-    },
-
-    get defaultFocusedElement()
-    {
-        return this.sidebarTreeElement || this.element;
-    },
-
-    attach: function()
-    {
-        if (!this.element.parentNode)
-            document.getElementById("main-panels").appendChild(this.element);
-    },
-
-    searchCanceled: function(startingNewSearch)
-    {
-        if (this._searchResults) {
-            for (var i = 0; i < this._searchResults.length; ++i) {
-                var view = this._searchResults[i];
-                if (view.searchCanceled)
-                    view.searchCanceled();
-                delete view.currentQuery;
-            }
-        }
-
-        WebInspector.updateSearchMatchesCount(0, this);
-
-        if (this._currentSearchChunkIntervalIdentifier) {
-            clearInterval(this._currentSearchChunkIntervalIdentifier);
-            delete this._currentSearchChunkIntervalIdentifier;
-        }
-
-        this._totalSearchMatches = 0;
-        this._currentSearchResultIndex = 0;
-        this._searchResults = [];
-    },
-
-    performSearch: function(query)
-    {
-        // Call searchCanceled since it will reset everything we need before doing a new search.
-        this.searchCanceled(true);
-
-        var searchableViews = this.searchableViews;
-        if (!searchableViews || !searchableViews.length)
-            return;
-
-        var parentElement = this.viewsContainerElement;
-        var visibleView = this.visibleView;
-        var sortFuction = this.searchResultsSortFunction;
-
-        var matchesCountUpdateTimeout = null;
-
-        function updateMatchesCount()
-        {
-            WebInspector.updateSearchMatchesCount(this._totalSearchMatches, this);
-            matchesCountUpdateTimeout = null;
-        }
-
-        function updateMatchesCountSoon()
-        {
-            if (matchesCountUpdateTimeout)
-                return;
-            // Update the matches count every half-second so it doesn't feel twitchy.
-            matchesCountUpdateTimeout = setTimeout(updateMatchesCount.bind(this), 500);
-        }
-
-        function finishedCallback(view, searchMatches)
-        {
-            if (!searchMatches)
-                return;
-
-            this._totalSearchMatches += searchMatches;
-            this._searchResults.push(view);
-
-            if (sortFuction)
-                this._searchResults.sort(sortFuction);
-
-            if (this.searchMatchFound)
-                this.searchMatchFound(view, searchMatches);
-
-            updateMatchesCountSoon.call(this);
-
-            if (view === visibleView)
-                view.jumpToFirstSearchResult();
-        }
-
-        var i = 0;
-        var panel = this;
-        var boundFinishedCallback = finishedCallback.bind(this);
-        var chunkIntervalIdentifier = null;
-
-        // Split up the work into chunks so we don't block the
-        // UI thread while processing.
-
-        function processChunk()
-        {
-            var view = searchableViews[i];
-
-            if (++i >= searchableViews.length) {
-                if (panel._currentSearchChunkIntervalIdentifier === chunkIntervalIdentifier)
-                    delete panel._currentSearchChunkIntervalIdentifier;
-                clearInterval(chunkIntervalIdentifier);
-            }
-
-            if (!view)
-                return;
-
-            if (view.element.parentNode !== parentElement && view.element.parentNode && parentElement)
-                view.detach();
-
-            view.currentQuery = query;
-            view.performSearch(query, boundFinishedCallback);
-        }
-
-        processChunk();
-
-        chunkIntervalIdentifier = setInterval(processChunk, 25);
-        this._currentSearchChunkIntervalIdentifier = chunkIntervalIdentifier;
-    },
-
-    jumpToNextSearchResult: function()
-    {
-        if (!this.showView || !this._searchResults || !this._searchResults.length)
-            return;
-
-        var showFirstResult = false;
-
-        this._currentSearchResultIndex = this._searchResults.indexOf(this.visibleView);
-        if (this._currentSearchResultIndex === -1) {
-            this._currentSearchResultIndex = 0;
-            showFirstResult = true;
-        }
-
-        var currentView = this._searchResults[this._currentSearchResultIndex];
-
-        if (currentView.showingLastSearchResult()) {
-            if (++this._currentSearchResultIndex >= this._searchResults.length)
-                this._currentSearchResultIndex = 0;
-            currentView = this._searchResults[this._currentSearchResultIndex];
-            showFirstResult = true;
-        }
-
-        if (currentView !== this.visibleView) {
-            currentView = this.visibleView;
-            this._currentSearchResultIndex = 0;
-            showFirstResult = true;
-        }
-
-        if (showFirstResult)
-            currentView.jumpToFirstSearchResult();
-        else
-            currentView.jumpToNextSearchResult();
-    },
-
-    jumpToPreviousSearchResult: function()
-    {
-        if (!this.showView || !this._searchResults || !this._searchResults.length)
-            return;
-
-        var showLastResult = false;
-
-        this._currentSearchResultIndex = this._searchResults.indexOf(this.visibleView);
-        if (this._currentSearchResultIndex === -1) {
-            this._currentSearchResultIndex = 0;
-            showLastResult = true;
-        }
-
-        var currentView = this._searchResults[this._currentSearchResultIndex];
-
-        if (currentView.showingFirstSearchResult()) {
-            if (--this._currentSearchResultIndex < 0)
-                this._currentSearchResultIndex = (this._searchResults.length - 1);
-            currentView = this._searchResults[this._currentSearchResultIndex];
-            showLastResult = true;
-        }
-
-        if (currentView !== this.visibleView)
-            this.showView(currentView);
-
-        if (showLastResult)
-            currentView.jumpToLastSearchResult();
-        else
-            currentView.jumpToPreviousSearchResult();
-    },
-
-    createSidebar: function(parentElement, resizerParentElement)
-    {
-        if (this.hasSidebar)
-            return;
-
-        if (!parentElement)
-            parentElement = this.element;
-
-        if (!resizerParentElement)
-            resizerParentElement = parentElement;
-
-        this.hasSidebar = true;
-
-        this.sidebarElement = document.createElement("div");
-        this.sidebarElement.className = "sidebar";
-        parentElement.appendChild(this.sidebarElement);
-
-        this.sidebarResizeElement = document.createElement("div");
-        this.sidebarResizeElement.className = "sidebar-resizer-vertical";
-        this.sidebarResizeElement.addEventListener("mousedown", this._startSidebarDragging.bind(this), false);
-        resizerParentElement.appendChild(this.sidebarResizeElement);
-
-        this.sidebarTreeElement = document.createElement("ol");
-        this.sidebarTreeElement.className = "sidebar-tree";
-        this.sidebarElement.appendChild(this.sidebarTreeElement);
-
-        this.sidebarTree = new TreeOutline(this.sidebarTreeElement);
-    },
-
-    _startSidebarDragging: function(event)
-    {
-        WebInspector.elementDragStart(this.sidebarResizeElement, this._sidebarDragging.bind(this), this._endSidebarDragging.bind(this), event, "col-resize");
-    },
-
-    _sidebarDragging: function(event)
-    {
-        this.updateSidebarWidth(event.pageX);
-
-        event.preventDefault();
-    },
-
-    _endSidebarDragging: function(event)
-    {
-        WebInspector.elementDragEnd(event);
-    },
-
-    updateSidebarWidth: function(width)
-    {
-        if (!this.hasSidebar)
-            return;
-
-        if (this.sidebarElement.offsetWidth <= 0) {
-            // The stylesheet hasn't loaded yet or the window is closed,
-            // so we can't calculate what is need. Return early.
-            return;
-        }
-
-        if (!("_currentSidebarWidth" in this))
-            this._currentSidebarWidth = this.sidebarElement.offsetWidth;
-
-        if (typeof width === "undefined")
-            width = this._currentSidebarWidth;
-
-        width = Number.constrain(width, Preferences.minSidebarWidth, window.innerWidth / 2);
-
-        this._currentSidebarWidth = width;
-        this.setSidebarWidth(width);
-
-        this.updateMainViewWidth(width);
-
-        var visibleView = this.visibleView;
-        if (visibleView && "resize" in visibleView)
-            visibleView.resize();
-    },
-
-    setSidebarWidth: function(width)
-    {
-        this.sidebarElement.style.width = width + "px";
-        this.sidebarResizeElement.style.left = (width - 3) + "px";
-    },
-
-    updateMainViewWidth: function(width)
-    {
-        // Should be implemented by ancestors.
-    },
-
-    canShowSourceLineForURL: function(url)
-    {
-        return false;
-    },
-
-    showSourceLineForURL: function(url, line)
-    {
-        return false;
-    }
-}
-
-WebInspector.Panel.prototype.__proto__ = WebInspector.View.prototype;
-
-/* TimelineGrid.js */
-
-/*
- * Copyright (C) 2007, 2008 Apple Inc.  All rights reserved.
- * Copyright (C) 2008, 2009 Anthony Ricaud <rik@webkit.org>
- * Copyright (C) 2009 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  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.
- * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS 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 APPLE OR ITS 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.
- */
-
-WebInspector.TimelineGrid = function()
-{
-    this.element = document.createElement("div");
-
-    this._itemsGraphsElement = document.createElement("div");
-    this._itemsGraphsElement.id = "resources-graphs";
-    this.element.appendChild(this._itemsGraphsElement);
-
-    this._dividersElement = document.createElement("div");
-    this._dividersElement.id = "resources-dividers";
-    this.element.appendChild(this._dividersElement);
-
-    this._eventDividersElement = document.createElement("div");
-    this._eventDividersElement.id = "resources-event-dividers";
-    this.element.appendChild(this._eventDividersElement);
-
-    this._dividersLabelBarElement = document.createElement("div");
-    this._dividersLabelBarElement.id = "resources-dividers-label-bar";
-    this.element.appendChild(this._dividersLabelBarElement);
-}
-
-WebInspector.TimelineGrid.prototype = {
-    get itemsGraphsElement()
-    {
-        return this._itemsGraphsElement;
-    },
-
-    updateDividers: function(force, calculator, paddingLeft)
-    {
-        var dividerCount = Math.round(this._dividersElement.offsetWidth / 64);
-        var slice = calculator.boundarySpan / dividerCount;
-        if (!force && this._currentDividerSlice === slice)
-            return false;
-
-        if (!(typeof paddingLeft === "number"))
-            paddingLeft = 0;
-        this._currentDividerSlice = slice;
-
-        this._eventDividersElement.removeChildren();
-        // Reuse divider elements and labels.
-        var divider = this._dividersElement.firstChild;
-        var dividerLabelBar = this._dividersLabelBarElement.firstChild;
-
-        var clientWidth = this._dividersLabelBarElement.clientWidth - paddingLeft;
-        for (var i = paddingLeft ? 0 : 1; i <= dividerCount; ++i) {
-            if (!divider) {
-                divider = document.createElement("div");
-                divider.className = "resources-divider";
-                this._dividersElement.appendChild(divider);
-
-                dividerLabelBar = document.createElement("div");
-                dividerLabelBar.className = "resources-divider";
-                var label = document.createElement("div");
-                label.className = "resources-divider-label";
-                dividerLabelBar._labelElement = label;
-                dividerLabelBar.appendChild(label);
-                this._dividersLabelBarElement.appendChild(dividerLabelBar);
-            }
-
-            if (i === dividerCount)
-                divider.addStyleClass("last");
-            else
-                divider.removeStyleClass("last");
-
-            var left = paddingLeft + clientWidth * (i / dividerCount);
-            var percentLeft = 100 * left / this._dividersLabelBarElement.clientWidth + "%";
-            divider.style.left = percentLeft;
-            dividerLabelBar.style.left = percentLeft;
-
-            if (!isNaN(slice))
-                dividerLabelBar._labelElement.textContent = calculator.formatValue(slice * i);
-
-            divider = divider.nextSibling;
-            dividerLabelBar = dividerLabelBar.nextSibling;
-        }
-
-        // Remove extras.
-        while (divider) {
-            var nextDivider = divider.nextSibling;
-            this._dividersElement.removeChild(divider);
-            divider = nextDivider;
-        }
-        while (dividerLabelBar) {
-            var nextDivider = dividerLabelBar.nextSibling;
-            this._dividersLabelBarElement.removeChild(dividerLabelBar);
-            dividerLabelBar = nextDivider;
-        }
-        return true;
-    },
-
-    addEventDivider: function(divider)
-    {
-        this._eventDividersElement.appendChild(divider);
-    },
-
-    setScrollAndDividerTop: function(scrollTop, dividersTop)
-    {
-        this._dividersElement.style.top = scrollTop + "px";
-        this._eventDividersElement.style.top = scrollTop + "px";
-        this._dividersLabelBarElement.style.top = dividersTop + "px";
-    }
-}
-
-/* AbstractTimelinePanel.js */
-
-/*
- * Copyright (C) 2007, 2008 Apple Inc.  All rights reserved.
- * Copyright (C) 2008, 2009 Anthony Ricaud <rik@webkit.org>
- * Copyright (C) 2009 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  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.
- * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS 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 APPLE OR ITS 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.
- */
-
-WebInspector.AbstractTimelinePanel = function()
-{
-    WebInspector.Panel.call(this);
-    this._items = [];
-    this._staleItems = [];
-}
-
-WebInspector.AbstractTimelinePanel.prototype = {
-    get categories()
-    {
-        // Should be implemented by the concrete subclasses.
-        return {};
-    },
-
-    populateSidebar: function()
-    {
-        // Should be implemented by the concrete subclasses.
-    },
-
-    createItemTreeElement: function(item)
-    {
-        // Should be implemented by the concrete subclasses.
-    },
-
-    createItemGraph: function(item)
-    {
-        // Should be implemented by the concrete subclasses.
-    },
-
-    get items()
-    {
-        return this._items;
-    },
-
-    createInterface: function()
-    {
-        this.containerElement = document.createElement("div");
-        this.containerElement.id = "resources-container";
-        this.containerElement.addEventListener("scroll", this._updateDividersLabelBarPosition.bind(this), false);
-        this.element.appendChild(this.containerElement);
-
-        this.createSidebar(this.containerElement, this.element);
-        this.sidebarElement.id = "resources-sidebar";
-        this.populateSidebar();
-
-        this._containerContentElement = document.createElement("div");
-        this._containerContentElement.id = "resources-container-content";
-        this.containerElement.appendChild(this._containerContentElement);
-
-        this.summaryBar = new WebInspector.SummaryBar(this.categories);
-        this.summaryBar.element.id = "resources-summary";
-        this._containerContentElement.appendChild(this.summaryBar.element);
-
-        this._timelineGrid = new WebInspector.TimelineGrid();
-        this._containerContentElement.appendChild(this._timelineGrid.element);
-        this.itemsGraphsElement = this._timelineGrid.itemsGraphsElement;
-    },
-
-    createFilterPanel: function()
-    {
-        this.filterBarElement = document.createElement("div");
-        this.filterBarElement.id = "resources-filter";
-        this.filterBarElement.className = "scope-bar";
-        this.element.appendChild(this.filterBarElement);
-
-        function createFilterElement(category)
-        {
-            if (category === "all")
-                var label = WebInspector.UIString("All");
-            else if (this.categories[category])
-                var label = this.categories[category].title;
-
-            var categoryElement = document.createElement("li");
-            categoryElement.category = category;
-            categoryElement.addStyleClass(category);
-            categoryElement.appendChild(document.createTextNode(label));
-            categoryElement.addEventListener("click", this._updateFilter.bind(this), false);
-            this.filterBarElement.appendChild(categoryElement);
-
-            return categoryElement;
-        }
-
-        this.filterAllElement = createFilterElement.call(this, "all");
-
-        // Add a divider
-        var dividerElement = document.createElement("div");
-        dividerElement.addStyleClass("divider");
-        this.filterBarElement.appendChild(dividerElement);
-
-        for (var category in this.categories)
-            createFilterElement.call(this, category);
-    },
-
-    showCategory: function(category)
-    {
-        var filterClass = "filter-" + category.toLowerCase();
-        this.itemsGraphsElement.addStyleClass(filterClass);
-        this.itemsTreeElement.childrenListElement.addStyleClass(filterClass);
-    },
-
-    hideCategory: function(category)
-    {
-        var filterClass = "filter-" + category.toLowerCase();
-        this.itemsGraphsElement.removeStyleClass(filterClass);
-        this.itemsTreeElement.childrenListElement.removeStyleClass(filterClass);
-    },
-
-    filter: function(target, selectMultiple)
-    {
-        function unselectAll()
-        {
-            for (var i = 0; i < this.filterBarElement.childNodes.length; ++i) {
-                var child = this.filterBarElement.childNodes[i];
-                if (!child.category)
-                    continue;
-
-                child.removeStyleClass("selected");
-                this.hideCategory(child.category);
-            }
-        }
-
-        if (target === this.filterAllElement) {
-            if (target.hasStyleClass("selected")) {
-                // We can't unselect All, so we break early here
-                return;
-            }
-
-            // If All wasn't selected, and now is, unselect everything else.
-            unselectAll.call(this);
-        } else {
-            // Something other than All is being selected, so we want to unselect All.
-            if (this.filterAllElement.hasStyleClass("selected")) {
-                this.filterAllElement.removeStyleClass("selected");
-                this.hideCategory("all");
-            }
-        }
-
-        if (!selectMultiple) {
-            // If multiple selection is off, we want to unselect everything else
-            // and just select ourselves.
-            unselectAll.call(this);
-
-            target.addStyleClass("selected");
-            this.showCategory(target.category);
-            return;
-        }
-
-        if (target.hasStyleClass("selected")) {
-            // If selectMultiple is turned on, and we were selected, we just
-            // want to unselect ourselves.
-            target.removeStyleClass("selected");
-            this.hideCategory(target.category);
-        } else {
-            // If selectMultiple is turned on, and we weren't selected, we just
-            // want to select ourselves.
-            target.addStyleClass("selected");
-            this.showCategory(target.category);
-        }
-    },
-
-    _updateFilter: function(e)
-    {
-        var isMac = WebInspector.isMac();
-        var selectMultiple = false;
-        if (isMac && e.metaKey && !e.ctrlKey && !e.altKey && !e.shiftKey)
-            selectMultiple = true;
-        if (!isMac && e.ctrlKey && !e.metaKey && !e.altKey && !e.shiftKey)
-            selectMultiple = true;
-
-        this.filter(e.target, selectMultiple);
-
-        // When we are updating our filtering, scroll to the top so we don't end up
-        // in blank graph under all the resources.
-        this.containerElement.scrollTop = 0;
-    },
-
-    updateGraphDividersIfNeeded: function(force)
-    {
-        if (!this.visible) {
-            this.needsRefresh = true;
-            return false;
-        }
-        return this._timelineGrid.updateDividers(force, this.calculator);
-    },
-
-    _updateDividersLabelBarPosition: function()
-    {
-        var scrollTop = this.containerElement.scrollTop;
-        var dividersTop = (scrollTop < this.summaryBar.element.offsetHeight ? this.summaryBar.element.offsetHeight : scrollTop);
-        this._timelineGrid.setScrollAndDividerTop(scrollTop, dividersTop);
-    },
-
-    get needsRefresh()
-    {
-        return this._needsRefresh;
-    },
-
-    set needsRefresh(x)
-    {
-        if (this._needsRefresh === x)
-            return;
-
-        this._needsRefresh = x;
-
-        if (x) {
-            if (this.visible && !("_refreshTimeout" in this))
-                this._refreshTimeout = setTimeout(this.refresh.bind(this), 500);
-        } else {
-            if ("_refreshTimeout" in this) {
-                clearTimeout(this._refreshTimeout);
-                delete this._refreshTimeout;
-            }
-        }
-    },
-
-    refreshIfNeeded: function()
-    {
-        if (this.needsRefresh)
-            this.refresh();
-    },
-
-    show: function()
-    {
-        WebInspector.Panel.prototype.show.call(this);
-
-        this._updateDividersLabelBarPosition();
-        this.refreshIfNeeded();
-    },
-
-    resize: function()
-    {
-        this.updateGraphDividersIfNeeded();
-    },
-
-    updateMainViewWidth: function(width)
-    {
-        this._containerContentElement.style.left = width + "px";
-        this.updateGraphDividersIfNeeded();
-    },
-
-    invalidateAllItems: function()
-    {
-        this._staleItems = this._items.slice();
-    },
-
-    refresh: function()
-    {
-        this.needsRefresh = false;
-
-        var staleItemsLength = this._staleItems.length;
-
-        var boundariesChanged = false;
-
-        for (var i = 0; i < staleItemsLength; ++i) {
-            var item = this._staleItems[i];
-            if (!item._itemsTreeElement) {
-                // Create the timeline tree element and graph.
-                item._itemsTreeElement = this.createItemTreeElement(item);
-                item._itemsTreeElement._itemGraph = this.createItemGraph(item);
-
-                this.itemsTreeElement.appendChild(item._itemsTreeElement);
-                this.itemsGraphsElement.appendChild(item._itemsTreeElement._itemGraph.graphElement);
-            }
-
-            if (item._itemsTreeElement.refresh)
-                item._itemsTreeElement.refresh();
-
-            if (this.calculator.updateBoundaries(item))
-                boundariesChanged = true;
-        }
-
-        if (boundariesChanged) {
-            // The boundaries changed, so all item graphs are stale.
-            this._staleItems = this._items.slice();
-            staleItemsLength = this._staleItems.length;
-        }
-
-        for (var i = 0; i < staleItemsLength; ++i)
-            this._staleItems[i]._itemsTreeElement._itemGraph.refresh(this.calculator);
-
-        this._staleItems = [];
-
-        this.updateGraphDividersIfNeeded();
-    },
-
-    reset: function()
-    {
-        this.containerElement.scrollTop = 0;
-
-        if (this._calculator)
-            this._calculator.reset();
-
-        if (this._items) {
-            var itemsLength = this._items.length;
-            for (var i = 0; i < itemsLength; ++i) {
-                var item = this._items[i];
-                delete item._itemsTreeElement;
-            }
-        }
-
-        this._items = [];
-        this._staleItems = [];
-
-        this.itemsTreeElement.removeChildren();
-        this.itemsGraphsElement.removeChildren();
-
-        this.updateGraphDividersIfNeeded(true);
-    },
-
-    get calculator()
-    {
-        return this._calculator;
-    },
-
-    set calculator(x)
-    {
-        if (!x || this._calculator === x)
-            return;
-
-        this._calculator = x;
-        this._calculator.reset();
-
-        this._staleItems = this._items.slice();
-        this.refresh();
-    },
-
-    addItem: function(item)
-    {
-        this._items.push(item);
-        this.refreshItem(item);
-    },
-
-    removeItem: function(item)
-    {
-        this._items.remove(item, true);
-
-        if (item._itemsTreeElement) {
-            this.itemsTreeElement.removeChild(item._itemsTreeElement);
-            this.itemsGraphsElement.removeChild(item._itemsTreeElement._itemGraph.graphElement);
-        }
-
-        delete item._itemsTreeElement;
-        this.adjustScrollPosition();
-    },
-
-    refreshItem: function(item)
-    {
-        this._staleItems.push(item);
-        this.needsRefresh = true;
-    },
-
-    revealAndSelectItem: function(item)
-    {
-        if (item._itemsTreeElement) {
-            item._itemsTreeElement.reveal();
-            item._itemsTreeElement.select(true);
-        }
-    },
-
-    sortItems: function(sortingFunction)
-    {
-        var sortedElements = [].concat(this.itemsTreeElement.children);
-        sortedElements.sort(sortingFunction);
-
-        var sortedElementsLength = sortedElements.length;
-        for (var i = 0; i < sortedElementsLength; ++i) {
-            var treeElement = sortedElements[i];
-            if (treeElement === this.itemsTreeElement.children[i])
-                continue;
-
-            var wasSelected = treeElement.selected;
-            this.itemsTreeElement.removeChild(treeElement);
-            this.itemsTreeElement.insertChild(treeElement, i);
-            if (wasSelected)
-                treeElement.select(true);
-
-            var graphElement = treeElement._itemGraph.graphElement;
-            this.itemsGraphsElement.insertBefore(graphElement, this.itemsGraphsElement.children[i]);
-        }
-    },
-
-    adjustScrollPosition: function()
-    {
-        // Prevent the container from being scrolled off the end.
-        if ((this.containerElement.scrollTop + this.containerElement.offsetHeight) > this.sidebarElement.offsetHeight)
-            this.containerElement.scrollTop = (this.sidebarElement.offsetHeight - this.containerElement.offsetHeight);
-    },
-
-    addEventDivider: function(divider)
-    {
-        this._timelineGrid.addEventDivider(divider);
-    }
-}
-
-WebInspector.AbstractTimelinePanel.prototype.__proto__ = WebInspector.Panel.prototype;
-
-WebInspector.AbstractTimelineCalculator = function()
-{
-}
-
-WebInspector.AbstractTimelineCalculator.prototype = {
-    computeSummaryValues: function(items)
-    {
-        var total = 0;
-        var categoryValues = {};
-
-        var itemsLength = items.length;
-        for (var i = 0; i < itemsLength; ++i) {
-            var item = items[i];
-            var value = this._value(item);
-            if (typeof value === "undefined")
-                continue;
-            if (!(item.category.name in categoryValues))
-                categoryValues[item.category.name] = 0;
-            categoryValues[item.category.name] += value;
-            total += value;
-        }
-
-        return {categoryValues: categoryValues, total: total};
-    },
-
-    computeBarGraphPercentages: function(item)
-    {
-        return {start: 0, middle: 0, end: (this._value(item) / this.boundarySpan) * 100};
-    },
-
-    computeBarGraphLabels: function(item)
-    {
-        const label = this.formatValue(this._value(item));
-        return {left: label, right: label, tooltip: label};
-    },
-
-    get boundarySpan()
-    {
-        return this.maximumBoundary - this.minimumBoundary;
-    },
-
-    updateBoundaries: function(item)
-    {
-        this.minimumBoundary = 0;
-
-        var value = this._value(item);
-        if (typeof this.maximumBoundary === "undefined" || value > this.maximumBoundary) {
-            this.maximumBoundary = value;
-            return true;
-        }
-        return false;
-    },
-
-    reset: function()
-    {
-        delete this.minimumBoundary;
-        delete this.maximumBoundary;
-    },
-
-    _value: function(item)
-    {
-        return 0;
-    },
-
-    formatValue: function(value)
-    {
-        return value.toString();
-    }
-}
-
-WebInspector.AbstractTimelineCategory = function(name, title, color)
-{
-    this.name = name;
-    this.title = title;
-    this.color = color;
-}
-
-WebInspector.AbstractTimelineCategory.prototype = {
-    toString: function()
-    {
-        return this.title;
-    }
-}
-
-/* Resource.js */
-
-/*
- * Copyright (C) 2007, 2008 Apple Inc.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer. 
- * 2.  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. 
- * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission. 
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS 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 APPLE OR ITS 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.
- */
-
-WebInspector.Resource = function(identifier, url)
-{
-    this.identifier = identifier;
-    this._url = url;
-    this._startTime = -1;
-    this._endTime = -1;
-    this._requestMethod = "";
-    this._requestFormData = "";
-    this._category = WebInspector.resourceCategories.other;
-}
-
-WebInspector.Resource.StatusText = {
-    100: "Continue",
-    101: "Switching Protocols",
-    102: "Processing (WebDav)",
-    200: "OK",
-    201: "Created",
-    202: "Accepted",
-    203: "Non-Authoritative Information",
-    204: "No Content",
-    205: "Reset Content",
-    206: "Partial Content",
-    207: "Multi-Status (WebDav)",
-    300: "Multiple Choices",
-    301: "Moved Permanently",
-    302: "Found",
-    303: "See Other",
-    304: "Not Modified",
-    305: "Use Proxy",
-    306: "Switch Proxy",
-    307: "Temporary",
-    400: "Bad Request",
-    401: "Unauthorized",
-    402: "Payment Required",
-    403: "Forbidden",
-    404: "Not Found",
-    405: "Method Not Allowed",
-    406: "Not Acceptable",
-    407: "Proxy Authentication Required",
-    408: "Request Timeout",
-    409: "Conflict",
-    410: "Gone",
-    411: "Length Required",
-    412: "Precondition Failed",
-    413: "Request Entity Too Large",
-    414: "Request-URI Too Long",
-    415: "Unsupported Media Type",
-    416: "Requested Range Not Satisfiable",
-    417: "Expectation Failed",
-    418: "I'm a teapot",
-    422: "Unprocessable Entity (WebDav)",
-    423: "Locked (WebDav)",
-    424: "Failed Dependency (WebDav)",
-    425: "Unordered Collection",
-    426: "Upgrade Required",
-    449: "Retry With",
-    500: "Internal Server Error",
-    501: "Not Implemented",
-    502: "Bad Gateway",
-    503: "Service Unavailable",
-    504: "Gateway Timeout",
-    505: "HTTP Version Not Supported",
-    506: "Variant Also Negotiates",
-    507: "Insufficient Storage (WebDav)",
-    509: "Bandwidth Limit Exceeded",
-    510: "Not Extended"
-};
-
-// Keep these in sync with WebCore::InspectorResource::Type
-WebInspector.Resource.Type = {
-    Document:   0,
-    Stylesheet: 1,
-    Image:      2,
-    Font:       3,
-    Script:     4,
-    XHR:        5,
-    Media:      6,
-    Other:      7,
-
-    isTextType: function(type)
-    {
-        return (type === this.Document) || (type === this.Stylesheet) || (type === this.Script) || (type === this.XHR);
-    },
-
-    toString: function(type)
-    {
-        switch (type) {
-            case this.Document:
-                return WebInspector.UIString("document");
-            case this.Stylesheet:
-                return WebInspector.UIString("stylesheet");
-            case this.Image:
-                return WebInspector.UIString("image");
-            case this.Font:
-                return WebInspector.UIString("font");
-            case this.Script:
-                return WebInspector.UIString("script");
-            case this.XHR:
-                return WebInspector.UIString("XHR");
-            case this.Other:
-            default:
-                return WebInspector.UIString("other");
-        }
-    }
-}
-
-WebInspector.Resource.prototype = {
-    get url()
-    {
-        return this._url;
-    },
-
-    set url(x)
-    {
-        if (this._url === x)
-            return;
-
-        var oldURL = this._url;
-        this._url = x;
-
-        // FIXME: We should make the WebInspector object listen for the "url changed" event.
-        // Then resourceURLChanged can be removed.
-        WebInspector.resourceURLChanged(this, oldURL);
-
-        this.dispatchEventToListeners("url changed");
-    },
-
-    get documentURL()
-    {
-        return this._documentURL;
-    },
-
-    set documentURL(x)
-    {
-        if (this._documentURL === x)
-            return;
-        this._documentURL = x;
-    },
-
-    get domain()
-    {
-        return this._domain;
-    },
-
-    set domain(x)
-    {
-        if (this._domain === x)
-            return;
-        this._domain = x;
-    },
-
-    get lastPathComponent()
-    {
-        return this._lastPathComponent;
-    },
-
-    set lastPathComponent(x)
-    {
-        if (this._lastPathComponent === x)
-            return;
-        this._lastPathComponent = x;
-        this._lastPathComponentLowerCase = x ? x.toLowerCase() : null;
-    },
-
-    get displayName()
-    {
-        var title = this.lastPathComponent;
-        if (!title)
-            title = this.displayDomain;
-        if (!title && this.url)
-            title = this.url.trimURL(WebInspector.mainResource ? WebInspector.mainResource.domain : "");
-        if (title === "/")
-            title = this.url;
-        return title;
-    },
-
-    get displayDomain()
-    {
-        // WebInspector.Database calls this, so don't access more than this.domain.
-        if (this.domain && (!WebInspector.mainResource || (WebInspector.mainResource && this.domain !== WebInspector.mainResource.domain)))
-            return this.domain;
-        return "";
-    },
-
-    get startTime()
-    {
-        return this._startTime || -1;
-    },
-
-    set startTime(x)
-    {
-        if (this._startTime === x)
-            return;
-
-        this._startTime = x;
-
-        if (WebInspector.panels.resources)
-            WebInspector.panels.resources.refreshResource(this);
-    },
-
-    get responseReceivedTime()
-    {
-        return this._responseReceivedTime || -1;
-    },
-
-    set responseReceivedTime(x)
-    {
-        if (this._responseReceivedTime === x)
-            return;
-
-        this._responseReceivedTime = x;
-
-        if (WebInspector.panels.resources)
-            WebInspector.panels.resources.refreshResource(this);
-    },
-
-    get endTime()
-    {
-        return this._endTime || -1;
-    },
-
-    set endTime(x)
-    {
-        if (this._endTime === x)
-            return;
-
-        this._endTime = x;
-
-        if (WebInspector.panels.resources)
-            WebInspector.panels.resources.refreshResource(this);
-    },
-
-    get duration()
-    {
-        if (this._endTime === -1 || this._startTime === -1)
-            return -1;
-        return this._endTime - this._startTime;
-    },
-
-    get latency()
-    {
-        if (this._responseReceivedTime === -1 || this._startTime === -1)
-            return -1;
-        return this._responseReceivedTime - this._startTime;
-    },
-
-    get contentLength()
-    {
-        return this._contentLength || 0;
-    },
-
-    set contentLength(x)
-    {
-        if (this._contentLength === x)
-            return;
-
-        this._contentLength = x;
-
-        if (WebInspector.panels.resources)
-            WebInspector.panels.resources.refreshResource(this);
-    },
-
-    get expectedContentLength()
-    {
-        return this._expectedContentLength || 0;
-    },
-
-    set expectedContentLength(x)
-    {
-        if (this._expectedContentLength === x)
-            return;
-        this._expectedContentLength = x;
-    },
-
-    get finished()
-    {
-        return this._finished;
-    },
-
-    set finished(x)
-    {
-        if (this._finished === x)
-            return;
-
-        this._finished = x;
-
-        if (x) {
-            this._checkWarnings();
-            this.dispatchEventToListeners("finished");
-        }
-    },
-
-    get failed()
-    {
-        return this._failed;
-    },
-
-    set failed(x)
-    {
-        this._failed = x;
-    },
-
-    get category()
-    {
-        return this._category;
-    },
-
-    set category(x)
-    {
-        if (this._category === x)
-            return;
-
-        var oldCategory = this._category;
-        if (oldCategory)
-            oldCategory.removeResource(this);
-
-        this._category = x;
-
-        if (this._category)
-            this._category.addResource(this);
-
-        if (WebInspector.panels.resources) {
-            WebInspector.panels.resources.refreshResource(this);
-            WebInspector.panels.resources.recreateViewForResourceIfNeeded(this);
-        }
-    },
-
-    get mimeType()
-    {
-        return this._mimeType;
-    },
-
-    set mimeType(x)
-    {
-        if (this._mimeType === x)
-            return;
-
-        this._mimeType = x;
-    },
-
-    get type()
-    {
-        return this._type;
-    },
-
-    set type(x)
-    {
-        if (this._type === x)
-            return;
-
-        this._type = x;
-
-        switch (x) {
-            case WebInspector.Resource.Type.Document:
-                this.category = WebInspector.resourceCategories.documents;
-                break;
-            case WebInspector.Resource.Type.Stylesheet:
-                this.category = WebInspector.resourceCategories.stylesheets;
-                break;
-            case WebInspector.Resource.Type.Script:
-                this.category = WebInspector.resourceCategories.scripts;
-                break;
-            case WebInspector.Resource.Type.Image:
-                this.category = WebInspector.resourceCategories.images;
-                break;
-            case WebInspector.Resource.Type.Font:
-                this.category = WebInspector.resourceCategories.fonts;
-                break;
-            case WebInspector.Resource.Type.XHR:
-                this.category = WebInspector.resourceCategories.xhr;
-                break;
-            case WebInspector.Resource.Type.Other:
-            default:
-                this.category = WebInspector.resourceCategories.other;
-                break;
-        }
-    },
-
-    get requestHeaders()
-    {
-        if (this._requestHeaders === undefined)
-            this._requestHeaders = {};
-        return this._requestHeaders;
-    },
-
-    set requestHeaders(x)
-    {
-        if (this._requestHeaders === x)
-            return;
-
-        this._requestHeaders = x;
-        delete this._sortedRequestHeaders;
-
-        this.dispatchEventToListeners("requestHeaders changed");
-    },
-
-    get sortedRequestHeaders()
-    {
-        if (this._sortedRequestHeaders !== undefined)
-            return this._sortedRequestHeaders;
-
-        this._sortedRequestHeaders = [];
-        for (var key in this.requestHeaders)
-            this._sortedRequestHeaders.push({header: key, value: this.requestHeaders[key]});
-        this._sortedRequestHeaders.sort(function(a,b) { return a.header.localeCompare(b.header) });
-
-        return this._sortedRequestHeaders;
-    },
-
-    get responseHeaders()
-    {
-        if (this._responseHeaders === undefined)
-            this._responseHeaders = {};
-        return this._responseHeaders;
-    },
-
-    set responseHeaders(x)
-    {
-        if (this._responseHeaders === x)
-            return;
-
-        this._responseHeaders = x;
-        delete this._sortedResponseHeaders;
-
-        this.dispatchEventToListeners("responseHeaders changed");
-    },
-
-    get sortedResponseHeaders()
-    {
-        if (this._sortedResponseHeaders !== undefined)
-            return this._sortedResponseHeaders;
-
-        this._sortedResponseHeaders = [];
-        for (var key in this.responseHeaders)
-            this._sortedResponseHeaders.push({header: key, value: this.responseHeaders[key]});
-        this._sortedResponseHeaders.sort(function(a,b) { return a.header.localeCompare(b.header) });
-
-        return this._sortedResponseHeaders;
-    },
-
-    get scripts()
-    {
-        if (!("_scripts" in this))
-            this._scripts = [];
-        return this._scripts;
-    },
-
-    addScript: function(script)
-    {
-        if (!script)
-            return;
-        this.scripts.unshift(script);
-        script.resource = this;
-    },
-
-    removeAllScripts: function()
-    {
-        if (!this._scripts)
-            return;
-
-        for (var i = 0; i < this._scripts.length; ++i) {
-            if (this._scripts[i].resource === this)
-                delete this._scripts[i].resource;
-        }
-
-        delete this._scripts;
-    },
-
-    removeScript: function(script)
-    {
-        if (!script)
-            return;
-
-        if (script.resource === this)
-            delete script.resource;
-
-        if (!this._scripts)
-            return;
-
-        this._scripts.remove(script);
-    },
-
-    get errors()
-    {
-        return this._errors || 0;
-    },
-
-    set errors(x)
-    {
-        this._errors = x;
-    },
-
-    get warnings()
-    {
-        return this._warnings || 0;
-    },
-
-    set warnings(x)
-    {
-        this._warnings = x;
-    },
-
-    _mimeTypeIsConsistentWithType: function()
-    {
-        if (typeof this.type === "undefined"
-         || this.type === WebInspector.Resource.Type.Other
-         || this.type === WebInspector.Resource.Type.XHR)
-            return true;
-
-        if (this.mimeType in WebInspector.MIMETypes)
-            return this.type in WebInspector.MIMETypes[this.mimeType];
-
-        return false;
-    },
-
-    _checkWarnings: function()
-    {
-        for (var warning in WebInspector.Warnings)
-            this._checkWarning(WebInspector.Warnings[warning]);
-    },
-
-    _checkWarning: function(warning)
-    {
-        var msg;
-        switch (warning.id) {
-            case WebInspector.Warnings.IncorrectMIMEType.id:
-                if (!this._mimeTypeIsConsistentWithType())
-                    msg = new WebInspector.ConsoleMessage(WebInspector.ConsoleMessage.MessageSource.Other,
-                        WebInspector.ConsoleMessage.MessageType.Log, 
-                        WebInspector.ConsoleMessage.MessageLevel.Warning, -1, this.url, null, 1,
-                        String.sprintf(WebInspector.Warnings.IncorrectMIMEType.message,
-                        WebInspector.Resource.Type.toString(this.type), this.mimeType));
-                break;
-        }
-
-        if (msg)
-            WebInspector.console.addMessage(msg);
-    }
-}
-
-WebInspector.Resource.prototype.__proto__ = WebInspector.Object.prototype;
-
-WebInspector.Resource.CompareByStartTime = function(a, b)
-{
-    if (a.startTime < b.startTime)
-        return -1;
-    if (a.startTime > b.startTime)
-        return 1;
-    return 0;
-}
-
-WebInspector.Resource.CompareByResponseReceivedTime = function(a, b)
-{
-    if (a.responseReceivedTime === -1 && b.responseReceivedTime !== -1)
-        return 1;
-    if (a.responseReceivedTime !== -1 && b.responseReceivedTime === -1)
-        return -1;
-    if (a.responseReceivedTime < b.responseReceivedTime)
-        return -1;
-    if (a.responseReceivedTime > b.responseReceivedTime)
-        return 1;
-    return 0;
-}
-
-WebInspector.Resource.CompareByEndTime = function(a, b)
-{
-    if (a.endTime === -1 && b.endTime !== -1)
-        return 1;
-    if (a.endTime !== -1 && b.endTime === -1)
-        return -1;
-    if (a.endTime < b.endTime)
-        return -1;
-    if (a.endTime > b.endTime)
-        return 1;
-    return 0;
-}
-
-WebInspector.Resource.CompareByDuration = function(a, b)
-{
-    if (a.duration < b.duration)
-        return -1;
-    if (a.duration > b.duration)
-        return 1;
-    return 0;
-}
-
-WebInspector.Resource.CompareByLatency = function(a, b)
-{
-    if (a.latency < b.latency)
-        return -1;
-    if (a.latency > b.latency)
-        return 1;
-    return 0;
-}
-
-WebInspector.Resource.CompareBySize = function(a, b)
-{
-    if (a.contentLength < b.contentLength)
-        return -1;
-    if (a.contentLength > b.contentLength)
-        return 1;
-    return 0;
-}
-
-WebInspector.Resource.StatusTextForCode = function(code)
-{
-    return code ? code + " " + WebInspector.Resource.StatusText[code] : "";
-}
-
-/* ResourceCategory.js */
-
-/*
- * Copyright (C) 2007, 2008 Apple Inc.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer. 
- * 2.  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. 
- * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission. 
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS 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 APPLE OR ITS 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.
- */
-
-WebInspector.ResourceCategory = function(name, title, color)
-{
-    WebInspector.AbstractTimelineCategory.call(this, name, title, color);
-    this.resources = [];
-}
-
-WebInspector.ResourceCategory.prototype = {
-
-    addResource: function(resource)
-    {
-        var a = resource;
-        var resourcesLength = this.resources.length;
-        for (var i = 0; i < resourcesLength; ++i) {
-            var b = this.resources[i];
-            if (a._lastPathComponentLowerCase && b._lastPathComponentLowerCase)
-                if (a._lastPathComponentLowerCase < b._lastPathComponentLowerCase)
-                    break;
-            else if (a.name && b.name)
-                if (a.name < b.name)
-                    break;
-        }
-
-        this.resources.splice(i, 0, resource);
-    },
-
-    removeResource: function(resource)
-    {
-        this.resources.remove(resource, true);
-    },
-
-    removeAllResources: function(resource)
-    {
-        this.resources = [];
-    }
-}
-
-WebInspector.ResourceCategory.prototype.__proto__ = WebInspector.AbstractTimelineCategory.prototype;
-
-/* Database.js */
-
-/*
- * Copyright (C) 2007, 2008 Apple Inc.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  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.
- * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS 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 APPLE OR ITS 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.
- */
-
-WebInspector.Database = function(id, domain, name, version)
-{
-    this._id = id;
-    this._domain = domain;
-    this._name = name;
-    this._version = version;
-}
-
-WebInspector.Database.prototype = {
-    get id()
-    {
-        return this._id;
-    },
-
-    get name()
-    {
-        return this._name;
-    },
-
-    set name(x)
-    {
-        this._name = x;
-    },
-
-    get version()
-    {
-        return this._version;
-    },
-
-    set version(x)
-    {
-        this._version = x;
-    },
-
-    get domain()
-    {
-        return this._domain;
-    },
-
-    set domain(x)
-    {
-        this._domain = x;
-    },
-
-    get displayDomain()
-    {
-        return WebInspector.Resource.prototype.__lookupGetter__("displayDomain").call(this);
-    },
-
-    getTableNames: function(callback)
-    {
-        function sortingCallback(names)
-        {
-            callback(names.sort());
-        }
-        var callId = WebInspector.Callback.wrap(sortingCallback);
-        InspectorBackend.getDatabaseTableNames(callId, this._id);
-    },
-    
-    executeSql: function(query, onSuccess, onError)
-    {
-        function callback(result)
-        {
-            if (!(result instanceof Array)) {
-                onError(result);
-                return;
-            }
-            onSuccess(result);
-        }
-        InjectedScriptAccess.executeSql(this._id, query, callback);
-    }
-}
-
-WebInspector.didGetDatabaseTableNames = WebInspector.Callback.processCallback;
-
-/* DOMStorage.js */
-
-/*
- * Copyright (C) 2008 Nokia Inc.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  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.
- * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "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 APPLE OR ITS 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.
- */
-
-WebInspector.DOMStorage = function(id, domain, isLocalStorage)
-{
-    this._id = id;
-    this._domain = domain;
-    this._isLocalStorage = isLocalStorage;
-}
-
-WebInspector.DOMStorage.prototype = {
-    get id()
-    {
-        return this._id;
-    },
-
-    get domStorage()
-    {
-        return this._domStorage;
-    },
-
-    get domain()
-    {
-        return this._domain;
-    },
-
-    get isLocalStorage()
-    {
-        return this._isLocalStorage;
-    },
-
-    getEntries: function(callback)
-    {
-        var callId = WebInspector.Callback.wrap(callback);
-        InspectorBackend.getDOMStorageEntries(callId, this._id);
-    },
-    
-    setItem: function(key, value, callback)
-    {
-        var callId = WebInspector.Callback.wrap(callback);
-        InspectorBackend.setDOMStorageItem(callId, this._id, key, value);
-    },
-    
-    removeItem: function(key, callback)
-    {
-        var callId = WebInspector.Callback.wrap(callback);
-        InspectorBackend.removeDOMStorageItem(callId, this._id, key);
-    }
-}
-
-WebInspector.didGetDOMStorageEntries = WebInspector.Callback.processCallback;
-WebInspector.didSetDOMStorageItem = WebInspector.Callback.processCallback;
-WebInspector.didRemoveDOMStorageItem = WebInspector.Callback.processCallback;
-
-/* DOMStorageItemsView.js */
-
-/*
- * Copyright (C) 2008 Nokia Inc.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. 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.
- *
- * THIS SOFTWARE IS PROVIDED ``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 APPLE INC. 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.
- */
-
-WebInspector.DOMStorageItemsView = function(domStorage)
-{
-    WebInspector.View.call(this);
-
-    this.domStorage = domStorage;
-
-    this.element.addStyleClass("storage-view");
-    this.element.addStyleClass("table");
-
-    this.deleteButton = new WebInspector.StatusBarButton(WebInspector.UIString("Delete"), "delete-storage-status-bar-item");
-    this.deleteButton.visible = false;
-    this.deleteButton.addEventListener("click", this._deleteButtonClicked.bind(this), false);
-
-    this.refreshButton = new WebInspector.StatusBarButton(WebInspector.UIString("Refresh"), "refresh-storage-status-bar-item");
-    this.refreshButton.addEventListener("click", this._refreshButtonClicked.bind(this), false);
-}
-
-WebInspector.DOMStorageItemsView.prototype = {
-    get statusBarItems()
-    {
-        return [this.refreshButton.element, this.deleteButton.element];
-    },
-
-    show: function(parentElement)
-    {
-        WebInspector.View.prototype.show.call(this, parentElement);
-        this.update();
-    },
-
-    hide: function()
-    {
-        WebInspector.View.prototype.hide.call(this);
-        this.deleteButton.visible = false;
-    },
-
-    update: function()
-    {
-        this.element.removeChildren();
-        var callback = this._showDOMStorageEntries.bind(this);
-        this.domStorage.getEntries(callback);
-    },
-
-    _showDOMStorageEntries: function(entries)
-    {
-        this._dataGrid = this._dataGridForDOMStorageEntries(entries);
-        this.element.appendChild(this._dataGrid.element);
-        this._dataGrid.updateWidths();
-        this.deleteButton.visible = true;
-    },
-
-    resize: function()
-    {
-        if (this._dataGrid)
-            this._dataGrid.updateWidths();
-    },
-
-    _dataGridForDOMStorageEntries: function(entries)
-    {
-        var columns = {};
-        columns[0] = {};
-        columns[1] = {};
-        columns[0].title = WebInspector.UIString("Key");
-        columns[0].width = columns[0].title.length;
-        columns[1].title = WebInspector.UIString("Value");
-        columns[1].width = columns[1].title.length;
-
-        var nodes = [];
-
-        var keys = [];
-        var length = entries.length;
-        for (var i = 0; i < entries.length; i++) {
-            var data = {};
-
-            var key = entries[i][0];
-            data[0] = key;
-            if (key.length > columns[0].width)
-                columns[0].width = key.length;
-
-            var value = entries[i][1];
-            data[1] = value;
-            if (value.length > columns[1].width)
-                columns[1].width = value.length;
-            var node = new WebInspector.DataGridNode(data, false);
-            node.selectable = true;
-            nodes.push(node);
-            keys.push(key);
-        }
-
-        var totalColumnWidths = columns[0].width + columns[1].width;
-        var width = Math.round((columns[0].width * 100) / totalColumnWidths);
-        const minimumPrecent = 10;
-        if (width < minimumPrecent)
-            width = minimumPrecent;
-        if (width > 100 - minimumPrecent)
-            width = 100 - minimumPrecent;
-        columns[0].width = width;
-        columns[1].width = 100 - width;
-        columns[0].width += "%";
-        columns[1].width += "%";
-
-        var dataGrid = new WebInspector.DataGrid(columns, this._editingCallback.bind(this), this._deleteCallback.bind(this));
-        var length = nodes.length;
-        for (var i = 0; i < length; ++i)
-            dataGrid.appendChild(nodes[i]);
-        dataGrid.addCreationNode(false);
-        if (length > 0)
-            nodes[0].selected = true;
-        return dataGrid;
-    },
-
-    _deleteButtonClicked: function(event)
-    {
-        if (!this._dataGrid || !this._dataGrid.selectedNode)
-            return;
-
-        this._deleteCallback(this._dataGrid.selectedNode);
-    },
-
-    _refreshButtonClicked: function(event)
-    {
-        this.update();
-    },
-    
-    _editingCallback: function(editingNode, columnIdentifier, oldText, newText)
-    {
-        var domStorage = this.domStorage;
-        if (columnIdentifier === 0) {
-            if (oldText)
-                domStorage.removeItem(oldText);
-
-            domStorage.setItem(newText, editingNode.data[1]);
-        } else {
-            domStorage.setItem(editingNode.data[0], newText);
-        }
-        
-        this.update();
-    },
-    
-    _deleteCallback: function(node)
-    {
-        if (!node || node.isCreationNode)
-            return;
-
-        if (this.domStorage)
-            this.domStorage.removeItem(node.data[0]);
-            
-        this.update();
-    }
-}
-
-WebInspector.DOMStorageItemsView.prototype.__proto__ = WebInspector.View.prototype;
-
-/* DataGrid.js */
-
-/*
- * Copyright (C) 2008 Apple Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *        notice, this list of conditions and the following disclaimer.
- * 2. 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.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``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 APPLE INC. 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.
- */
-
-WebInspector.DataGrid = function(columns, editCallback, deleteCallback)
-{
-    this.element = document.createElement("div");
-    this.element.className = "data-grid";
-    this.element.tabIndex = 0;
-    this.element.addEventListener("keydown", this._keyDown.bind(this), false);
-
-    this._headerTable = document.createElement("table");
-    this._headerTable.className = "header";
-
-    this._dataTable = document.createElement("table");
-    this._dataTable.className = "data";
-
-    this._dataTable.addEventListener("mousedown", this._mouseDownInDataTable.bind(this), true);
-    this._dataTable.addEventListener("click", this._clickInDataTable.bind(this), true);
-    
-    this._dataTable.addEventListener("contextmenu", this._contextMenuInDataTable.bind(this), true);
-    
-    // FIXME: Add a createCallback which is different from editCallback and has different
-    // behavior when creating a new node.
-    if (editCallback) {
-        this._dataTable.addEventListener("dblclick", this._ondblclick.bind(this), false);
-        this._editCallback = editCallback;
-    }
-    if (deleteCallback)
-        this._deleteCallback = deleteCallback;
-    
-    this.aligned = {};
-
-    var scrollContainer = document.createElement("div");
-    scrollContainer.className = "data-container";
-    scrollContainer.appendChild(this._dataTable);
-
-    this.element.appendChild(this._headerTable);
-    this.element.appendChild(scrollContainer);
-
-    var headerRow = document.createElement("tr");
-    var columnGroup = document.createElement("colgroup");
-    var columnCount = 0;
-
-    for (var columnIdentifier in columns) {
-        var column = columns[columnIdentifier];
-        if (column.disclosure)
-            this.disclosureColumnIdentifier = columnIdentifier;
-
-        var col = document.createElement("col");
-        if (column.width)
-            col.style.width = column.width;
-        columnGroup.appendChild(col);
-
-        var cell = document.createElement("th");
-        cell.className = columnIdentifier + "-column";
-        cell.columnIdentifier = columnIdentifier;
-
-        var div = document.createElement("div");
-        div.textContent = column.title;
-        cell.appendChild(div);
-
-        if (column.sort) {
-            cell.addStyleClass("sort-" + column.sort);
-            this._sortColumnCell = cell;
-        }
-
-        if (column.sortable) {
-            cell.addEventListener("click", this._clickInHeaderCell.bind(this), false);
-            cell.addStyleClass("sortable");
-        }
-
-        if (column.aligned) {
-            cell.addStyleClass(column.aligned);
-            this.aligned[columnIdentifier] = column.aligned;
-        }
-
-        headerRow.appendChild(cell);
-
-        ++columnCount;
-    }
-
-    columnGroup.span = columnCount;
-
-    var cell = document.createElement("th");
-    cell.className = "corner";
-    headerRow.appendChild(cell);
-
-    this._headerTableColumnGroup = columnGroup;
-    this._headerTable.appendChild(this._headerTableColumnGroup);
-    this.headerTableBody.appendChild(headerRow);
-
-    var fillerRow = document.createElement("tr");
-    fillerRow.className = "filler";
-
-    for (var i = 0; i < columnCount; ++i) {
-        var cell = document.createElement("td");
-        fillerRow.appendChild(cell);
-    }
-    
-    this._dataTableColumnGroup = columnGroup.cloneNode(true);
-    this._dataTable.appendChild(this._dataTableColumnGroup);
-    this.dataTableBody.appendChild(fillerRow);
-
-    this.columns = columns || {};
-    this.children = [];
-    this.selectedNode = null;
-    this.expandNodesWhenArrowing = false;
-    this.root = true;
-    this.hasChildren = false;
-    this.expanded = true;
-    this.revealed = true;
-    this.selected = false;
-    this.dataGrid = this;
-    this.indentWidth = 15;
-    this.resizers = [];
-    this.columnWidthsInitialized = false;
-}
-
-WebInspector.DataGrid.prototype = {
-    _ondblclick: function(event)
-    {
-        if (this._editing || this._editingNode)
-            return;
-
-        this._startEditing(event.target);
-    },
-
-    _startEditingColumnOfDataGridNode: function(node, column)
-    {
-        this._editing = true;
-        this._editingNode = node;
-        this._editingNode.select();
-
-        var element = this._editingNode._element.children[column];
-        WebInspector.startEditing(element, this._editingCommitted.bind(this), this._editingCancelled.bind(this), element.textContent);
-        window.getSelection().setBaseAndExtent(element, 0, element, 1);
-    },
-
-    _startEditing: function(target)
-    {
-        var element = target.enclosingNodeOrSelfWithNodeName("td");
-        if (!element)
-            return;
-
-        this._editingNode = this.dataGridNodeFromNode(target);
-        if (!this._editingNode) {
-            if (!this.creationNode)
-                return;
-            this._editingNode = this.creationNode;
-        }
-
-        // Force editing the 1st column when editing the creation node
-        if (this._editingNode.isCreationNode)
-            return this._startEditingColumnOfDataGridNode(this._editingNode, 0);
-
-        this._editing = true;
-        WebInspector.startEditing(element, this._editingCommitted.bind(this), this._editingCancelled.bind(this), element.textContent);
-        window.getSelection().setBaseAndExtent(element, 0, element, 1);
-    },
-
-    _editingCommitted: function(element, newText, oldText, context, moveDirection)
-    {
-        // FIXME: We need more column identifiers here throughout this function.
-        // Not needed yet since only editable DataGrid is DOM Storage, which is Key - Value.
-        
-        // FIXME: Better way to do this than regular expressions?
-        var columnIdentifier = parseInt(element.className.match(/\b(\d+)-column\b/)[1]);
-
-        var textBeforeEditing = this._editingNode.data[columnIdentifier];
-        var currentEditingNode = this._editingNode;
-
-        function moveToNextIfNeeded(wasChange) {
-            if (!moveDirection)
-                return;
-
-            if (moveDirection === "forward") {
-                if (currentEditingNode.isCreationNode && columnIdentifier === 0 && !wasChange)
-                    return;
-
-                if (columnIdentifier === 0)
-                    return this._startEditingColumnOfDataGridNode(currentEditingNode, 1);
-
-                var nextDataGridNode = currentEditingNode.traverseNextNode(true, null, true);
-                if (nextDataGridNode)
-                    return this._startEditingColumnOfDataGridNode(nextDataGridNode, 0);
-                if (currentEditingNode.isCreationNode && wasChange) {
-                    addCreationNode(false);
-                    return this._startEditingColumnOfDataGridNode(this.creationNode, 0);
-                }
-                return;
-            }
-
-            if (moveDirection === "backward") {
-                if (columnIdentifier === 1)
-                    return this._startEditingColumnOfDataGridNode(currentEditingNode, 0);
-                    var nextDataGridNode = currentEditingNode.traversePreviousNode(true, null, true);
-
-                if (nextDataGridNode)
-                    return this._startEditingColumnOfDataGridNode(nextDataGridNode, 1);
-                return;
-            }
-        }
-
-        if (textBeforeEditing == newText) {
-            this._editingCancelled(element);
-            moveToNextIfNeeded.call(this, false);
-            return;
-        }
-
-        // Update the text in the datagrid that we typed
-        this._editingNode.data[columnIdentifier] = newText;
-        
-        // Make the callback - expects an editing node (table row), the column number that is being edited,
-        // the text that used to be there, and the new text.
-        this._editCallback(this._editingNode, columnIdentifier, textBeforeEditing, newText);
-
-        if (this._editingNode.isCreationNode)
-            this.addCreationNode(false);
-
-        this._editingCancelled(element);
-        moveToNextIfNeeded.call(this, true);
-    },
-
-    _editingCancelled: function(element, context)
-    {
-        delete this._editing;
-        this._editingNode = null;
-    },
-    
-    get sortColumnIdentifier()
-    {
-        if (!this._sortColumnCell)
-            return null;
-        return this._sortColumnCell.columnIdentifier;
-    },
-
-    get sortOrder()
-    {
-        if (!this._sortColumnCell || this._sortColumnCell.hasStyleClass("sort-ascending"))
-            return "ascending";
-        if (this._sortColumnCell.hasStyleClass("sort-descending"))
-            return "descending";
-        return null;
-    },
-
-    get headerTableBody()
-    {
-        if ("_headerTableBody" in this)
-            return this._headerTableBody;
-
-        this._headerTableBody = this._headerTable.getElementsByTagName("tbody")[0];
-        if (!this._headerTableBody) {
-            this._headerTableBody = this.element.ownerDocument.createElement("tbody");
-            this._headerTable.insertBefore(this._headerTableBody, this._headerTable.tFoot);
-        }
-
-        return this._headerTableBody;
-    },
-
-    get dataTableBody()
-    {
-        if ("_dataTableBody" in this)
-            return this._dataTableBody;
-
-        this._dataTableBody = this._dataTable.getElementsByTagName("tbody")[0];
-        if (!this._dataTableBody) {
-            this._dataTableBody = this.element.ownerDocument.createElement("tbody");
-            this._dataTable.insertBefore(this._dataTableBody, this._dataTable.tFoot);
-        }
-
-        return this._dataTableBody;
-    },
- 
-    // Updates the widths of the table, including the positions of the column
-    // resizers.
-    //
-    // IMPORTANT: This function MUST be called once after the element of the
-    // DataGrid is attached to its parent element and every subsequent time the
-    // width of the parent element is changed in order to make it possible to
-    // resize the columns.
-    //
-    // If this function is not called after the DataGrid is attached to its
-    // parent element, then the DataGrid's columns will not be resizable.
-    updateWidths: function()
-    {
-        var headerTableColumns = this._headerTableColumnGroup.children;
-        
-        var left = 0;
-        var tableWidth = this._dataTable.offsetWidth;
-        var numColumns = headerTableColumns.length;
-        
-        if (!this.columnWidthsInitialized) {
-            // Give all the columns initial widths now so that during a resize,
-            // when the two columns that get resized get a percent value for
-            // their widths, all the other columns already have percent values
-            // for their widths.
-            for (var i = 0; i < numColumns; i++) {
-                var columnWidth = this.headerTableBody.rows[0].cells[i].offsetWidth;
-                var percentWidth = ((columnWidth / tableWidth) * 100) + "%";
-                this._headerTableColumnGroup.children[i].style.width = percentWidth;
-                this._dataTableColumnGroup.children[i].style.width = percentWidth;
-            }
-            this.columnWidthsInitialized = true;
-        }
-        
-        // Make n - 1 resizers for n columns. 
-        for (var i = 0; i < numColumns - 1; i++) {
-            var resizer = this.resizers[i];
-
-            if (!resizer) {
-                // This is the first call to updateWidth, so the resizers need
-                // to be created.
-                resizer = document.createElement("div");
-                resizer.addStyleClass("data-grid-resizer");
-                // This resizer is associated with the column to its right.
-                resizer.rightNeighboringColumnID = i + 1;
-                resizer.addEventListener("mousedown", this._startResizerDragging.bind(this), false);
-                this.element.appendChild(resizer);
-                this.resizers[i] = resizer;
-            }
-
-            // Get the width of the cell in the first (and only) row of the
-            // header table in order to determine the width of the column, since
-            // it is not possible to query a column for its width.
-            left += this.headerTableBody.rows[0].cells[i].offsetWidth;
-            
-            resizer.style.left = left + "px";
-        }
-    },
-
-    addCreationNode: function(hasChildren)
-    {
-        if (this.creationNode)
-            this.creationNode.makeNormal();
-
-        var emptyData = {};
-        for (var column in this.columns)
-            emptyData[column] = '';
-        this.creationNode = new WebInspector.CreationDataGridNode(emptyData, hasChildren);
-        this.appendChild(this.creationNode);
-    },
-
-    appendChild: function(child)
-    {
-        this.insertChild(child, this.children.length);
-    },
-
-    insertChild: function(child, index)
-    {
-        if (!child)
-            throw("insertChild: Node can't be undefined or null.");
-        if (child.parent === this)
-            throw("insertChild: Node is already a child of this node.");
-
-        if (child.parent)
-            child.parent.removeChild(child);
-
-        this.children.splice(index, 0, child);
-        this.hasChildren = true;
-
-        child.parent = this;
-        child.dataGrid = this.dataGrid;
-        child._recalculateSiblings(index);
-
-        delete child._depth;
-        delete child._revealed;
-        delete child._attached;
-        child._shouldRefreshChildren = true;
-
-        var current = child.children[0];
-        while (current) {
-            current.dataGrid = this.dataGrid;
-            delete current._depth;
-            delete current._revealed;
-            delete current._attached;
-            current._shouldRefreshChildren = true;
-            current = current.traverseNextNode(false, child, true);
-        }
-
-        if (this.expanded)
-            child._attach();
-    },
-
-    removeChild: function(child)
-    {
-        if (!child)
-            throw("removeChild: Node can't be undefined or null.");
-        if (child.parent !== this)
-            throw("removeChild: Node is not a child of this node.");
-
-        child.deselect();
-
-        this.children.remove(child, true);
-
-        if (child.previousSibling)
-            child.previousSibling.nextSibling = child.nextSibling;
-        if (child.nextSibling)
-            child.nextSibling.previousSibling = child.previousSibling;
-
-        child.dataGrid = null;
-        child.parent = null;
-        child.nextSibling = null;
-        child.previousSibling = null;
-
-        if (this.children.length <= 0)
-            this.hasChildren = false;
-    },
-
-    removeChildren: function()
-    {
-        for (var i = 0; i < this.children.length; ++i) {
-            var child = this.children[i];
-            child.deselect();
-            child._detach();
-
-            child.dataGrid = null;
-            child.parent = null;
-            child.nextSibling = null;
-            child.previousSibling = null;
-        }
-
-        this.children = [];
-        this.hasChildren = false;
-    },
-
-    removeChildrenRecursive: function()
-    {
-        var childrenToRemove = this.children;
-
-        var child = this.children[0];
-        while (child) {
-            if (child.children.length)
-                childrenToRemove = childrenToRemove.concat(child.children);
-            child = child.traverseNextNode(false, this, true);
-        }
-
-        for (var i = 0; i < childrenToRemove.length; ++i) {
-            var child = childrenToRemove[i];
-            child.deselect();
-            child._detach();
-
-            child.children = [];
-            child.dataGrid = null;
-            child.parent = null;
-            child.nextSibling = null;
-            child.previousSibling = null;
-        }
-
-        this.children = [];
-    },
-
-
-    _keyDown: function(event)
-    {
-        if (!this.selectedNode || event.shiftKey || event.metaKey || event.ctrlKey || this._editing)
-            return;
-
-        var handled = false;
-        var nextSelectedNode;
-        if (event.keyIdentifier === "Up" && !event.altKey) {
-            nextSelectedNode = this.selectedNode.traversePreviousNode(true);
-            while (nextSelectedNode && !nextSelectedNode.selectable)
-                nextSelectedNode = nextSelectedNode.traversePreviousNode(!this.expandTreeNodesWhenArrowing);
-            handled = nextSelectedNode ? true : false;
-        } else if (event.keyIdentifier === "Down" && !event.altKey) {
-            nextSelectedNode = this.selectedNode.traverseNextNode(true);
-            while (nextSelectedNode && !nextSelectedNode.selectable)
-                nextSelectedNode = nextSelectedNode.traverseNextNode(!this.expandTreeNodesWhenArrowing);
-            handled = nextSelectedNode ? true : false;
-        } else if (event.keyIdentifier === "Left") {
-            if (this.selectedNode.expanded) {
-                if (event.altKey)
-                    this.selectedNode.collapseRecursively();
-                else
-                    this.selectedNode.collapse();
-                handled = true;
-            } else if (this.selectedNode.parent && !this.selectedNode.parent.root) {
-                handled = true;
-                if (this.selectedNode.parent.selectable) {
-                    nextSelectedNode = this.selectedNode.parent;
-                    handled = nextSelectedNode ? true : false;
-                } else if (this.selectedNode.parent)
-                    this.selectedNode.parent.collapse();
-            }
-        } else if (event.keyIdentifier === "Right") {
-            if (!this.selectedNode.revealed) {
-                this.selectedNode.reveal();
-                handled = true;
-            } else if (this.selectedNode.hasChildren) {
-                handled = true;
-                if (this.selectedNode.expanded) {
-                    nextSelectedNode = this.selectedNode.children[0];
-                    handled = nextSelectedNode ? true : false;
-                } else {
-                    if (event.altKey)
-                        this.selectedNode.expandRecursively();
-                    else
-                        this.selectedNode.expand();
-                }
-            }
-        } else if (event.keyCode === 8 || event.keyCode === 46) {
-            if (this._deleteCallback) {
-                handled = true;
-                this._deleteCallback(this.selectedNode);
-            }
-        } else if (isEnterKey(event)) {
-            if (this._editCallback) {
-                handled = true;
-                // The first child of the selected element is the <td class="0-column">,
-                // and that's what we want to edit.
-                this._startEditing(this.selectedNode._element.children[0]);
-            }
-        }
-
-        if (nextSelectedNode) {
-            nextSelectedNode.reveal();
-            nextSelectedNode.select();
-        }
-
-        if (handled) {
-            event.preventDefault();
-            event.stopPropagation();
-        }
-    },
-
-    expand: function()
-    {
-        // This is the root, do nothing.
-    },
-
-    collapse: function()
-    {
-        // This is the root, do nothing.
-    },
-
-    reveal: function()
-    {
-        // This is the root, do nothing.
-    },
-
-    dataGridNodeFromNode: function(target)
-    {
-        var rowElement = target.enclosingNodeOrSelfWithNodeName("tr");
-        return rowElement._dataGridNode;
-    },
-
-    dataGridNodeFromPoint: function(x, y)
-    {
-        var node = this._dataTable.ownerDocument.elementFromPoint(x, y);
-        var rowElement = node.enclosingNodeOrSelfWithNodeName("tr");
-        return rowElement._dataGridNode;
-    },
-
-    _clickInHeaderCell: function(event)
-    {
-        var cell = event.target.enclosingNodeOrSelfWithNodeName("th");
-        if (!cell || !cell.columnIdentifier || !cell.hasStyleClass("sortable"))
-            return;
-
-        var sortOrder = this.sortOrder;
-
-        if (this._sortColumnCell) {
-            this._sortColumnCell.removeStyleClass("sort-ascending");
-            this._sortColumnCell.removeStyleClass("sort-descending");
-        }
-
-        if (cell == this._sortColumnCell) {
-            if (sortOrder == "ascending")
-                sortOrder = "descending";
-            else
-                sortOrder = "ascending";
-        }
-
-        this._sortColumnCell = cell;
-
-        cell.addStyleClass("sort-" + sortOrder);
-
-        this.dispatchEventToListeners("sorting changed");
-    },
-
-    _mouseDownInDataTable: function(event)
-    {
-        var gridNode = this.dataGridNodeFromNode(event.target);
-        if (!gridNode || !gridNode.selectable)
-            return;
-
-        if (gridNode.isEventWithinDisclosureTriangle(event))
-            return;
-
-        if (event.metaKey) {
-            if (gridNode.selected)
-                gridNode.deselect();
-            else
-                gridNode.select();
-        } else
-            gridNode.select();
-    },
-    
-    _contextMenuInDataTable: function(event)
-    {
-        var gridNode = this.dataGridNodeFromNode(event.target);
-        if (!gridNode || !gridNode.selectable)
-            return;
-        
-        if (gridNode.isEventWithinDisclosureTriangle(event))
-            return;
-      
-        var contextMenu = new WebInspector.ContextMenu();
-        
-        // FIXME: Use the column names for Editing, instead of just "Edit".
-        if (this.dataGrid._editCallback) {
-            if (gridNode === this.creationNode)
-                contextMenu.appendItem(WebInspector.UIString("Add New"), this._startEditing.bind(this, event.target));
-            else
-                contextMenu.appendItem(WebInspector.UIString("Edit"), this._startEditing.bind(this, event.target));
-        }
-        if (this.dataGrid._deleteCallback && gridNode !== this.creationNode)
-            contextMenu.appendItem(WebInspector.UIString("Delete"), this._deleteCallback.bind(this, gridNode));
-        
-        contextMenu.show(event);
-    },
-
-    _clickInDataTable: function(event)
-    {
-        var gridNode = this.dataGridNodeFromNode(event.target);
-        if (!gridNode || !gridNode.hasChildren)
-            return;
-
-        if (!gridNode.isEventWithinDisclosureTriangle(event))
-            return;
-
-        if (gridNode.expanded) {
-            if (event.altKey)
-                gridNode.collapseRecursively();
-            else
-                gridNode.collapse();
-        } else {
-            if (event.altKey)
-                gridNode.expandRecursively();
-            else
-                gridNode.expand();
-        }
-    },
-    
-    _startResizerDragging: function(event)
-    {
-        this.currentResizer = event.target;
-        if (!this.currentResizer.rightNeighboringColumnID)
-            return;
-        WebInspector.elementDragStart(this.lastResizer, this._resizerDragging.bind(this),
-            this._endResizerDragging.bind(this), event, "col-resize");
-    },
-    
-    _resizerDragging: function(event)
-    {
-        var resizer = this.currentResizer;
-        if (!resizer)
-            return;
-        
-        // Constrain the dragpoint to be within the containing div of the
-        // datagrid.
-        var dragPoint = event.clientX - this.element.totalOffsetLeft;
-        // Constrain the dragpoint to be within the space made up by the
-        // column directly to the left and the column directly to the right.
-        var leftEdgeOfPreviousColumn = 0;
-        var firstRowCells = this.headerTableBody.rows[0].cells;
-        for (var i = 0; i < resizer.rightNeighboringColumnID - 1; i++)
-            leftEdgeOfPreviousColumn += firstRowCells[i].offsetWidth;
-            
-        var rightEdgeOfNextColumn = leftEdgeOfPreviousColumn + firstRowCells[resizer.rightNeighboringColumnID - 1].offsetWidth + firstRowCells[resizer.rightNeighboringColumnID].offsetWidth;
-        
-        // Give each column some padding so that they don't disappear.               
-        var leftMinimum = leftEdgeOfPreviousColumn + this.ColumnResizePadding;
-        var rightMaximum = rightEdgeOfNextColumn - this.ColumnResizePadding;
-        
-        dragPoint = Number.constrain(dragPoint, leftMinimum, rightMaximum);
-        
-        resizer.style.left = (dragPoint - this.CenterResizerOverBorderAdjustment) + "px";
-        
-        var percentLeftColumn = (((dragPoint - leftEdgeOfPreviousColumn) / this._dataTable.offsetWidth) * 100) + "%";
-        this._headerTableColumnGroup.children[resizer.rightNeighboringColumnID - 1].style.width = percentLeftColumn;
-        this._dataTableColumnGroup.children[resizer.rightNeighboringColumnID - 1].style.width = percentLeftColumn;
-        
-        var percentRightColumn = (((rightEdgeOfNextColumn - dragPoint) / this._dataTable.offsetWidth) * 100) + "%";
-        this._headerTableColumnGroup.children[resizer.rightNeighboringColumnID].style.width =  percentRightColumn;
-        this._dataTableColumnGroup.children[resizer.rightNeighboringColumnID].style.width = percentRightColumn;
-        
-        event.preventDefault();
-    },
-    
-    _endResizerDragging: function(event)
-    {
-        WebInspector.elementDragEnd(event);
-        this.currentResizer = null;
-    },
-    
-    ColumnResizePadding: 10,
-    
-    CenterResizerOverBorderAdjustment: 3,
-}
-
-WebInspector.DataGrid.prototype.__proto__ = WebInspector.Object.prototype;
-
-WebInspector.DataGridNode = function(data, hasChildren)
-{
-    this._expanded = false;
-    this._selected = false;
-    this._shouldRefreshChildren = true;
-    this._data = data || {};
-    this.hasChildren = hasChildren || false;
-    this.children = [];
-    this.dataGrid = null;
-    this.parent = null;
-    this.previousSibling = null;
-    this.nextSibling = null;
-    this.disclosureToggleWidth = 10;
-}
-
-WebInspector.DataGridNode.prototype = {
-    selectable: true,
-
-    get element()
-    {
-        if (this._element)
-            return this._element;
-
-        if (!this.dataGrid)
-            return null;
-
-        this._element = document.createElement("tr");
-        this._element._dataGridNode = this;
-
-        if (this.hasChildren)
-            this._element.addStyleClass("parent");
-        if (this.expanded)
-            this._element.addStyleClass("expanded");
-        if (this.selected)
-            this._element.addStyleClass("selected");
-        if (this.revealed)
-            this._element.addStyleClass("revealed");
-
-        for (var columnIdentifier in this.dataGrid.columns) {
-            var cell = this.createCell(columnIdentifier);
-            this._element.appendChild(cell);
-        }
-
-        return this._element;
-    },
-
-    get data()
-    {
-        return this._data;
-    },
-
-    set data(x)
-    {
-        this._data = x || {};
-        this.refresh();
-    },
-
-    get revealed()
-    {
-        if ("_revealed" in this)
-            return this._revealed;
-
-        var currentAncestor = this.parent;
-        while (currentAncestor && !currentAncestor.root) {
-            if (!currentAncestor.expanded) {
-                this._revealed = false;
-                return false;
-            }
-
-            currentAncestor = currentAncestor.parent;
-        }
-
-        this._revealed = true;
-        return true;
-    },
-
-    set hasChildren(x)
-    {
-        if (this._hasChildren === x)
-            return;
-
-        this._hasChildren = x;
-
-        if (!this._element)
-            return;
-
-        if (this._hasChildren)
-        {
-            this._element.addStyleClass("parent");
-            if (this.expanded)
-                this._element.addStyleClass("expanded");
-        }
-        else
-        {
-            this._element.removeStyleClass("parent");
-            this._element.removeStyleClass("expanded");
-        }
-    },
-
-    get hasChildren()
-    {
-        return this._hasChildren;
-    },
-
-    set revealed(x)
-    {
-        if (this._revealed === x)
-            return;
-
-        this._revealed = x;
-
-        if (this._element) {
-            if (this._revealed)
-                this._element.addStyleClass("revealed");
-            else
-                this._element.removeStyleClass("revealed");
-        }
-
-        for (var i = 0; i < this.children.length; ++i)
-            this.children[i].revealed = x && this.expanded;
-    },
-
-    get depth()
-    {
-        if ("_depth" in this)
-            return this._depth;
-        if (this.parent && !this.parent.root)
-            this._depth = this.parent.depth + 1;
-        else
-            this._depth = 0;
-        return this._depth;
-    },
-
-    get shouldRefreshChildren()
-    {
-        return this._shouldRefreshChildren;
-    },
-
-    set shouldRefreshChildren(x)
-    {
-        this._shouldRefreshChildren = x;
-        if (x && this.expanded)
-            this.expand();
-    },
-
-    get selected()
-    {
-        return this._selected;
-    },
-
-    set selected(x)
-    {
-        if (x)
-            this.select();
-        else
-            this.deselect();
-    },
-
-    get expanded()
-    {
-        return this._expanded;
-    },
-
-    set expanded(x)
-    {
-        if (x)
-            this.expand();
-        else
-            this.collapse();
-    },
-
-    refresh: function()
-    {
-        if (!this._element || !this.dataGrid)
-            return;
-
-        this._element.removeChildren();
-
-        for (var columnIdentifier in this.dataGrid.columns) {
-            var cell = this.createCell(columnIdentifier);
-            this._element.appendChild(cell);
-        }
-    },
-
-    createCell: function(columnIdentifier)
-    {
-        var cell = document.createElement("td");
-        cell.className = columnIdentifier + "-column";
-
-        var alignment = this.dataGrid.aligned[columnIdentifier];
-        if (alignment)
-            cell.addStyleClass(alignment);
-
-        var div = document.createElement("div");
-        div.textContent = this.data[columnIdentifier];
-        cell.appendChild(div);
-
-        if (columnIdentifier === this.dataGrid.disclosureColumnIdentifier) {
-            cell.addStyleClass("disclosure");
-            if (this.depth)
-                cell.style.setProperty("padding-left", (this.depth * this.dataGrid.indentWidth) + "px");
-        }
-
-        return cell;
-    },
-
-    // Share these functions with DataGrid. They are written to work with a DataGridNode this object.
-    appendChild: WebInspector.DataGrid.prototype.appendChild,
-    insertChild: WebInspector.DataGrid.prototype.insertChild,
-    removeChild: WebInspector.DataGrid.prototype.removeChild,
-    removeChildren: WebInspector.DataGrid.prototype.removeChildren,
-    removeChildrenRecursive: WebInspector.DataGrid.prototype.removeChildrenRecursive,
-
-    _recalculateSiblings: function(myIndex)
-    {
-        if (!this.parent)
-            return;
-
-        var previousChild = (myIndex > 0 ? this.parent.children[myIndex - 1] : null);
-
-        if (previousChild) {
-            previousChild.nextSibling = this;
-            this.previousSibling = previousChild;
-        } else
-            this.previousSibling = null;
-
-        var nextChild = this.parent.children[myIndex + 1];
-
-        if (nextChild) {
-            nextChild.previousSibling = this;
-            this.nextSibling = nextChild;
-        } else
-            this.nextSibling = null;
-    },
-
-    collapse: function()
-    {
-        if (this._element)
-            this._element.removeStyleClass("expanded");
-
-        this._expanded = false;
-
-        for (var i = 0; i < this.children.length; ++i)
-            this.children[i].revealed = false;
-
-        this.dispatchEventToListeners("collapsed");
-    },
-
-    collapseRecursively: function()
-    {
-        var item = this;
-        while (item) {
-            if (item.expanded)
-                item.collapse();
-            item = item.traverseNextNode(false, this, true);
-        }
-    },
-
-    expand: function()
-    {
-        if (!this.hasChildren || this.expanded)
-            return;
-
-        if (this.revealed && !this._shouldRefreshChildren)
-            for (var i = 0; i < this.children.length; ++i)
-                this.children[i].revealed = true;
-
-        if (this._shouldRefreshChildren) {
-            for (var i = 0; i < this.children.length; ++i)
-                this.children[i]._detach();
-
-            this.dispatchEventToListeners("populate");
-
-            if (this._attached) {
-                for (var i = 0; i < this.children.length; ++i) {
-                    var child = this.children[i];
-                    if (this.revealed)
-                        child.revealed = true;
-                    child._attach();
-                }
-            }
-
-            delete this._shouldRefreshChildren;
-        }
-
-        if (this._element)
-            this._element.addStyleClass("expanded");
-
-        this._expanded = true;
-
-        this.dispatchEventToListeners("expanded");
-    },
-
-    expandRecursively: function()
-    {
-        var item = this;
-        while (item) {
-            item.expand();
-            item = item.traverseNextNode(false, this);
-        }
-    },
-
-    reveal: function()
-    {
-        var currentAncestor = this.parent;
-        while (currentAncestor && !currentAncestor.root) {
-            if (!currentAncestor.expanded)
-                currentAncestor.expand();
-            currentAncestor = currentAncestor.parent;
-        }
-
-        this.element.scrollIntoViewIfNeeded(false);
-
-        this.dispatchEventToListeners("revealed");
-    },
-
-    select: function(supressSelectedEvent)
-    {
-        if (!this.dataGrid || !this.selectable || this.selected)
-            return;
-
-        if (this.dataGrid.selectedNode)
-            this.dataGrid.selectedNode.deselect();
-
-        this._selected = true;
-        this.dataGrid.selectedNode = this;
-
-        if (this._element)
-            this._element.addStyleClass("selected");
-
-        if (!supressSelectedEvent)
-            this.dispatchEventToListeners("selected");
-    },
-
-    deselect: function(supressDeselectedEvent)
-    {
-        if (!this.dataGrid || this.dataGrid.selectedNode !== this || !this.selected)
-            return;
-
-        this._selected = false;
-        this.dataGrid.selectedNode = null;
-
-        if (this._element)
-            this._element.removeStyleClass("selected");
-
-        if (!supressDeselectedEvent)
-            this.dispatchEventToListeners("deselected");
-    },
-
-    traverseNextNode: function(skipHidden, stayWithin, dontPopulate, info)
-    {
-        if (!dontPopulate && this.hasChildren)
-            this.dispatchEventToListeners("populate");
-
-        if (info)
-            info.depthChange = 0;
-
-        var node = (!skipHidden || this.revealed) ? this.children[0] : null;
-        if (node && (!skipHidden || this.expanded)) {
-            if (info)
-                info.depthChange = 1;
-            return node;
-        }
-
-        if (this === stayWithin)
-            return null;
-
-        node = (!skipHidden || this.revealed) ? this.nextSibling : null;
-        if (node)
-            return node;
-
-        node = this;
-        while (node && !node.root && !((!skipHidden || node.revealed) ? node.nextSibling : null) && node.parent !== stayWithin) {
-            if (info)
-                info.depthChange -= 1;
-            node = node.parent;
-        }
-
-        if (!node)
-            return null;
-
-        return (!skipHidden || node.revealed) ? node.nextSibling : null;
-    },
-
-    traversePreviousNode: function(skipHidden, dontPopulate)
-    {
-        var node = (!skipHidden || this.revealed) ? this.previousSibling : null;
-        if (!dontPopulate && node && node.hasChildren)
-            node.dispatchEventToListeners("populate");
-
-        while (node && ((!skipHidden || (node.revealed && node.expanded)) ? node.children[node.children.length - 1] : null)) {
-            if (!dontPopulate && node.hasChildren)
-                node.dispatchEventToListeners("populate");
-            node = ((!skipHidden || (node.revealed && node.expanded)) ? node.children[node.children.length - 1] : null);
-        }
-
-        if (node)
-            return node;
-
-        if (!this.parent || this.parent.root)
-            return null;
-
-        return this.parent;
-    },
-
-    isEventWithinDisclosureTriangle: function(event)
-    {
-        if (!this.hasChildren)
-            return false;
-        var cell = event.target.enclosingNodeOrSelfWithNodeName("td");
-        if (!cell.hasStyleClass("disclosure"))
-            return false;
-        var computedLeftPadding = window.getComputedStyle(cell).getPropertyCSSValue("padding-left").getFloatValue(CSSPrimitiveValue.CSS_PX);
-        var left = cell.totalOffsetLeft + computedLeftPadding;
-        return event.pageX >= left && event.pageX <= left + this.disclosureToggleWidth;
-    },
-
-    _attach: function()
-    {
-        if (!this.dataGrid || this._attached)
-            return;
-
-        this._attached = true;
-
-        var nextNode = null;
-        var previousNode = this.traversePreviousNode(true, true);
-        if (previousNode && previousNode.element.parentNode && previousNode.element.nextSibling)
-            var nextNode = previousNode.element.nextSibling;
-        if (!nextNode)
-            nextNode = this.dataGrid.dataTableBody.lastChild;
-        this.dataGrid.dataTableBody.insertBefore(this.element, nextNode);
-
-        if (this.expanded)
-            for (var i = 0; i < this.children.length; ++i)
-                this.children[i]._attach();
-    },
-
-    _detach: function()
-    {
-        if (!this._attached)
-            return;
-
-        this._attached = false;
-
-        if (this._element && this._element.parentNode)
-            this._element.parentNode.removeChild(this._element);
-
-        for (var i = 0; i < this.children.length; ++i)
-            this.children[i]._detach();
-    },
-
-    savePosition: function()
-    {
-        if (this._savedPosition)
-            return;
-
-        if (!this.parent)
-            throw("savePosition: Node must have a parent.");
-        this._savedPosition = {
-            parent: this.parent,
-            index: this.parent.children.indexOf(this)
-        };
-    },
-
-    restorePosition: function()
-    {
-        if (!this._savedPosition)
-            return;
-
-        if (this.parent !== this._savedPosition.parent)
-            this._savedPosition.parent.insertChild(this, this._savedPosition.index);
-
-        delete this._savedPosition;
-    }
-}
-
-WebInspector.DataGridNode.prototype.__proto__ = WebInspector.Object.prototype;
-
-WebInspector.CreationDataGridNode = function(data, hasChildren)
-{
-    WebInspector.DataGridNode.call(this, data, hasChildren);
-    this.isCreationNode = true;
-}
-
-WebInspector.CreationDataGridNode.prototype = {
-    makeNormal: function()
-    {
-        delete this.isCreationNode;
-        delete this.makeNormal;
-    }
-}
-
-WebInspector.CreationDataGridNode.prototype.__proto__ = WebInspector.DataGridNode.prototype;
-
-/* CookieItemsView.js */
-
-/*
- * Copyright (C) 2009 Apple Inc.  All rights reserved.
- * Copyright (C) 2009 Joseph Pecoraro
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  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.
- * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS 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 APPLE OR ITS 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.
- */
-
-WebInspector.CookieItemsView = function(cookieDomain)
-{
-    WebInspector.View.call(this);
-
-    this.element.addStyleClass("storage-view");
-    this.element.addStyleClass("table");
-
-    this.deleteButton = new WebInspector.StatusBarButton(WebInspector.UIString("Delete"), "delete-storage-status-bar-item");
-    this.deleteButton.visible = false;
-    this.deleteButton.addEventListener("click", this._deleteButtonClicked.bind(this), false);
-
-    this.refreshButton = new WebInspector.StatusBarButton(WebInspector.UIString("Refresh"), "refresh-storage-status-bar-item");
-    this.refreshButton.addEventListener("click", this._refreshButtonClicked.bind(this), false);
-    
-    this._cookieDomain = cookieDomain;
-}
-
-WebInspector.CookieItemsView.prototype = {
-    get statusBarItems()
-    {
-        return [this.refreshButton.element, this.deleteButton.element];
-    },
-
-    show: function(parentElement)
-    {
-        WebInspector.View.prototype.show.call(this, parentElement);
-        this.update();
-    },
-
-    hide: function()
-    {
-        WebInspector.View.prototype.hide.call(this);
-        this.deleteButton.visible = false;
-    },
-
-    update: function()
-    {
-        this.element.removeChildren();
-
-        var self = this;
-        function callback(allCookies, isAdvanced) {
-            var cookies = self._cookiesForDomain(allCookies);
-            var dataGrid = (isAdvanced ? self.dataGridForCookies(cookies) : self.simpleDataGridForCookies(cookies));
-            if (dataGrid) {
-                self._dataGrid = dataGrid;
-                self.element.appendChild(dataGrid.element);
-                self._dataGrid.updateWidths();
-                if (isAdvanced)
-                    self.deleteButton.visible = true;
-            } else {
-                var emptyMsgElement = document.createElement("div");
-                emptyMsgElement.className = "storage-table-empty";
-                emptyMsgElement.textContent = WebInspector.UIString("This site has no cookies.");
-                self.element.appendChild(emptyMsgElement);
-                self._dataGrid = null;
-                self.deleteButton.visible = false;
-            }
-        }
-
-        WebInspector.Cookies.getCookiesAsync(callback);
-    },
-
-    _cookiesForDomain: function(allCookies)
-    {
-        var cookiesForDomain = [];
-        var resourceURLsForDocumentURL = [];
-
-        for (var id in WebInspector.resources) {
-            var resource = WebInspector.resources[id];
-            var match = resource.documentURL.match(WebInspector.URLRegExp);
-            if (match && match[2] === this._cookieDomain)
-                resourceURLsForDocumentURL.push(resource.url);
-        }
-
-        for (var i = 0; i < allCookies.length; ++i) {
-            for (var j = 0; j < resourceURLsForDocumentURL.length; ++j) {
-                var resourceURL = resourceURLsForDocumentURL[j];
-                if (WebInspector.Cookies.cookieMatchesResourceURL(allCookies[i], resourceURL)) {
-                    cookiesForDomain.push(allCookies[i]);
-                    break;
-                }
-            }
-        }
-        return cookiesForDomain;
-    },
-
-    dataGridForCookies: function(cookies)
-    {
-        if (!cookies.length)
-            return null;
-
-        for (var i = 0; i < cookies.length; ++i)
-            cookies[i].expires = new Date(cookies[i].expires);
-
-        var columns = { 0: {}, 1: {}, 2: {}, 3: {}, 4: {}, 5: {}, 6: {}, 7: {} };
-        columns[0].title = WebInspector.UIString("Name");
-        columns[0].width = columns[0].title.length;
-        columns[1].title = WebInspector.UIString("Value");
-        columns[1].width = columns[1].title.length;
-        columns[2].title = WebInspector.UIString("Domain");
-        columns[2].width = columns[2].title.length;
-        columns[3].title = WebInspector.UIString("Path");
-        columns[3].width = columns[3].title.length;
-        columns[4].title = WebInspector.UIString("Expires");
-        columns[4].width = columns[4].title.length;
-        columns[5].title = WebInspector.UIString("Size");
-        columns[5].width = columns[5].title.length;
-        columns[5].aligned = "right";
-        columns[6].title = WebInspector.UIString("HTTP");
-        columns[6].width = columns[6].title.length;
-        columns[6].aligned = "centered";
-        columns[7].title = WebInspector.UIString("Secure");
-        columns[7].width = columns[7].title.length;
-        columns[7].aligned = "centered";
-
-        function updateDataAndColumn(index, value) {
-            data[index] = value;
-            if (value.length > columns[index].width)
-                columns[index].width = value.length;
-        }
-
-        var data;
-        var nodes = [];
-        for (var i = 0; i < cookies.length; ++i) {
-            var cookie = cookies[i];
-            data = {};
-
-            updateDataAndColumn(0, cookie.name);
-            updateDataAndColumn(1, cookie.value);
-            updateDataAndColumn(2, cookie.domain);
-            updateDataAndColumn(3, cookie.path);
-            updateDataAndColumn(4, (cookie.session ? WebInspector.UIString("Session") : cookie.expires.toGMTString()));
-            updateDataAndColumn(5, Number.bytesToString(cookie.size, WebInspector.UIString));
-            updateDataAndColumn(6, (cookie.httpOnly ? "\u2713" : "")); // Checkmark
-            updateDataAndColumn(7, (cookie.secure ? "\u2713" : "")); // Checkmark
-
-            var node = new WebInspector.DataGridNode(data, false);
-            node.cookie = cookie;
-            node.selectable = true;
-            nodes.push(node);
-        }
-
-        var totalColumnWidths = 0;
-        for (var columnIdentifier in columns)
-            totalColumnWidths += columns[columnIdentifier].width;
-
-        // Enforce the Value column (the 2nd column) to be a max of 33%
-        // tweaking the raw total width because may massively outshadow the others
-        var valueColumnWidth = columns[1].width;
-        if (valueColumnWidth / totalColumnWidths > 0.33) {
-            totalColumnWidths -= valueColumnWidth;
-            totalColumnWidths *= 1.33;
-            columns[1].width = totalColumnWidths * 0.33;
-        }
-
-        // Calculate the percentage width for the columns.
-        const minimumPrecent = 6;
-        var recoupPercent = 0;
-        for (var columnIdentifier in columns) {
-            var width = columns[columnIdentifier].width;
-            width = Math.round((width / totalColumnWidths) * 100);
-            if (width < minimumPrecent) {
-                recoupPercent += (minimumPrecent - width);
-                width = minimumPrecent;
-            }
-            columns[columnIdentifier].width = width;
-        }
-
-        // Enforce the minimum percentage width. (need to narrow total percentage due to earlier additions)
-        while (recoupPercent > 0) {
-            for (var columnIdentifier in columns) {
-                if (columns[columnIdentifier].width > minimumPrecent) {
-                    --columns[columnIdentifier].width;
-                    --recoupPercent;
-                    if (!recoupPercent)
-                        break;
-                }
-            }
-        }
-
-        for (var columnIdentifier in columns)
-            columns[columnIdentifier].width += "%";
-
-        var dataGrid = new WebInspector.DataGrid(columns, null, this._deleteCookieCallback.bind(this));
-        var length = nodes.length;
-        for (var i = 0; i < length; ++i)
-            dataGrid.appendChild(nodes[i]);
-        if (length > 0)
-            nodes[0].selected = true;
-
-        return dataGrid;
-    },
-
-    simpleDataGridForCookies: function(cookies)
-    {
-        if (!cookies.length)
-            return null;
-
-        var columns = {};
-        columns[0] = {};
-        columns[1] = {};
-        columns[0].title = WebInspector.UIString("Name");
-        columns[0].width = columns[0].title.length;
-        columns[1].title = WebInspector.UIString("Value");
-        columns[1].width = columns[1].title.length;
-
-        var nodes = [];
-        for (var i = 0; i < cookies.length; ++i) {
-            var cookie = cookies[i];
-            var data = {};
-
-            var name = cookie.name;
-            data[0] = name;
-            if (name.length > columns[0].width)
-                columns[0].width = name.length;
-
-            var value = cookie.value;
-            data[1] = value;
-            if (value.length > columns[1].width)
-                columns[1].width = value.length;
-
-            var node = new WebInspector.DataGridNode(data, false);
-            node.selectable = true;
-            nodes.push(node);
-        }
-
-        var totalColumnWidths = columns[0].width + columns[1].width;
-        var width = Math.round((columns[0].width * 100) / totalColumnWidths);
-        const minimumPrecent = 20;
-        if (width < minimumPrecent)
-            width = minimumPrecent;
-        if (width > 100 - minimumPrecent)
-            width = 100 - minimumPrecent;
-        columns[0].width = width;
-        columns[1].width = 100 - width;
-        columns[0].width += "%";
-        columns[1].width += "%";
-
-        var dataGrid = new WebInspector.DataGrid(columns);
-        var length = nodes.length;
-        for (var i = 0; i < length; ++i)
-            dataGrid.appendChild(nodes[i]);
-        if (length > 0)
-            nodes[0].selected = true;
-
-        return dataGrid;
-    },
-    
-    resize: function()
-    {
-        if (this._dataGrid)
-            this._dataGrid.updateWidths();
-    },
-
-    _deleteButtonClicked: function(event)
-    {
-        if (!this._dataGrid || !this._dataGrid.selectedNode)
-            return;
-
-        this._deleteCookieCallback(this._dataGrid.selectedNode);
-    },
-    
-    _deleteCookieCallback: function(node)
-    {
-        var cookie = node.cookie;
-        InspectorBackend.deleteCookie(cookie.name, this._cookieDomain);
-        this.update();
-    },
-
-    _refreshButtonClicked: function(event)
-    {
-        this.update();
-    }
-}
-
-WebInspector.CookieItemsView.prototype.__proto__ = WebInspector.View.prototype;
-
-/* Script.js */
-
-/*
- * Copyright (C) 2008 Apple Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. 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.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``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 APPLE INC. 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.
- */
-
-WebInspector.Script = function(sourceID, sourceURL, source, startingLine, errorLine, errorMessage)
-{
-    this.sourceID = sourceID;
-    this.sourceURL = sourceURL;
-    this.source = source;
-    this.startingLine = startingLine;
-    this.errorLine = errorLine;
-    this.errorMessage = errorMessage;
-
-    // if no URL, look for "//@ sourceURL=" decorator
-    // note that this sourceURL comment decorator is behavior that FireBug added
-    // in it's 1.1 release as noted in the release notes:
-    // http://fbug.googlecode.com/svn/branches/firebug1.1/docs/ReleaseNotes_1.1.txt
-    if (!sourceURL) {
-        // use of [ \t] rather than \s is to prevent \n from matching
-        var pattern = /^\s*\/\/[ \t]*@[ \t]*sourceURL[ \t]*=[ \t]*(\S+).*$/m;
-        var match = pattern.exec(source);
-
-        if (match)
-            this.sourceURL = WebInspector.UIString("(program): %s", match[1]);
-    }
-}
-
-WebInspector.Script.prototype = {
-}
-
-/* Breakpoint.js */
-
-/*
- * Copyright (C) 2008 Apple Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. 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.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``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 APPLE INC. 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.
- */
-
-WebInspector.Breakpoint = function(url, line, sourceID, condition)
-{
-    this.url = url;
-    this.line = line;
-    this.sourceID = sourceID;
-    this._enabled = true;
-    this._sourceText = "";
-    this._condition = condition || "";
-}
-
-WebInspector.Breakpoint.prototype = {
-    get enabled()
-    {
-        return this._enabled;
-    },
-
-    set enabled(x)
-    {
-        if (this._enabled === x)
-            return;
-
-        this._enabled = x;
-
-        if (this._enabled)
-            this.dispatchEventToListeners("enabled");
-        else
-            this.dispatchEventToListeners("disabled");
-    },
-
-    get sourceText()
-    {
-        return this._sourceText;
-    },
-
-    set sourceText(text)
-    {
-        this._sourceText = text;
-        this.dispatchEventToListeners("text-changed");
-    },
-
-    get label()
-    {
-        var displayName = (this.url ? WebInspector.displayNameForURL(this.url) : WebInspector.UIString("(program)"));
-        return displayName + ":" + this.line;
-    },
-
-    get id()
-    {
-        return this.sourceID + ":" + this.line;
-    },
-
-    get condition()
-    {
-        return this._condition;
-    },
-
-    set condition(c)
-    {
-        c = c || "";
-        if (this._condition === c)
-            return;
-
-        this._condition = c;
-        this.dispatchEventToListeners("condition-changed");
-
-        if (this.enabled)
-            InspectorBackend.updateBreakpoint(this.sourceID, this.line, c);
-    }
-}
-
-WebInspector.Breakpoint.prototype.__proto__ = WebInspector.Object.prototype;
-
-/* SidebarPane.js */
-
-/*
- * Copyright (C) 2007 Apple Inc.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  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.
- * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS 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 APPLE OR ITS 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.
- */
-
-WebInspector.SidebarPane = function(title)
-{
-    this.element = document.createElement("div");
-    this.element.className = "pane";
-
-    this.titleElement = document.createElement("div");
-    this.titleElement.className = "title";
-    this.titleElement.tabIndex = 0;
-    this.titleElement.addEventListener("click", this.toggleExpanded.bind(this), false);
-    this.titleElement.addEventListener("keydown", this._onTitleKeyDown.bind(this), false);
-
-    this.bodyElement = document.createElement("div");
-    this.bodyElement.className = "body";
-
-    this.element.appendChild(this.titleElement);
-    this.element.appendChild(this.bodyElement);
-
-    this.title = title;
-    this.growbarVisible = false;
-    this.expanded = false;
-}
-
-WebInspector.SidebarPane.prototype = {
-    get title()
-    {
-        return this._title;
-    },
-
-    set title(x)
-    {
-        if (this._title === x)
-            return;
-        this._title = x;
-        this.titleElement.textContent = x;
-    },
-
-    get growbarVisible()
-    {
-        return this._growbarVisible;
-    },
-
-    set growbarVisible(x)
-    {
-        if (this._growbarVisible === x)
-            return;
-
-        this._growbarVisible = x;
-
-        if (x && !this._growbarElement) {
-            this._growbarElement = document.createElement("div");
-            this._growbarElement.className = "growbar";
-            this.element.appendChild(this._growbarElement);
-        } else if (!x && this._growbarElement) {
-            if (this._growbarElement.parentNode)
-                this._growbarElement.parentNode(this._growbarElement);
-            delete this._growbarElement;
-        }
-    },
-
-    get expanded()
-    {
-        return this._expanded;
-    },
-
-    set expanded(x)
-    {
-        if (x)
-            this.expand();
-        else
-            this.collapse();
-    },
-
-    expand: function()
-    {
-        if (this._expanded)
-            return;
-        this._expanded = true;
-        this.element.addStyleClass("expanded");
-        if (this.onexpand)
-            this.onexpand(this);
-    },
-
-    collapse: function()
-    {
-        if (!this._expanded)
-            return;
-        this._expanded = false;
-        this.element.removeStyleClass("expanded");
-        if (this.oncollapse)
-            this.oncollapse(this);
-    },
-
-    toggleExpanded: function()
-    {
-        this.expanded = !this.expanded;
-    },
-
-    _onTitleKeyDown: function(event)
-    {
-        if (isEnterKey(event) || event.keyCode === WebInspector.KeyboardShortcut.KeyCodes.Space)
-            this.toggleExpanded();
-    }
-}
-
-WebInspector.SidebarPane.prototype.__proto__ = WebInspector.Object.prototype;
-
-/* ElementsTreeOutline.js */
-
-/*
- * Copyright (C) 2007, 2008 Apple Inc.  All rights reserved.
- * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com>
- * Copyright (C) 2009 Joseph Pecoraro
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  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.
- * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS 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 APPLE OR ITS 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.
- */
-
-WebInspector.ElementsTreeOutline = function() {
-    this.element = document.createElement("ol");
-    this.element.addEventListener("mousedown", this._onmousedown.bind(this), false);
-    this.element.addEventListener("mousemove", this._onmousemove.bind(this), false);
-    this.element.addEventListener("mouseout", this._onmouseout.bind(this), false);
-
-    TreeOutline.call(this, this.element);
-
-    this.includeRootDOMNode = true;
-    this.selectEnabled = false;
-    this.showInElementsPanelEnabled = false;
-    this.rootDOMNode = null;
-    this.focusedDOMNode = null;
-
-    this.element.addEventListener("contextmenu", this._contextMenuEventFired.bind(this), true);
-    this.element.addEventListener("keydown", this._keyDown.bind(this), true);
-}
-
-WebInspector.ElementsTreeOutline.prototype = {
-    get rootDOMNode()
-    {
-        return this._rootDOMNode;
-    },
-
-    set rootDOMNode(x)
-    {
-        if (this._rootDOMNode === x)
-            return;
-
-        this._rootDOMNode = x;
-
-        this.update();
-    },
-
-    get focusedDOMNode()
-    {
-        return this._focusedDOMNode;
-    },
-
-    set focusedDOMNode(x)
-    {
-        if (this._focusedDOMNode === x) {
-            this.revealAndSelectNode(x);
-            return;
-        }
-
-        this._focusedDOMNode = x;
-
-        this.revealAndSelectNode(x);
-
-        // The revealAndSelectNode() method might find a different element if there is inlined text,
-        // and the select() call would change the focusedDOMNode and reenter this setter. So to
-        // avoid calling focusedNodeChanged() twice, first check if _focusedDOMNode is the same
-        // node as the one passed in.
-        if (this._focusedDOMNode === x) {
-            this.focusedNodeChanged();
-
-            if (x && !this.suppressSelectHighlight) {
-                InspectorBackend.highlightDOMNode(x.id);
-
-                if ("_restorePreviousHighlightNodeTimeout" in this)
-                    clearTimeout(this._restorePreviousHighlightNodeTimeout);
-
-                function restoreHighlightToHoveredNode()
-                {
-                    var hoveredNode = WebInspector.hoveredDOMNode;
-                    if (hoveredNode)
-                        InspectorBackend.highlightDOMNode(hoveredNode.id);
-                    else
-                        InspectorBackend.hideDOMNodeHighlight();
-                }
-
-                this._restorePreviousHighlightNodeTimeout = setTimeout(restoreHighlightToHoveredNode, 2000);
-            }
-        }
-    },
-
-    update: function()
-    {
-        var selectedNode = this.selectedTreeElement ? this.selectedTreeElement.representedObject : null;
-
-        this.removeChildren();
-
-        if (!this.rootDOMNode)
-            return;
-
-        var treeElement;
-        if (this.includeRootDOMNode) {
-            treeElement = new WebInspector.ElementsTreeElement(this.rootDOMNode);
-            treeElement.selectable = this.selectEnabled;
-            this.appendChild(treeElement);
-        } else {
-            // FIXME: this could use findTreeElement to reuse a tree element if it already exists
-            var node = this.rootDOMNode.firstChild;
-            while (node) {
-                treeElement = new WebInspector.ElementsTreeElement(node);
-                treeElement.selectable = this.selectEnabled;
-                this.appendChild(treeElement);
-                node = node.nextSibling;
-            }
-        }
-
-        if (selectedNode)
-            this.revealAndSelectNode(selectedNode);
-    },
-
-    updateSelection: function()
-    {
-        if (!this.selectedTreeElement)
-            return;
-        var element = this.treeOutline.selectedTreeElement;
-        element.updateSelection();
-    },
-
-    focusedNodeChanged: function(forceUpdate) {},
-
-    findTreeElement: function(node)
-    {
-        var treeElement = TreeOutline.prototype.findTreeElement.call(this, node, isAncestorNode, parentNode);
-        if (!treeElement && node.nodeType === Node.TEXT_NODE) {
-            // The text node might have been inlined if it was short, so try to find the parent element.
-            treeElement = TreeOutline.prototype.findTreeElement.call(this, node.parentNode, isAncestorNode, parentNode);
-        }
-
-        return treeElement;
-    },
-
-    revealAndSelectNode: function(node)
-    {
-        if (!node)
-            return;
-
-        var treeElement = this.findTreeElement(node);
-        if (!treeElement)
-            return;
-
-        treeElement.reveal();
-        treeElement.select();
-    },
-
-    _treeElementFromEvent: function(event)
-    {
-        var root = this.element;
-
-        // We choose this X coordinate based on the knowledge that our list
-        // items extend nearly to the right edge of the outer <ol>.
-        var x = root.totalOffsetLeft + root.offsetWidth - 20;
-
-        var y = event.pageY;
-
-        // Our list items have 1-pixel cracks between them vertically. We avoid
-        // the cracks by checking slightly above and slightly below the mouse
-        // and seeing if we hit the same element each time.
-        var elementUnderMouse = this.treeElementFromPoint(x, y);
-        var elementAboveMouse = this.treeElementFromPoint(x, y - 2);
-        var element;
-        if (elementUnderMouse === elementAboveMouse)
-            element = elementUnderMouse;
-        else
-            element = this.treeElementFromPoint(x, y + 2);
-
-        return element;
-    },
-    
-    _keyDown: function(event)
-    {
-        if (event.target !== this.treeOutline.element)
-            return;
-
-        var selectedElement = this.selectedTreeElement;
-        if (!selectedElement)
-            return;
-
-        if (event.keyCode === WebInspector.KeyboardShortcut.KeyCodes.Backspace ||
-                event.keyCode === WebInspector.KeyboardShortcut.KeyCodes.Delete) {
-            selectedElement.remove();
-            event.preventDefault();
-            event.stopPropagation();
-            return;
-        }
-
-        // On Enter or Return start editing the first attribute
-        // or create a new attribute on the selected element.
-        if (isEnterKey(event)) {
-            if (this._editing)
-                return;
-
-            selectedElement._startEditing();
-
-            // prevent a newline from being immediately inserted
-            event.preventDefault();
-            event.stopPropagation();
-            return;
-        }
-    },
-
-    _onmousedown: function(event)
-    {
-        var element = this._treeElementFromEvent(event);
-
-        if (!element || element.isEventWithinDisclosureTriangle(event))
-            return;
-
-        element.select();
-    },
-
-    _onmousemove: function(event)
-    {
-        var element = this._treeElementFromEvent(event);
-        if (element && this._previousHoveredElement === element)
-            return;
-
-        if (this._previousHoveredElement) {
-            this._previousHoveredElement.hovered = false;
-            delete this._previousHoveredElement;
-        }
-
-        if (element && !element.elementCloseTag) {
-            element.hovered = true;
-            this._previousHoveredElement = element;
-        }
-
-        WebInspector.hoveredDOMNode = (element && !element.elementCloseTag ? element.representedObject : null);
-    },
-
-    _onmouseout: function(event)
-    {
-        var nodeUnderMouse = document.elementFromPoint(event.pageX, event.pageY);
-        if (nodeUnderMouse && nodeUnderMouse.isDescendant(this.element))
-            return;
-
-        if (this._previousHoveredElement) {
-            this._previousHoveredElement.hovered = false;
-            delete this._previousHoveredElement;
-        }
-
-        WebInspector.hoveredDOMNode = null;
-    },
-
-    _contextMenuEventFired: function(event)
-    {
-        var listItem = event.target.enclosingNodeOrSelfWithNodeName("LI");
-        if (!listItem || !listItem.treeElement)
-            return;
-
-        var contextMenu = new WebInspector.ContextMenu();
-
-        var tag = event.target.enclosingNodeOrSelfWithClass("webkit-html-tag");
-        var textNode = event.target.enclosingNodeOrSelfWithClass("webkit-html-text-node");
-        if (tag)
-            listItem.treeElement._populateTagContextMenu(contextMenu, event);
-        else if (textNode)
-            listItem.treeElement._populateTextContextMenu(contextMenu, textNode);
-        contextMenu.show(event);
-    }
-}
-
-WebInspector.ElementsTreeOutline.prototype.__proto__ = TreeOutline.prototype;
-
-WebInspector.ElementsTreeElement = function(node)
-{
-    var hasChildrenOverride = node.hasChildNodes() && !this._showInlineText(node);
-
-    // The title will be updated in onattach.
-    TreeElement.call(this, "", node, hasChildrenOverride);
-
-    if (this.representedObject.nodeType == Node.ELEMENT_NODE)
-        this._canAddAttributes = true;
-}
-
-WebInspector.ElementsTreeElement.prototype = {
-    get highlighted()
-    {
-        return this._highlighted;
-    },
-
-    set highlighted(x)
-    {
-        if (this._highlighted === x)
-            return;
-
-        this._highlighted = x;
-
-        if (this.listItemElement) {
-            if (x)
-                this.listItemElement.addStyleClass("highlighted");
-            else
-                this.listItemElement.removeStyleClass("highlighted");
-        }
-    },
-
-    get hovered()
-    {
-        return this._hovered;
-    },
-
-    set hovered(x)
-    {
-        if (this._hovered === x)
-            return;
-
-        this._hovered = x;
-
-        if (this.listItemElement) {
-            if (x) {
-                this.updateSelection();
-                this.listItemElement.addStyleClass("hovered");
-            } else {
-                this.listItemElement.removeStyleClass("hovered");
-            }
-        }
-    },
-
-    createTooltipForImageNode: function(node, callback)
-    {
-        function createTooltipThenCallback(properties)
-        {
-            if (!properties) {
-                callback();
-                return;
-            }
-
-            var tooltipText = null;
-            if (properties.offsetHeight === properties.naturalHeight && properties.offsetWidth === properties.naturalWidth)
-                tooltipText = WebInspector.UIString("%d × %d pixels", properties.offsetWidth, properties.offsetHeight);
-            else
-                tooltipText = WebInspector.UIString("%d × %d pixels (Natural: %d × %d pixels)", properties.offsetWidth, properties.offsetHeight, properties.naturalWidth, properties.naturalHeight);
-            callback(tooltipText);
-        }
-        var objectProxy = new WebInspector.ObjectProxy(node.id);
-        WebInspector.ObjectProxy.getPropertiesAsync(objectProxy, ["naturalHeight", "naturalWidth", "offsetHeight", "offsetWidth"], createTooltipThenCallback);
-    },
-
-    updateSelection: function()
-    {
-        var listItemElement = this.listItemElement;
-        if (!listItemElement)
-            return;
-
-        if (document.body.offsetWidth <= 0) {
-            // The stylesheet hasn't loaded yet or the window is closed,
-            // so we can't calculate what is need. Return early.
-            return;
-        }
-
-        if (!this.selectionElement) {
-            this.selectionElement = document.createElement("div");
-            this.selectionElement.className = "selection selected";
-            listItemElement.insertBefore(this.selectionElement, listItemElement.firstChild);
-        }
-
-        this.selectionElement.style.height = listItemElement.offsetHeight + "px";
-    },
-
-    onattach: function()
-    {
-        this.listItemElement.addEventListener("mousedown", this.onmousedown.bind(this), false);
-
-        if (this._highlighted)
-            this.listItemElement.addStyleClass("highlighted");
-
-        if (this._hovered) {
-            this.updateSelection();
-            this.listItemElement.addStyleClass("hovered");
-        }
-
-        this._updateTitle();
-
-        this._preventFollowingLinksOnDoubleClick();
-    },
-
-    _preventFollowingLinksOnDoubleClick: function()
-    {
-        var links = this.listItemElement.querySelectorAll("li > .webkit-html-tag > .webkit-html-attribute > .webkit-html-external-link, li > .webkit-html-tag > .webkit-html-attribute > .webkit-html-resource-link");
-        if (!links)
-            return;
-
-        for (var i = 0; i < links.length; ++i)
-            links[i].preventFollowOnDoubleClick = true;
-    },
-
-    onpopulate: function()
-    {
-        if (this.children.length || this._showInlineText(this.representedObject))
-            return;
-
-        this.updateChildren();
-    },
-    
-    updateChildren: function(fullRefresh)
-    {
-        WebInspector.domAgent.getChildNodesAsync(this.representedObject, this._updateChildren.bind(this, fullRefresh));
-    },
-
-    _updateChildren: function(fullRefresh)
-    {
-        if (fullRefresh) {
-            var selectedTreeElement = this.treeOutline.selectedTreeElement;
-            if (selectedTreeElement && selectedTreeElement.hasAncestor(this))
-                this.select();
-            this.removeChildren();
-        }
-
-        var treeElement = this;
-        var treeChildIndex = 0;
-
-        function updateChildrenOfNode(node)
-        {
-            var treeOutline = treeElement.treeOutline;
-            var child = node.firstChild;
-            while (child) {
-                var currentTreeElement = treeElement.children[treeChildIndex];
-                if (!currentTreeElement || currentTreeElement.representedObject !== child) {
-                    // Find any existing element that is later in the children list.
-                    var existingTreeElement = null;
-                    for (var i = (treeChildIndex + 1); i < treeElement.children.length; ++i) {
-                        if (treeElement.children[i].representedObject === child) {
-                            existingTreeElement = treeElement.children[i];
-                            break;
-                        }
-                    }
-
-                    if (existingTreeElement && existingTreeElement.parent === treeElement) {
-                        // If an existing element was found and it has the same parent, just move it.
-                        var wasSelected = existingTreeElement.selected;
-                        treeElement.removeChild(existingTreeElement);
-                        treeElement.insertChild(existingTreeElement, treeChildIndex);
-                        if (wasSelected)
-                            existingTreeElement.select();
-                    } else {
-                        // No existing element found, insert a new element.
-                        var newElement = new WebInspector.ElementsTreeElement(child);
-                        newElement.selectable = treeOutline.selectEnabled;
-                        treeElement.insertChild(newElement, treeChildIndex);
-                    }
-                }
-
-                child = child.nextSibling;
-                ++treeChildIndex;
-            }
-        }
-
-        // Remove any tree elements that no longer have this node (or this node's contentDocument) as their parent.
-        for (var i = (this.children.length - 1); i >= 0; --i) {
-            if ("elementCloseTag" in this.children[i])
-                continue;
-
-            var currentChild = this.children[i];
-            var currentNode = currentChild.representedObject;
-            var currentParentNode = currentNode.parentNode;
-
-            if (currentParentNode === this.representedObject)
-                continue;
-
-            var selectedTreeElement = this.treeOutline.selectedTreeElement;
-            if (selectedTreeElement && (selectedTreeElement === currentChild || selectedTreeElement.hasAncestor(currentChild)))
-                this.select();
-
-            this.removeChildAtIndex(i);
-        }
-
-        updateChildrenOfNode(this.representedObject);
-
-        var lastChild = this.children[this.children.length - 1];
-        if (this.representedObject.nodeType == Node.ELEMENT_NODE && (!lastChild || !lastChild.elementCloseTag)) {
-            var title = "<span class=\"webkit-html-tag close\">&lt;/" + this.representedObject.nodeName.toLowerCase().escapeHTML() + "&gt;</span>";
-            var item = new TreeElement(title, null, false);
-            item.selectable = false;
-            item.elementCloseTag = true;
-            this.appendChild(item);
-        }
-    },
-
-    onexpand: function()
-    {
-        this.treeOutline.updateSelection();
-    },
-
-    oncollapse: function()
-    {
-        this.treeOutline.updateSelection();
-    },
-
-    onreveal: function()
-    {
-        if (this.listItemElement)
-            this.listItemElement.scrollIntoViewIfNeeded(false);
-    },
-
-    onselect: function()
-    {
-        this.treeOutline.focusedDOMNode = this.representedObject;
-        this.updateSelection();
-    },
-
-    onmousedown: function(event)
-    {
-        if (this._editing)
-            return;
-
-        if (this.isEventWithinDisclosureTriangle(event))
-            return;
-
-        if (this.treeOutline.showInElementsPanelEnabled) {    
-            WebInspector.showElementsPanel();
-            WebInspector.panels.elements.focusedDOMNode = this.representedObject;
-        }
-
-        // Prevent selecting the nearest word on double click.
-        if (event.detail >= 2)
-            event.preventDefault();
-    },
-
-    ondblclick: function(event)
-    {
-        if (this._editing)
-            return;
-
-        if (this._startEditingFromEvent(event))
-            return;
-
-        if (this.hasChildren && !this.expanded)
-            this.expand();
-    },
-
-    _insertInLastAttributePosition: function(tag, node)
-    {
-        if (tag.getElementsByClassName("webkit-html-attribute").length > 0)
-            tag.insertBefore(node, tag.lastChild);
-        else {
-            var nodeName = tag.textContent.match(/^<(.*?)>$/)[1];
-            tag.textContent = '';
-            tag.appendChild(document.createTextNode('<'+nodeName));
-            tag.appendChild(node);
-            tag.appendChild(document.createTextNode('>'));
-        }
-
-        this.updateSelection();
-    },
-
-    _startEditingFromEvent: function(event)
-    {
-        if (this.treeOutline.focusedDOMNode != this.representedObject)
-            return;
-
-        if (this.representedObject.nodeType != Node.ELEMENT_NODE && this.representedObject.nodeType != Node.TEXT_NODE)
-            return false;
-
-        var textNode = event.target.enclosingNodeOrSelfWithClass("webkit-html-text-node");
-        if (textNode)
-            return this._startEditingTextNode(textNode);
-
-        var attribute = event.target.enclosingNodeOrSelfWithClass("webkit-html-attribute");
-        if (attribute)
-            return this._startEditingAttribute(attribute, event.target);
-
-        var newAttribute = event.target.enclosingNodeOrSelfWithClass("add-attribute");
-        if (newAttribute)
-            return this._addNewAttribute();
-
-        return false;
-    },
-
-    _populateTagContextMenu: function(contextMenu, event)
-    {
-        var attribute = event.target.enclosingNodeOrSelfWithClass("webkit-html-attribute");
-        var newAttribute = event.target.enclosingNodeOrSelfWithClass("add-attribute");
-
-        // Add attribute-related actions.
-        contextMenu.appendItem(WebInspector.UIString("Add Attribute"), this._addNewAttribute.bind(this));
-        if (attribute && !newAttribute)
-            contextMenu.appendItem(WebInspector.UIString("Edit Attribute"), this._startEditingAttribute.bind(this, attribute, event.target));
-        contextMenu.appendSeparator();
-
-        // Add node-related actions.
-        contextMenu.appendItem(WebInspector.UIString("Edit as HTML"), this._editAsHTML.bind(this));
-        contextMenu.appendItem(WebInspector.UIString("Copy as HTML"), this._copyHTML.bind(this));
-        contextMenu.appendItem(WebInspector.UIString("Delete Node"), this.remove.bind(this));
-    },
-
-    _populateTextContextMenu: function(contextMenu, textNode)
-    {
-        contextMenu.appendItem(WebInspector.UIString("Edit Text"), this._startEditingTextNode.bind(this, textNode));
-    },
-
-    _startEditing: function()
-    {
-        if (this.treeOutline.focusedDOMNode !== this.representedObject)
-            return;
-
-        var listItem = this._listItemNode;
-
-        if (this._canAddAttributes) {
-            var attribute = listItem.getElementsByClassName("webkit-html-attribute")[0];
-            if (attribute)
-                return this._startEditingAttribute(attribute, attribute.getElementsByClassName("webkit-html-attribute-value")[0]);
-
-            return this._addNewAttribute();
-        }
-
-        if (this.representedObject.nodeType === Node.TEXT_NODE) {
-            var textNode = listItem.getElementsByClassName("webkit-html-text-node")[0];
-            if (textNode)
-                return this._startEditingTextNode(textNode);
-            return;
-        }
-    },
-
-    _addNewAttribute: function()
-    {
-        var attr = document.createElement("span");
-        attr.className = "webkit-html-attribute";
-        attr.style.marginLeft = "2px"; // overrides the .editing margin rule
-        attr.style.marginRight = "2px"; // overrides the .editing margin rule
-        var name = document.createElement("span");
-        name.className = "webkit-html-attribute-name new-attribute";
-        name.textContent = " ";
-        var value = document.createElement("span");
-        value.className = "webkit-html-attribute-value";
-        attr.appendChild(name);
-        attr.appendChild(value);
-
-        var tag = this.listItemElement.getElementsByClassName("webkit-html-tag")[0];
-        this._insertInLastAttributePosition(tag, attr);
-        return this._startEditingAttribute(attr, attr);
-    },
-
-    _triggerEditAttribute: function(attributeName)
-    {
-        var attributeElements = this.listItemElement.getElementsByClassName("webkit-html-attribute-name");
-        for (var i = 0, len = attributeElements.length; i < len; ++i) {
-            if (attributeElements[i].textContent === attributeName) {
-                for (var elem = attributeElements[i].nextSibling; elem; elem = elem.nextSibling) {
-                    if (elem.nodeType !== Node.ELEMENT_NODE)
-                        continue;
-
-                    if (elem.hasStyleClass("webkit-html-attribute-value"))
-                        return this._startEditingAttribute(attributeElements[i].parentNode, elem);
-                }
-            }
-        }
-    },
-
-    _startEditingAttribute: function(attribute, elementForSelection)
-    {
-        if (WebInspector.isBeingEdited(attribute))
-            return true;
-
-        var attributeNameElement = attribute.getElementsByClassName("webkit-html-attribute-name")[0];
-        if (!attributeNameElement)
-            return false;
-
-        var attributeName = attributeNameElement.innerText;
-
-        function removeZeroWidthSpaceRecursive(node)
-        {
-            if (node.nodeType === Node.TEXT_NODE) {
-                node.nodeValue = node.nodeValue.replace(/\u200B/g, "");
-                return;
-            }
-
-            if (node.nodeType !== Node.ELEMENT_NODE)
-                return;
-
-            for (var child = node.firstChild; child; child = child.nextSibling)
-                removeZeroWidthSpaceRecursive(child);
-        }
-
-        // Remove zero-width spaces that were added by nodeTitleInfo.
-        removeZeroWidthSpaceRecursive(attribute);
-
-        this._editing = true;
-
-        WebInspector.startEditing(attribute, this._attributeEditingCommitted.bind(this), this._editingCancelled.bind(this), attributeName);
-        window.getSelection().setBaseAndExtent(elementForSelection, 0, elementForSelection, 1);
-
-        return true;
-    },
-
-    _startEditingTextNode: function(textNode)
-    {
-        if (WebInspector.isBeingEdited(textNode))
-            return true;
-
-        this._editing = true;
-
-        WebInspector.startEditing(textNode, this._textNodeEditingCommitted.bind(this), this._editingCancelled.bind(this));
-        window.getSelection().setBaseAndExtent(textNode, 0, textNode, 1);
-
-        return true;
-    },
-
-    _startEditingAsHTML: function(commitCallback, initialValue)
-    {
-        if (this._htmlEditElement && WebInspector.isBeingEdited(this._htmlEditElement))
-            return true;
-
-        this._editing = true;
-
-        this._htmlEditElement = document.createElement("div");
-        this._htmlEditElement.className = "source-code elements-tree-editor";
-        this._htmlEditElement.textContent = initialValue;
-
-        // Hide header items.
-        var child = this.listItemElement.firstChild;
-        while (child) {
-            child.style.display = "none";
-            child = child.nextSibling;
-        }
-        // Hide children item.
-        if (this._childrenListNode)
-            this._childrenListNode.style.display = "none";
-        // Append editor.
-        this.listItemElement.appendChild(this._htmlEditElement);
-
-        this.updateSelection();
-
-        function commit()
-        {
-            commitCallback(this._htmlEditElement.textContent);
-            dispose.call(this);
-        }
-
-        function dispose()
-        {
-            delete this._editing;
-
-            // Remove editor.
-            this.listItemElement.removeChild(this._htmlEditElement);
-            delete this._htmlEditElement;
-            // Unhide children item.
-            if (this._childrenListNode)
-                this._childrenListNode.style.removeProperty("display");
-            // Unhide header items.
-            var child = this.listItemElement.firstChild;
-            while (child) {
-                child.style.removeProperty("display");
-                child = child.nextSibling;
-            }
-
-            this.updateSelection();
-        }
-
-        WebInspector.startEditing(this._htmlEditElement, commit.bind(this), dispose.bind(this), null, true);
-    },
-
-    _attributeEditingCommitted: function(element, newText, oldText, attributeName, moveDirection)
-    {
-        delete this._editing;
-
-        // Before we do anything, determine where we should move
-        // next based on the current element's settings
-        var moveToAttribute;
-        var newAttribute;
-        if (moveDirection) {
-            var found = false;
-            var attributes = this.representedObject.attributes;
-            for (var i = 0, len = attributes.length; i < len; ++i) {
-                if (attributes[i].name === attributeName) {
-                    found = true;
-                    if (moveDirection === "backward" && i > 0)
-                        moveToAttribute = attributes[i - 1].name;
-                    else if (moveDirection === "forward" && i < attributes.length - 1)
-                        moveToAttribute = attributes[i + 1].name;
-                    else if (moveDirection === "forward" && i === attributes.length - 1)
-                        newAttribute = true;
-                }
-            }
-
-            if (!found && moveDirection === "backward" && attributes.length > 0)
-                moveToAttribute = attributes[attributes.length - 1].name;
-            else if (!found && moveDirection === "forward" && !/^\s*$/.test(newText))
-                newAttribute = true;
-        }
-
-        function moveToNextAttributeIfNeeded() {
-            if (moveToAttribute)
-                this._triggerEditAttribute(moveToAttribute);
-            else if (newAttribute)
-                this._addNewAttribute(this.listItemElement);
-        }
-
-        var parseContainerElement = document.createElement("span");
-        parseContainerElement.innerHTML = "<span " + newText + "></span>";
-        var parseElement = parseContainerElement.firstChild;
-
-        if (!parseElement) {
-            this._editingCancelled(element, attributeName);
-            moveToNextAttributeIfNeeded.call(this);
-            return;
-        }
-
-        if (!parseElement.hasAttributes()) {
-            this.representedObject.removeAttribute(attributeName);
-            moveToNextAttributeIfNeeded.call(this);
-            return;
-        }
-
-        var foundOriginalAttribute = false;
-        for (var i = 0; i < parseElement.attributes.length; ++i) {
-            var attr = parseElement.attributes[i];
-            foundOriginalAttribute = foundOriginalAttribute || attr.name === attributeName;
-            try {
-                this.representedObject.setAttribute(attr.name, attr.value);
-            } catch(e) {} // ignore invalid attribute (innerHTML doesn't throw errors, but this can)
-        }
-
-        if (!foundOriginalAttribute)
-            this.representedObject.removeAttribute(attributeName);
-
-        this.treeOutline.focusedNodeChanged(true);
-
-        moveToNextAttributeIfNeeded.call(this);
-    },
-
-    _textNodeEditingCommitted: function(element, newText)
-    {
-        delete this._editing;
-
-        var textNode;
-        if (this.representedObject.nodeType == Node.ELEMENT_NODE) {
-            // We only show text nodes inline in elements if the element only
-            // has a single child, and that child is a text node.
-            textNode = this.representedObject.firstChild;
-        } else if (this.representedObject.nodeType == Node.TEXT_NODE)
-            textNode = this.representedObject;
-
-        textNode.nodeValue = newText;
-
-        // Need to restore attributes / node structure.
-        this._updateTitle();
-    },
-
-    _editingCancelled: function(element, context)
-    {
-        delete this._editing;
-
-        // Need to restore attributes structure.
-        this._updateTitle();
-    },
-
-    _updateTitle: function()
-    {
-        // If we are editing, return early to prevent canceling the edit.
-        // After editing is committed _updateTitle will be called.
-        if (this._editing)
-            return;
-
-        var self = this;
-        function callback(tooltipText)
-        {
-            var title = self._nodeTitleInfo(self.representedObject, self.hasChildren, WebInspector.linkifyURL, tooltipText).title;
-            self.title = "<span class=\"highlight\">" + title + "</span>";
-            delete self.selectionElement;
-            self.updateSelection();
-            self._preventFollowingLinksOnDoubleClick();
-        };
-
-        // TODO: Replace with InjectedScriptAccess.getBasicProperties(obj, [names]).
-        if (this.representedObject.nodeName.toLowerCase() !== "img")
-            callback();
-        else
-            this.createTooltipForImageNode(this.representedObject, callback);
-    },
-
-    _nodeTitleInfo: function(node, hasChildren, linkify, tooltipText)
-    {
-        var info = {title: "", hasChildren: hasChildren};
-        
-        switch (node.nodeType) {
-            case Node.DOCUMENT_NODE:
-                info.title = "Document";
-                break;
-                
-            case Node.ELEMENT_NODE:
-                info.title = "<span class=\"webkit-html-tag\">&lt;" + node.nodeName.toLowerCase().escapeHTML();
-                
-                if (node.hasAttributes()) {
-                    for (var i = 0; i < node.attributes.length; ++i) {
-                        var attr = node.attributes[i];
-                        info.title += " <span class=\"webkit-html-attribute\"><span class=\"webkit-html-attribute-name\">" + attr.name.escapeHTML() + "</span>=&#8203;\"";
-                        
-                        var value = attr.value;
-                        if (linkify && (attr.name === "src" || attr.name === "href")) {
-                            var value = value.replace(/([\/;:\)\]\}])/g, "$1\u200B");
-                            info.title += linkify(attr.value, value, "webkit-html-attribute-value", node.nodeName.toLowerCase() == "a", tooltipText);
-                        } else {
-                            var value = value.escapeHTML();
-                            value = value.replace(/([\/;:\)\]\}])/g, "$1&#8203;");
-                            info.title += "<span class=\"webkit-html-attribute-value\">" + value + "</span>";
-                        }
-                        info.title += "\"</span>";
-                    }
-                }
-                info.title += "&gt;</span>&#8203;";
-                
-                // If this element only has a single child that is a text node,
-                // just show that text and the closing tag inline rather than
-                // create a subtree for them
-                
-                var textChild = onlyTextChild.call(node);
-                var showInlineText = textChild && textChild.textContent.length < Preferences.maxInlineTextChildLength;
-                
-                if (showInlineText) {
-                    info.title += "<span class=\"webkit-html-text-node\">" + textChild.nodeValue.escapeHTML() + "</span>&#8203;<span class=\"webkit-html-tag\">&lt;/" + node.nodeName.toLowerCase().escapeHTML() + "&gt;</span>";
-                    info.hasChildren = false;
-                }
-                break;
-                
-            case Node.TEXT_NODE:
-                if (isNodeWhitespace.call(node))
-                    info.title = "(whitespace)";
-                else {
-                    if (node.parentNode && node.parentNode.nodeName.toLowerCase() == "script") {
-                        var newNode = document.createElement("span");
-                        newNode.textContent = node.textContent;
-
-                        var javascriptSyntaxHighlighter = new WebInspector.JavaScriptSourceSyntaxHighlighter(null, null);
-                        javascriptSyntaxHighlighter.syntaxHighlightNode(newNode);
-                        
-                        info.title = "<span class=\"webkit-html-text-node webkit-html-js-node\">" + newNode.innerHTML.replace(/^[\n\r]*/, "").replace(/\s*$/, "") + "</span>";
-                    } else if (node.parentNode && node.parentNode.nodeName.toLowerCase() == "style") {
-                        var newNode = document.createElement("span");
-                        newNode.textContent = node.textContent;
-                        
-                        var cssSyntaxHighlighter = new WebInspector.CSSSourceSyntaxHighlighter(null, null);
-                        cssSyntaxHighlighter.syntaxHighlightNode(newNode);
-                        
-                        info.title = "<span class=\"webkit-html-text-node webkit-html-css-node\">" + newNode.innerHTML.replace(/^[\n\r]*/, "").replace(/\s*$/, "") + "</span>";
-                    } else {
-                        info.title = "\"<span class=\"webkit-html-text-node\">" + node.nodeValue.escapeHTML() + "</span>\""; 
-                    }
-                } 
-                break;
-                
-            case Node.COMMENT_NODE:
-                info.title = "<span class=\"webkit-html-comment\">&lt;!--" + node.nodeValue.escapeHTML() + "--&gt;</span>";
-                break;
-                
-            case Node.DOCUMENT_TYPE_NODE:
-                info.title = "<span class=\"webkit-html-doctype\">&lt;!DOCTYPE " + node.nodeName;
-                if (node.publicId) {
-                    info.title += " PUBLIC \"" + node.publicId + "\"";
-                    if (node.systemId)
-                        info.title += " \"" + node.systemId + "\"";
-                } else if (node.systemId)
-                    info.title += " SYSTEM \"" + node.systemId + "\"";
-                if (node.internalSubset)
-                    info.title += " [" + node.internalSubset + "]";
-                info.title += "&gt;</span>";
-                break;
-            default:
-                info.title = node.nodeName.toLowerCase().collapseWhitespace().escapeHTML();
-        }
-        
-        return info;
-    },
-
-    _showInlineText: function(node)
-    {
-        if (node.nodeType === Node.ELEMENT_NODE) {
-            var textChild = onlyTextChild.call(node);
-            if (textChild && textChild.textContent.length < Preferences.maxInlineTextChildLength)
-                return true;
-        }
-        return false;
-    },
-    
-    remove: function()
-    {
-        var parentElement = this.parent;
-        if (!parentElement)
-            return;
-
-        var self = this;
-        function removeNodeCallback(removedNodeId)
-        {
-            // -1 is an error code, which means removing the node from the DOM failed,
-            // so we shouldn't remove it from the tree.
-            if (removedNodeId === -1)
-                return;
-
-            parentElement.removeChild(self);
-        }
-
-        var callId = WebInspector.Callback.wrap(removeNodeCallback);
-        InspectorBackend.removeNode(callId, this.representedObject.id);
-    },
-
-    _editAsHTML: function()
-    {
-        var treeOutline = this.treeOutline;
-        var node = this.representedObject;
-        var wasExpanded = this.expanded;
-
-        function selectNode(nodeId)
-        {
-            if (!nodeId)
-                return;
-
-            // Select it and expand if necessary. We force tree update so that it processes dom events and is up to date.
-            WebInspector.panels.elements.updateModifiedNodes();
-
-            WebInspector.updateFocusedNode(nodeId);
-            if (wasExpanded) {
-                var newTreeItem = treeOutline.findTreeElement(WebInspector.domAgent.nodeForId(nodeId));
-                if (newTreeItem)
-                    newTreeItem.expand();
-            }
-        }
-
-        function commitChange(value)
-        {
-            InjectedScriptAccess.setOuterHTML(node.id, value, wasExpanded, selectNode.bind(this));
-        }
-
-        InjectedScriptAccess.getNodePropertyValue(node.id, "outerHTML", this._startEditingAsHTML.bind(this, commitChange));
-    },
-
-    _copyHTML: function()
-    {
-        InspectorBackend.copyNode(this.representedObject.id);
-    }
-}
-
-WebInspector.ElementsTreeElement.prototype.__proto__ = TreeElement.prototype;
-
-WebInspector.didRemoveNode = WebInspector.Callback.processCallback;
-
-/* SidebarTreeElement.js */
-
-/*
- * Copyright (C) 2008 Apple Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. 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.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``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 APPLE INC. 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.
- */
-
-WebInspector.SidebarSectionTreeElement = function(title, representedObject, hasChildren)
-{
-    TreeElement.call(this, title.escapeHTML(), representedObject || {}, hasChildren);
-}
-
-WebInspector.SidebarSectionTreeElement.prototype = {
-    selectable: false,
-
-    get smallChildren()
-    {
-        return this._smallChildren;
-    },
-
-    set smallChildren(x)
-    {
-        if (this._smallChildren === x)
-            return;
-
-        this._smallChildren = x;
-
-        if (this._smallChildren)
-            this._childrenListNode.addStyleClass("small");
-        else
-            this._childrenListNode.removeStyleClass("small");
-    },
-
-    onattach: function()
-    {
-        this._listItemNode.addStyleClass("sidebar-tree-section");
-    },
-
-    onreveal: function()
-    {
-        if (this.listItemElement)
-            this.listItemElement.scrollIntoViewIfNeeded(false);
-    }
-}
-
-WebInspector.SidebarSectionTreeElement.prototype.__proto__ = TreeElement.prototype;
-
-WebInspector.SidebarTreeElement = function(className, title, subtitle, representedObject, hasChildren)
-{
-    TreeElement.call(this, "", representedObject || {}, hasChildren);
-
-    if (hasChildren) {
-        this.disclosureButton = document.createElement("button");
-        this.disclosureButton.className = "disclosure-button";
-    }
-
-    if (!this.iconElement) {
-        this.iconElement = document.createElement("img");
-        this.iconElement.className = "icon";
-    }
-
-    this.statusElement = document.createElement("div");
-    this.statusElement.className = "status";
-
-    this.titlesElement = document.createElement("div");
-    this.titlesElement.className = "titles";
-
-    this.titleElement = document.createElement("span");
-    this.titleElement.className = "title";
-    this.titlesElement.appendChild(this.titleElement);
-
-    this.subtitleElement = document.createElement("span");
-    this.subtitleElement.className = "subtitle";
-    this.titlesElement.appendChild(this.subtitleElement);
-
-    this.className = className;
-    this.mainTitle = title;
-    this.subtitle = subtitle;
-}
-
-WebInspector.SidebarTreeElement.prototype = {
-    get small()
-    {
-        return this._small;
-    },
-
-    set small(x)
-    {
-        this._small = x;
-
-        if (this._listItemNode) {
-            if (this._small)
-                this._listItemNode.addStyleClass("small");
-            else
-                this._listItemNode.removeStyleClass("small");
-        }
-    },
-
-    get mainTitle()
-    {
-        return this._mainTitle;
-    },
-
-    set mainTitle(x)
-    {
-        this._mainTitle = x;
-        this.refreshTitles();
-    },
-
-    get subtitle()
-    {
-        return this._subtitle;
-    },
-
-    set subtitle(x)
-    {
-        this._subtitle = x;
-        this.refreshTitles();
-    },
-
-    get bubbleText()
-    {
-        return this._bubbleText;
-    },
-
-    set bubbleText(x)
-    {
-        if (!this.bubbleElement) {
-            this.bubbleElement = document.createElement("div");
-            this.bubbleElement.className = "bubble";
-            this.statusElement.appendChild(this.bubbleElement);
-        }
-
-        this._bubbleText = x;
-        this.bubbleElement.textContent = x;
-    },
-
-    refreshTitles: function()
-    {
-        var mainTitle = this.mainTitle;
-        if (this.titleElement.textContent !== mainTitle)
-            this.titleElement.textContent = mainTitle;
-
-        var subtitle = this.subtitle;
-        if (subtitle) {
-            if (this.subtitleElement.textContent !== subtitle)
-                this.subtitleElement.textContent = subtitle;
-            this.titlesElement.removeStyleClass("no-subtitle");
-        } else
-            this.titlesElement.addStyleClass("no-subtitle");
-    },
-
-    isEventWithinDisclosureTriangle: function(event)
-    {
-        return event.target === this.disclosureButton;
-    },
-
-    onattach: function()
-    {
-        this._listItemNode.addStyleClass("sidebar-tree-item");
-
-        if (this.className)
-            this._listItemNode.addStyleClass(this.className);
-
-        if (this.small)
-            this._listItemNode.addStyleClass("small");
-
-        if (this.hasChildren && this.disclosureButton)
-            this._listItemNode.appendChild(this.disclosureButton);
-
-        this._listItemNode.appendChild(this.iconElement);
-        this._listItemNode.appendChild(this.statusElement);
-        this._listItemNode.appendChild(this.titlesElement);
-    },
-
-    onreveal: function()
-    {
-        if (this._listItemNode)
-            this._listItemNode.scrollIntoViewIfNeeded(false);
-    }
-}
-
-WebInspector.SidebarTreeElement.prototype.__proto__ = TreeElement.prototype;
-
-/* Section.js */
-
-/*
- * Copyright (C) 2007 Apple Inc.  All rights reserved.
- * Copyright (C) 2009 Google Inc.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  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.
- * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS 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 APPLE OR ITS 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.
- */
-
-WebInspector.Section = function(title, subtitle)
-{
-    this.element = document.createElement("div");
-    this.element.className = "section";
-
-    this.headerElement = document.createElement("div");
-    this.headerElement.className = "header";
-
-    this.titleElement = document.createElement("div");
-    this.titleElement.className = "title";
-
-    this.subtitleElement = document.createElement("div");
-    this.subtitleElement.className = "subtitle";
-
-    this.headerElement.appendChild(this.subtitleElement);
-    this.headerElement.appendChild(this.titleElement);
-
-    this.headerElement.addEventListener("click", this.toggleExpanded.bind(this), false);
-    this.element.appendChild(this.headerElement);
-
-    this.title = title;
-    this.subtitle = subtitle;
-    this._expanded = false;
-}
-
-WebInspector.Section.prototype = {
-    get title()
-    {
-        return this._title;
-    },
-
-    set title(x)
-    {
-        if (this._title === x)
-            return;
-        this._title = x;
-
-        if (x instanceof Node) {
-            this.titleElement.removeChildren();
-            this.titleElement.appendChild(x);
-        } else
-          this.titleElement.textContent = x;
-    },
-
-    get subtitle()
-    {
-        return this._subtitle;
-    },
-
-    set subtitle(x)
-    {
-        if (this._subtitle === x)
-            return;
-        this._subtitle = x;
-        this.subtitleElement.innerHTML = x;
-    },
-
-    get expanded()
-    {
-        return this._expanded;
-    },
-
-    set expanded(x)
-    {
-        if (x)
-            this.expand();
-        else
-            this.collapse();
-    },
-
-    get populated()
-    {
-        return this._populated;
-    },
-
-    set populated(x)
-    {
-        this._populated = x;
-        if (!x && this.onpopulate && this._expanded) {
-            this.onpopulate(this);
-            this._populated = true;
-        }
-    },
-
-    expand: function()
-    {
-        if (this._expanded)
-            return;
-        this._expanded = true;
-        this.element.addStyleClass("expanded");
-
-        if (!this._populated && this.onpopulate) {
-            this.onpopulate(this);
-            this._populated = true;
-        }
-    },
-
-    collapse: function()
-    {
-        if (!this._expanded)
-            return;
-        this._expanded = false;
-        this.element.removeStyleClass("expanded");
-    },
-
-    toggleExpanded: function()
-    {
-        this.expanded = !this.expanded;
-    }
-}
-
-/* PropertiesSection.js */
-
-/*
- * Copyright (C) 2007 Apple Inc.  All rights reserved.
- * Copyright (C) 2009 Google Inc.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  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.
- * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS 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 APPLE OR ITS 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.
- */
-
-WebInspector.PropertiesSection = function(title, subtitle)
-{
-    WebInspector.Section.call(this, title, subtitle);
-
-    this.propertiesElement = document.createElement("ol");
-    this.propertiesElement.className = "properties source-code";
-    this.propertiesElement.tabIndex = 0;
-    this.propertiesTreeOutline = new TreeOutline(this.propertiesElement);
-    this.propertiesTreeOutline.section = this;
-
-    this.element.appendChild(this.propertiesElement);
-}
-
-WebInspector.PropertiesSection.prototype.__proto__ = WebInspector.Section.prototype;
-
-/* ObjectProxy.js */
-
-/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
- *
- * Redistribution and use 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 Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * 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.
- */
-
-WebInspector.ObjectProxy = function(objectId, path, protoDepth, description, hasChildren)
-{
-    this.objectId = objectId;
-    this.path = path || [];
-    this.protoDepth = protoDepth || 0;
-    this.description = description;
-    this.hasChildren = hasChildren;
-}
-
-WebInspector.ObjectProxy.wrapPrimitiveValue = function(value)
-{
-    var proxy = new WebInspector.ObjectProxy();
-    proxy.type = typeof value;
-    proxy.description = value;
-    return proxy;
-}
-
-WebInspector.ObjectProxy.getPropertiesAsync = function(objectProxy, propertiesToQueryFor, callback)
-{
-    function createPropertiesMapThenCallback(propertiesPayload)
-    {
-        if (!propertiesPayload) {
-            callback();
-            return;
-        }
-
-        var result = [];
-        for (var i = 0; i < propertiesPayload.length; ++i)
-            if (propertiesToQueryFor.indexOf(propertiesPayload[i].name) !== -1)
-                result[propertiesPayload[i].name] = propertiesPayload[i].value.description;
-        callback(result);
-    };
-    InjectedScriptAccess.getProperties(objectProxy, true, false, createPropertiesMapThenCallback);
-}
-
-WebInspector.ObjectPropertyProxy = function(name, value)
-{
-    this.name = name;
-    this.value = value;
-}
-
-/* ObjectPropertiesSection.js */
-
-/*
- * Copyright (C) 2008 Apple Inc. All Rights Reserved.
- * Copyright (C) 2009 Joseph Pecoraro
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. 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.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``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 APPLE INC. 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.
- */
-
-WebInspector.ObjectPropertiesSection = function(object, title, subtitle, emptyPlaceholder, ignoreHasOwnProperty, extraProperties, treeElementConstructor)
-{
-    this.emptyPlaceholder = (emptyPlaceholder || WebInspector.UIString("No Properties"));
-    this.object = object;
-    this.ignoreHasOwnProperty = ignoreHasOwnProperty;
-    this.extraProperties = extraProperties;
-    this.treeElementConstructor = treeElementConstructor || WebInspector.ObjectPropertyTreeElement;
-    this.editable = true;
-
-    WebInspector.PropertiesSection.call(this, title, subtitle);
-}
-
-WebInspector.ObjectPropertiesSection.prototype = {
-    onpopulate: function()
-    {
-        this.update();
-    },
-
-    update: function()
-    {
-        var self = this;
-        var callback = function(properties) {
-            if (!properties)
-                return;
-            self.updateProperties(properties);
-        };
-        InjectedScriptAccess.getProperties(this.object, this.ignoreHasOwnProperty, true, callback);
-    },
-
-    updateProperties: function(properties, rootTreeElementConstructor, rootPropertyComparer)
-    {
-        if (!rootTreeElementConstructor)
-            rootTreeElementConstructor = this.treeElementConstructor;
-            
-        if (!rootPropertyComparer)
-            rootPropertyComparer = WebInspector.ObjectPropertiesSection.CompareProperties;
-            
-        if (this.extraProperties)
-            for (var i = 0; i < this.extraProperties.length; ++i)
-                properties.push(this.extraProperties[i]);
-                
-        properties.sort(rootPropertyComparer);
-
-        this.propertiesTreeOutline.removeChildren();
-
-        for (var i = 0; i < properties.length; ++i)
-            this.propertiesTreeOutline.appendChild(new rootTreeElementConstructor(properties[i]));
-
-        if (!this.propertiesTreeOutline.children.length) {
-            var title = "<div class=\"info\">" + this.emptyPlaceholder + "</div>";
-            var infoElement = new TreeElement(title, null, false);
-            this.propertiesTreeOutline.appendChild(infoElement);
-        }
-    }
-}
-
-WebInspector.ObjectPropertiesSection.prototype.__proto__ = WebInspector.PropertiesSection.prototype;
-
-WebInspector.ObjectPropertiesSection.CompareProperties = function(propertyA, propertyB) 
-{
-    var a = propertyA.name;
-    var b = propertyB.name;
-
-    // if used elsewhere make sure to
-    //  - convert a and b to strings (not needed here, properties are all strings)
-    //  - check if a == b (not needed here, no two properties can be the same)
-
-    var diff = 0;
-    var chunk = /^\d+|^\D+/;
-    var chunka, chunkb, anum, bnum;
-    while (diff === 0) {
-        if (!a && b)
-            return -1;
-        if (!b && a)
-            return 1;
-        chunka = a.match(chunk)[0];
-        chunkb = b.match(chunk)[0];
-        anum = !isNaN(chunka);
-        bnum = !isNaN(chunkb);
-        if (anum && !bnum)
-            return -1;
-        if (bnum && !anum)
-            return 1;
-        if (anum && bnum) {
-            diff = chunka - chunkb;
-            if (diff === 0 && chunka.length !== chunkb.length) {
-                if (!+chunka && !+chunkb) // chunks are strings of all 0s (special case)
-                    return chunka.length - chunkb.length;
-                else
-                    return chunkb.length - chunka.length;
-            }
-        } else if (chunka !== chunkb)
-            return (chunka < chunkb) ? -1 : 1;
-        a = a.substring(chunka.length);
-        b = b.substring(chunkb.length);
-    }
-    return diff;
-}
-
-WebInspector.ObjectPropertyTreeElement = function(property)
-{
-    this.property = property;
-
-    // Pass an empty title, the title gets made later in onattach.
-    TreeElement.call(this, "", null, false);
-}
-
-WebInspector.ObjectPropertyTreeElement.prototype = {
-    onpopulate: function()
-    {
-        if (this.children.length && !this.shouldRefreshChildren)
-            return;
-
-        var callback = function(properties) {
-            this.removeChildren();
-            if (!properties)
-                return;
-
-            properties.sort(WebInspector.ObjectPropertiesSection.CompareProperties);
-            for (var i = 0; i < properties.length; ++i) {
-                this.appendChild(new this.treeOutline.section.treeElementConstructor(properties[i]));
-            }
-        };
-        InjectedScriptAccess.getProperties(this.property.value, false, true, callback.bind(this));
-    },
-
-    ondblclick: function(event)
-    {
-        this.startEditing();
-    },
-
-    onattach: function()
-    {
-        this.update();
-    },
-
-    update: function()
-    {
-        this.nameElement = document.createElement("span");
-        this.nameElement.className = "name";
-        this.nameElement.textContent = this.property.name;
-
-        var separatorElement = document.createElement("span");
-        separatorElement.className = "separator";
-        separatorElement.textContent = ": ";
-        
-        this.valueElement = document.createElement("span");
-        this.valueElement.className = "value";
-        this.valueElement.textContent = this.property.value.description;
-        if (this.property.isGetter)
-           this.valueElement.addStyleClass("dimmed");
-
-        this.listItemElement.removeChildren();
-
-        this.listItemElement.appendChild(this.nameElement);
-        this.listItemElement.appendChild(separatorElement);
-        this.listItemElement.appendChild(this.valueElement);
-        this.hasChildren = this.property.value.hasChildren;
-    },
-
-    updateSiblings: function()
-    {
-        if (this.parent.root)
-            this.treeOutline.section.update();
-        else
-            this.parent.shouldRefreshChildren = true;
-    },
-
-    startEditing: function()
-    {
-        if (WebInspector.isBeingEdited(this.valueElement) || !this.treeOutline.section.editable)
-            return;
-
-        var context = { expanded: this.expanded };
-
-        // Lie about our children to prevent expanding on double click and to collapse subproperties.
-        this.hasChildren = false;
-
-        this.listItemElement.addStyleClass("editing-sub-part");
-
-        WebInspector.startEditing(this.valueElement, this.editingCommitted.bind(this), this.editingCancelled.bind(this), context);
-    },
-
-    editingEnded: function(context)
-    {
-        this.listItemElement.scrollLeft = 0;
-        this.listItemElement.removeStyleClass("editing-sub-part");
-        if (context.expanded)
-            this.expand();
-    },
-
-    editingCancelled: function(element, context)
-    {
-        this.update();
-        this.editingEnded(context);
-    },
-
-    editingCommitted: function(element, userInput, previousContent, context)
-    {
-        if (userInput === previousContent)
-            return this.editingCancelled(element, context); // nothing changed, so cancel
-
-        this.applyExpression(userInput, true);
-
-        this.editingEnded(context);
-    },
-
-    applyExpression: function(expression, updateInterface)
-    {
-        expression = expression.trimWhitespace();
-        var expressionLength = expression.length;
-        var self = this;
-        var callback = function(success) {
-            if (!updateInterface)
-                return;
-
-            if (!success)
-                self.update();
-
-            if (!expressionLength) {
-                // The property was deleted, so remove this tree element.
-                self.parent.removeChild(this);
-            } else {
-                // Call updateSiblings since their value might be based on the value that just changed.
-                self.updateSiblings();
-            }
-        };
-        InjectedScriptAccess.setPropertyValue(this.property.parentObjectProxy, this.property.name, expression.trimWhitespace(), callback);
-    }
-}
-
-WebInspector.ObjectPropertyTreeElement.prototype.__proto__ = TreeElement.prototype;
-
-/* BreakpointsSidebarPane.js */
-
-/*
- * Copyright (C) 2008 Apple Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. 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.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``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 APPLE INC. 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.
- */
-
-WebInspector.BreakpointsSidebarPane = function()
-{
-    WebInspector.SidebarPane.call(this, WebInspector.UIString("Breakpoints"));
-
-    this.breakpoints = {};
-
-    this.listElement = document.createElement("ol");
-    this.listElement.className = "breakpoint-list";
-
-    this.emptyElement = document.createElement("div");
-    this.emptyElement.className = "info";
-    this.emptyElement.textContent = WebInspector.UIString("No Breakpoints");
-
-    this.bodyElement.appendChild(this.emptyElement);
-}
-
-WebInspector.BreakpointsSidebarPane.prototype = {
-    addBreakpoint: function(breakpoint)
-    {
-        if (this.breakpoints[breakpoint.id])
-            return;
-
-        this.breakpoints[breakpoint.id] = breakpoint;
-
-        breakpoint.addEventListener("enabled", this._breakpointEnableChanged, this);
-        breakpoint.addEventListener("disabled", this._breakpointEnableChanged, this);
-        breakpoint.addEventListener("text-changed", this._breakpointTextChanged, this);
-
-        this._appendBreakpointElement(breakpoint);
-
-        if (this.emptyElement.parentElement) {
-            this.bodyElement.removeChild(this.emptyElement);
-            this.bodyElement.appendChild(this.listElement);
-        }
-
-        if (!InspectorBackend.debuggerEnabled() || !breakpoint.sourceID)
-            return;
-
-        if (breakpoint.enabled)
-            InspectorBackend.addBreakpoint(breakpoint.sourceID, breakpoint.line, breakpoint.condition);
-    },
-
-    _appendBreakpointElement: function(breakpoint)
-    {
-        function checkboxClicked(event)
-        {
-            breakpoint.enabled = !breakpoint.enabled;
-
-            // without this, we'd switch to the source of the clicked breakpoint
-            event.stopPropagation();
-        }
-
-        function breakpointClicked()
-        {
-            var script = WebInspector.panels.scripts.scriptOrResourceForID(breakpoint.sourceID);
-            if (script)
-                WebInspector.panels.scripts.showScript(script, breakpoint.line);
-        }
-
-        var breakpointElement = document.createElement("li");
-        breakpoint._breakpointListElement = breakpointElement;
-        breakpointElement._breakpointObject = breakpoint;
-        breakpointElement.addEventListener("click", breakpointClicked, false);
-
-        var checkboxElement = document.createElement("input");
-        checkboxElement.className = "checkbox-elem";
-        checkboxElement.type = "checkbox";
-        checkboxElement.checked = breakpoint.enabled;
-        checkboxElement.addEventListener("click", checkboxClicked, false);
-        breakpointElement.appendChild(checkboxElement);
-
-        var labelElement = document.createTextNode(breakpoint.label);
-        breakpointElement.appendChild(labelElement);
-
-        var sourceTextElement = document.createElement("div");
-        sourceTextElement.textContent = breakpoint.sourceText;
-        sourceTextElement.className = "source-text";
-        breakpointElement.appendChild(sourceTextElement);
-
-        var currentElement = this.listElement.firstChild;
-        while (currentElement) {
-            var currentBreak = currentElement._breakpointObject;
-            if (currentBreak.url > breakpoint.url) {
-                this.listElement.insertBefore(breakpointElement, currentElement);
-                return;
-            } else if (currentBreak.url == breakpoint.url && currentBreak.line > breakpoint.line) {
-                this.listElement.insertBefore(breakpointElement, currentElement);
-                return;
-            }
-            currentElement = currentElement.nextSibling;
-        }
-        this.listElement.appendChild(breakpointElement);
-    },
-
-    removeBreakpoint: function(breakpoint)
-    {
-        if (!this.breakpoints[breakpoint.id])
-            return;
-        delete this.breakpoints[breakpoint.id];
-
-        breakpoint.removeEventListener("enabled", null, this);
-        breakpoint.removeEventListener("disabled", null, this);
-        breakpoint.removeEventListener("text-changed", null, this);
-
-        var element = breakpoint._breakpointListElement;
-        element.parentElement.removeChild(element);
-
-        if (!this.listElement.firstChild) {
-            this.bodyElement.removeChild(this.listElement);
-            this.bodyElement.appendChild(this.emptyElement);
-        }
-
-        if (!InspectorBackend.debuggerEnabled() || !breakpoint.sourceID)
-            return;
-
-        InspectorBackend.removeBreakpoint(breakpoint.sourceID, breakpoint.line);
-    },
-
-    _breakpointEnableChanged: function(event)
-    {
-        var breakpoint = event.target;
-
-        var checkbox = breakpoint._breakpointListElement.firstChild;
-        checkbox.checked = breakpoint.enabled;
-
-        if (!InspectorBackend.debuggerEnabled() || !breakpoint.sourceID)
-            return;
-
-        if (breakpoint.enabled)
-            InspectorBackend.addBreakpoint(breakpoint.sourceID, breakpoint.line, breakpoint.condition);
-        else
-            InspectorBackend.removeBreakpoint(breakpoint.sourceID, breakpoint.line);
-    },
-
-    _breakpointTextChanged: function(event)
-    {
-        var breakpoint = event.target;
-
-        var sourceTextElement = breakpoint._breakpointListElement.firstChild.nextSibling.nextSibling;
-        sourceTextElement.textContent = breakpoint.sourceText;
-    }
-}
-
-WebInspector.BreakpointsSidebarPane.prototype.__proto__ = WebInspector.SidebarPane.prototype;
-
-/* CallStackSidebarPane.js */
-
-/*
- * Copyright (C) 2008 Apple Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. 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.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``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 APPLE INC. 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.
- */
-
-WebInspector.CallStackSidebarPane = function()
-{
-    WebInspector.SidebarPane.call(this, WebInspector.UIString("Call Stack"));
-    
-    this._shortcuts = {};
-
-    var shortcut = WebInspector.KeyboardShortcut.makeKey(WebInspector.KeyboardShortcut.KeyCodes.Period,
-                                                         WebInspector.KeyboardShortcut.Modifiers.Ctrl);
-    this._shortcuts[shortcut] = this._selectNextCallFrameOnStack.bind(this);
-
-    var shortcut = WebInspector.KeyboardShortcut.makeKey(WebInspector.KeyboardShortcut.KeyCodes.Comma,
-                                                         WebInspector.KeyboardShortcut.Modifiers.Ctrl);
-    this._shortcuts[shortcut] = this._selectPreviousCallFrameOnStack.bind(this);
-}
-
-WebInspector.CallStackSidebarPane.prototype = {
-    update: function(callFrames, sourceIDMap)
-    {
-        this.bodyElement.removeChildren();
-
-        this.placards = [];
-        delete this._selectedCallFrame;
-
-        if (!callFrames) {
-            var infoElement = document.createElement("div");
-            infoElement.className = "info";
-            infoElement.textContent = WebInspector.UIString("Not Paused");
-            this.bodyElement.appendChild(infoElement);
-            return;
-        }
-
-        var title;
-        var subtitle;
-        var scriptOrResource;
-
-        for (var i = 0; i < callFrames.length; ++i) {
-            var callFrame = callFrames[i];
-            switch (callFrame.type) {
-            case "function":
-                title = callFrame.functionName || WebInspector.UIString("(anonymous function)");
-                break;
-            case "program":
-                title = WebInspector.UIString("(program)");
-                break;
-            }
-
-            scriptOrResource = sourceIDMap[callFrame.sourceID];
-            subtitle = WebInspector.displayNameForURL(scriptOrResource.sourceURL || scriptOrResource.url);
-
-            if (callFrame.line > 0) {
-                if (subtitle)
-                    subtitle += ":" + callFrame.line;
-                else
-                    subtitle = WebInspector.UIString("line %d", callFrame.line);
-            }
-
-            var placard = new WebInspector.Placard(title, subtitle);
-            placard.callFrame = callFrame;
-
-            placard.element.addEventListener("click", this._placardSelected.bind(this), false);
-
-            this.placards.push(placard);
-            this.bodyElement.appendChild(placard.element);
-        }
-    },
-
-    get selectedCallFrame()
-    {
-        return this._selectedCallFrame;
-    },
-
-    set selectedCallFrame(x)
-    {
-        if (this._selectedCallFrame === x)
-            return;
-
-        this._selectedCallFrame = x;
-
-        for (var i = 0; i < this.placards.length; ++i) {
-            var placard = this.placards[i];
-            placard.selected = (placard.callFrame === this._selectedCallFrame);
-        }
-
-        this.dispatchEventToListeners("call frame selected");
-    },
-
-    handleShortcut: function(event)
-    {
-        var shortcut = WebInspector.KeyboardShortcut.makeKeyFromEvent(event);
-        var handler = this._shortcuts[shortcut];
-        if (handler) {
-            handler(event);
-            event.handled = true;
-        }
-    },
-
-    _selectNextCallFrameOnStack: function()
-    {
-        var index = this._selectedCallFrameIndex();
-        if (index == -1)
-            return;
-        this._selectedPlacardByIndex(index + 1);
-    },
-
-    _selectPreviousCallFrameOnStack: function()
-    {
-        var index = this._selectedCallFrameIndex();
-        if (index == -1)
-            return;
-        this._selectedPlacardByIndex(index - 1);
-    },
-
-    _selectedPlacardByIndex: function(index)
-    {
-        if (index < 0 || index >= this.placards.length)
-            return;
-        var placard = this.placards[index];
-        this.selectedCallFrame = placard.callFrame
-    },
-
-    _selectedCallFrameIndex: function()
-    {
-        if (!this._selectedCallFrame)
-            return -1;
-        for (var i = 0; i < this.placards.length; ++i) {
-            var placard = this.placards[i];
-            if (placard.callFrame === this._selectedCallFrame)
-                return i;
-        }
-        return -1;
-    },
-
-    _placardSelected: function(event)
-    {
-        var placardElement = event.target.enclosingNodeOrSelfWithClass("placard");
-        this.selectedCallFrame = placardElement.placard.callFrame;
-    }
-}
-
-WebInspector.CallStackSidebarPane.prototype.__proto__ = WebInspector.SidebarPane.prototype;
-
-/* ScopeChainSidebarPane.js */
-
-/*
- * Copyright (C) 2008 Apple Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. 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.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``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 APPLE INC. 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.
- */
-
-WebInspector.ScopeChainSidebarPane = function()
-{
-    WebInspector.SidebarPane.call(this, WebInspector.UIString("Scope Variables"));
-    this._expandedProperties = [];
-}
-
-WebInspector.ScopeChainSidebarPane.prototype = {
-    update: function(callFrame)
-    {
-        this.bodyElement.removeChildren();
-
-        this.sections = [];
-        this.callFrame = callFrame;
-
-        if (!callFrame) {
-            var infoElement = document.createElement("div");
-            infoElement.className = "info";
-            infoElement.textContent = WebInspector.UIString("Not Paused");
-            this.bodyElement.appendChild(infoElement);
-            return;
-        }
-
-        var foundLocalScope = false;
-        var scopeChain = callFrame.scopeChain;
-        for (var i = 0; i < scopeChain.length; ++i) {
-            var scopeObjectProxy = scopeChain[i];
-            var title = null;
-            var subtitle = scopeObjectProxy.description;
-            var emptyPlaceholder = null;
-            var extraProperties = null;
-
-            if (scopeObjectProxy.isLocal) {
-                foundLocalScope = true;
-                title = WebInspector.UIString("Local");
-                emptyPlaceholder = WebInspector.UIString("No Variables");
-                subtitle = null;
-                if (scopeObjectProxy.thisObject)
-                    extraProperties = [ new WebInspector.ObjectPropertyProxy("this", scopeObjectProxy.thisObject) ];
-            } else if (scopeObjectProxy.isClosure) {
-                title = WebInspector.UIString("Closure");
-                emptyPlaceholder = WebInspector.UIString("No Variables");
-                subtitle = null;
-            } else if (i === (scopeChain.length - 1))
-                title = WebInspector.UIString("Global");
-            else if (scopeObjectProxy.isElement)
-                title = WebInspector.UIString("Event Target");
-            else if (scopeObjectProxy.isDocument)
-                title = WebInspector.UIString("Event Document");
-            else if (scopeObjectProxy.isWithBlock)
-                title = WebInspector.UIString("With Block");
-
-            if (!title || title === subtitle)
-                subtitle = null;
-
-            var section = new WebInspector.ObjectPropertiesSection(scopeObjectProxy, title, subtitle, emptyPlaceholder, true, extraProperties, WebInspector.ScopeVariableTreeElement);
-            section.editInSelectedCallFrameWhenPaused = true;
-            section.pane = this;
-
-            if (!foundLocalScope || scopeObjectProxy.isLocal)
-                section.expanded = true;
-
-            this.sections.push(section);
-            this.bodyElement.appendChild(section.element);
-        }
-    }
-}
-
-WebInspector.ScopeChainSidebarPane.prototype.__proto__ = WebInspector.SidebarPane.prototype;
-
-WebInspector.ScopeVariableTreeElement = function(property)
-{
-    WebInspector.ObjectPropertyTreeElement.call(this, property);
-}
-
-WebInspector.ScopeVariableTreeElement.prototype = {
-    onattach: function()
-    {
-        WebInspector.ObjectPropertyTreeElement.prototype.onattach.call(this);
-        if (this.hasChildren && this.propertyIdentifier in this.treeOutline.section.pane._expandedProperties)
-            this.expand();
-    },
-
-    onexpand: function()
-    {
-        this.treeOutline.section.pane._expandedProperties[this.propertyIdentifier] = true;
-    },
-
-    oncollapse: function()
-    {
-        delete this.treeOutline.section.pane._expandedProperties[this.propertyIdentifier];
-    },
-
-    get propertyIdentifier()
-    {
-        if ("_propertyIdentifier" in this)
-            return this._propertyIdentifier;
-        var section = this.treeOutline.section;
-        this._propertyIdentifier = section.title + ":" + (section.subtitle ? section.subtitle + ":" : "") + this.propertyPath;
-        return this._propertyIdentifier;
-    },
-
-    get propertyPath()
-    {
-        if ("_propertyPath" in this)
-            return this._propertyPath;
-
-        var current = this;
-        var result;
-
-        do {
-            if (result)
-                result = current.property.name + "." + result;
-            else
-                result = current.property.name;
-            current = current.parent;
-        } while (current && !current.root);
-
-        this._propertyPath = result;
-        return result;
-    }
-}
-
-WebInspector.ScopeVariableTreeElement.prototype.__proto__ = WebInspector.ObjectPropertyTreeElement.prototype;
-
-/* WatchExpressionsSidebarPane.js */
-
-/*
- * Copyright (C) IBM Corp. 2009  All rights reserved.
- *
- * Redistribution and use 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 IBM Corp. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * 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.
- */
-
-WebInspector.WatchExpressionsSidebarPane = function()
-{
-    WebInspector.SidebarPane.call(this, WebInspector.UIString("Watch Expressions"));
-    WebInspector.settings.addEventListener("loaded", this._settingsLoaded, this);
-}
-
-WebInspector.WatchExpressionsSidebarPane.prototype = {
-    _settingsLoaded: function()
-    {
-        this.expanded = WebInspector.settings.watchExpressions.length > 0;
-        this.section = new WebInspector.WatchExpressionsSection();
-        this.bodyElement.appendChild(this.section.element);
-
-        var addElement = document.createElement("button");
-        addElement.setAttribute("type", "button");
-        addElement.textContent = WebInspector.UIString("Add");
-        addElement.addEventListener("click", this.section.addExpression.bind(this.section), false);
-
-        var refreshElement = document.createElement("button");
-        refreshElement.setAttribute("type", "button");
-        refreshElement.textContent = WebInspector.UIString("Refresh");
-        refreshElement.addEventListener("click", this.section.update.bind(this.section), false);
-
-        var centerElement = document.createElement("div");
-        centerElement.addStyleClass("watch-expressions-buttons-container");
-        centerElement.appendChild(addElement);
-        centerElement.appendChild(refreshElement);
-        this.bodyElement.appendChild(centerElement);
-
-        this.onexpand = this.refreshExpressions.bind(this);
-    },
-
-    refreshExpressions: function()
-    {
-        if (this.section)
-            this.section.update();
-    }
-}
-
-WebInspector.WatchExpressionsSidebarPane.prototype.__proto__ = WebInspector.SidebarPane.prototype;
-
-WebInspector.WatchExpressionsSection = function()
-{
-    this._watchObjectGroupId = "watch-group";
-
-    WebInspector.ObjectPropertiesSection.call(this);
-
-    this.watchExpressions = WebInspector.settings.watchExpressions;
-
-    this.headerElement.className = "hidden";
-    this.editable = true;
-    this.expanded = true;
-    this.propertiesElement.addStyleClass("watch-expressions");
-}
-
-WebInspector.WatchExpressionsSection.NewWatchExpression = "\xA0";
-
-WebInspector.WatchExpressionsSection.prototype = {
-    update: function()
-    {
-        function appendResult(expression, watchIndex, result, exception)
-        {
-            if (exception) {
-                // Exception results are not wrappers, but text messages.
-                result = WebInspector.ObjectProxy.wrapPrimitiveValue(result);
-            } else if (result.type === "string") {
-                // Evaluation result is intentionally not abbreviated. However, we'd like to distinguish between null and "null"
-                result.description = "\"" + result.description + "\"";
-            }
-
-            var property = new WebInspector.ObjectPropertyProxy(expression, result);
-            property.watchIndex = watchIndex;
-            property.isException = exception;
-
-            // For newly added, empty expressions, set description to "",
-            // since otherwise you get DOMWindow
-            if (property.name === WebInspector.WatchExpressionsSection.NewWatchExpression) 
-                property.value.description = "";
-
-            // To clarify what's going on here: 
-            // In the outer function, we calculate the number of properties
-            // that we're going to be updating, and set that in the
-            // propertyCount variable.  
-            // In this function, we test to see when we are processing the 
-            // last property, and then call the superclass's updateProperties() 
-            // method to get all the properties refreshed at once.
-            properties.push(property);
-            
-            if (properties.length == propertyCount) {
-                this.updateProperties(properties, WebInspector.WatchExpressionTreeElement, WebInspector.WatchExpressionsSection.CompareProperties);
-
-                // check to see if we just added a new watch expression,
-                // which will always be the last property
-                if (this._newExpressionAdded) {
-                    delete this._newExpressionAdded;
-
-                    treeElement = this.findAddedTreeElement();
-                    if (treeElement)
-                        treeElement.startEditing();
-                }
-            }
-        }
-
-        InspectorBackend.releaseWrapperObjectGroup(this._watchObjectGroupId)
-        var properties = [];
-
-        // Count the properties, so we known when to call this.updateProperties()
-        // in appendResult()
-        var propertyCount = 0;
-        for (var i = 0; i < this.watchExpressions.length; ++i) {
-            if (!this.watchExpressions[i]) 
-                continue;
-            ++propertyCount;
-        }
-
-        // Now process all the expressions, since we have the actual count,
-        // which is checked in the appendResult inner function.
-        for (var i = 0; i < this.watchExpressions.length; ++i) {
-            var expression = this.watchExpressions[i];
-            if (!expression)
-                continue;
-
-            WebInspector.console.evalInInspectedWindow("(" + expression + ")", this._watchObjectGroupId, appendResult.bind(this, expression, i));
-        }
-
-        // note this is setting the expansion of the tree, not the section;
-        // with no expressions, and expanded tree, we get some extra vertical
-        // white space
-        // FIXME: should change to use header buttons instead of the buttons
-        // at the bottom of the section, then we can add a "No Watch Expressions
-        // element when there are no watch expressions, and this issue should
-        // go away.
-        this.expanded = (propertyCount != 0);
-    },
-
-    addExpression: function()
-    {
-        this._newExpressionAdded = true;
-        this.watchExpressions.push(WebInspector.WatchExpressionsSection.NewWatchExpression);
-        this.update();
-    },
-
-    updateExpression: function(element, value)
-    {
-        this.watchExpressions[element.property.watchIndex] = value;
-        this.saveExpressions();
-        this.update();
-    },
-
-    findAddedTreeElement: function()
-    {
-        var children = this.propertiesTreeOutline.children;
-        for (var i = 0; i < children.length; ++i)
-            if (children[i].property.name === WebInspector.WatchExpressionsSection.NewWatchExpression)
-                return children[i];
-    },
-
-    saveExpressions: function()
-    {
-        var toSave = [];
-        for (var i = 0; i < this.watchExpressions.length; i++)
-            if (this.watchExpressions[i])
-                toSave.push(this.watchExpressions[i]);
-
-        WebInspector.settings.watchExpressions = toSave;
-        return toSave.length;
-    }
-}
-
-WebInspector.WatchExpressionsSection.prototype.__proto__ = WebInspector.ObjectPropertiesSection.prototype;
-
-WebInspector.WatchExpressionsSection.CompareProperties = function(propertyA, propertyB) 
-{
-    if (propertyA.watchIndex == propertyB.watchIndex)
-        return 0;
-    else if (propertyA.watchIndex < propertyB.watchIndex)
-        return -1;
-    else
-        return 1;
-}
-
-WebInspector.WatchExpressionTreeElement = function(property)
-{
-    WebInspector.ObjectPropertyTreeElement.call(this, property);
-}
-
-WebInspector.WatchExpressionTreeElement.prototype = {
-    update: function()
-    {
-        WebInspector.ObjectPropertyTreeElement.prototype.update.call(this);
-
-        if (this.property.isException)
-            this.valueElement.addStyleClass("watch-expressions-error-level");
-
-        var deleteButton = document.createElement("input");
-        deleteButton.type = "button";
-        deleteButton.title = WebInspector.UIString("Delete watch expression.");
-        deleteButton.addStyleClass("enabled-button");
-        deleteButton.addStyleClass("delete-button");
-        deleteButton.addEventListener("click", this._deleteButtonClicked.bind(this), false);
-
-        this.listItemElement.insertBefore(deleteButton, this.listItemElement.firstChild);
-    },
-
-    _deleteButtonClicked: function()
-    {
-        this.treeOutline.section.updateExpression(this, null);
-    },
-
-    startEditing: function()
-    {
-        if (WebInspector.isBeingEdited(this.nameElement) || !this.treeOutline.section.editable)
-            return;
-
-        this.nameElement.textContent = this.property.name.trimWhitespace();
-
-        var context = { expanded: this.expanded };
-
-        // collapse temporarily, if required
-        this.hasChildren = false;
-
-        this.listItemElement.addStyleClass("editing-sub-part");
-
-        WebInspector.startEditing(this.nameElement, this.editingCommitted.bind(this), this.editingCancelled.bind(this), context);
-    },
-
-    editingCancelled: function(element, context)
-    {
-        if (!this.nameElement.textContent)
-            this.treeOutline.section.updateExpression(this, null);
-            
-        this.update();
-        this.editingEnded(context);
-    },
-
-    applyExpression: function(expression, updateInterface)
-    {
-        expression = expression.trimWhitespace();
-
-        if (!expression)
-            expression = null;
-
-        this.property.name = expression;
-        this.treeOutline.section.updateExpression(this, expression);
-    }
-}
-
-WebInspector.WatchExpressionTreeElement.prototype.__proto__ = WebInspector.ObjectPropertyTreeElement.prototype;
-
-/* MetricsSidebarPane.js */
-
-/*
- * Copyright (C) 2007 Apple Inc.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  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.
- * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS 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 APPLE OR ITS 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.
- */
-
-WebInspector.MetricsSidebarPane = function()
-{
-    WebInspector.SidebarPane.call(this, WebInspector.UIString("Metrics"));
-    this._inlineStyleId = null;
-}
-
-WebInspector.MetricsSidebarPane.prototype = {
-    update: function(node)
-    {
-        if (node)
-            this.node = node;
-        else
-            node = this.node;
-
-        if (!node || !node.ownerDocument.defaultView || node.nodeType !== Node.ELEMENT_NODE) {
-            this.bodyElement.removeChildren();
-            return;
-        }
-
-        var self = this;
-        var callback = function(stylePayload) {
-            if (!stylePayload)
-                return;
-            var style = WebInspector.CSSStyleDeclaration.parseStyle(stylePayload);
-            self._update(style);
-        };
-        InjectedScriptAccess.getComputedStyle(node.id, callback);
-
-        var inlineStyleCallback = function(stylePayload) {
-            if (!stylePayload)
-                return;
-            self._inlineStyleId = stylePayload.id;
-        };
-        InjectedScriptAccess.getInlineStyle(node.id, inlineStyleCallback);
-    },
-
-    _update: function(style)
-    {
-        var metricsElement = document.createElement("div");
-        metricsElement.className = "metrics";
-
-        function createBoxPartElement(style, name, side, suffix)
-        {
-            var propertyName = (name !== "position" ? name + "-" : "") + side + suffix;
-            var value = style.getPropertyValue(propertyName);
-            if (value === "" || (name !== "position" && value === "0px"))
-                value = "\u2012";
-            else if (name === "position" && value === "auto")
-                value = "\u2012";
-            value = value.replace(/px$/, "");
-
-            var element = document.createElement("div");
-            element.className = side;
-            element.textContent = value;
-            element.addEventListener("dblclick", this.startEditing.bind(this, element, name, propertyName), false);
-            return element;
-        }
-
-        // Display types for which margin is ignored.
-        var noMarginDisplayType = {
-            "table-cell": true,
-            "table-column": true,
-            "table-column-group": true,
-            "table-footer-group": true,
-            "table-header-group": true,
-            "table-row": true,
-            "table-row-group": true
-        };
-
-        // Display types for which padding is ignored.
-        var noPaddingDisplayType = {
-            "table-column": true,
-            "table-column-group": true,
-            "table-footer-group": true,
-            "table-header-group": true,
-            "table-row": true,
-            "table-row-group": true
-        };
-
-        // Position types for which top, left, bottom and right are ignored.
-        var noPositionType = {
-            "static": true
-        };
-
-        var boxes = ["content", "padding", "border", "margin", "position"];
-        var boxLabels = [WebInspector.UIString("content"), WebInspector.UIString("padding"), WebInspector.UIString("border"), WebInspector.UIString("margin"), WebInspector.UIString("position")];
-        var previousBox;
-        for (var i = 0; i < boxes.length; ++i) {
-            var name = boxes[i];
-
-            if (name === "margin" && noMarginDisplayType[style.display])
-                continue;
-            if (name === "padding" && noPaddingDisplayType[style.display])
-                continue;
-            if (name === "position" && noPositionType[style.position])
-                continue;
-
-            var boxElement = document.createElement("div");
-            boxElement.className = name;
-
-            if (name === "content") {
-                var width = style.width.replace(/px$/, "");
-                var widthElement = document.createElement("span");
-                widthElement.textContent = width;
-                widthElement.addEventListener("dblclick", this.startEditing.bind(this, widthElement, "width", "width"), false);
-
-                var height = style.height.replace(/px$/, "");
-                var heightElement = document.createElement("span");
-                heightElement.textContent = height;
-                heightElement.addEventListener("dblclick", this.startEditing.bind(this, heightElement, "height", "height"), false);
-
-                boxElement.appendChild(widthElement);
-                boxElement.appendChild(document.createTextNode(" \u00D7 "));
-                boxElement.appendChild(heightElement);
-            } else {
-                var suffix = (name === "border" ? "-width" : "");
-
-                var labelElement = document.createElement("div");
-                labelElement.className = "label";
-                labelElement.textContent = boxLabels[i];
-