Bug 1039866 - Remove browser/metro. rs=gavin
authorKartikaya Gupta <kgupta@mozilla.com>
Thu, 23 Apr 2015 15:10:28 -0400
changeset 240760 f545b6dfa3da923617bd56e450321729be3be749
parent 240759 03b0f9b58e7e6aa212bdda944d3e8fbf91ecc2dd
child 240761 bf1d0c9242d9ac334c7f7521789840a7c711b418
push id58922
push userkgupta@mozilla.com
push dateThu, 23 Apr 2015 19:13:04 +0000
treeherdermozilla-inbound@bf1d0c9242d9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgavin
bugs1039866
milestone40.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1039866 - Remove browser/metro. rs=gavin
browser/metro/Makefile.in
browser/metro/base/content/BrowserTouchHandler.js
browser/metro/base/content/ContentAreaObserver.js
browser/metro/base/content/ContextCommands.js
browser/metro/base/content/ContextUI.js
browser/metro/base/content/NavButtonSlider.js
browser/metro/base/content/Site.js
browser/metro/base/content/TopSites.js
browser/metro/base/content/Util.js
browser/metro/base/content/WebProgress.js
browser/metro/base/content/appbar.js
browser/metro/base/content/apzc.js
browser/metro/base/content/bindings.css
browser/metro/base/content/bindings/appbar.xml
browser/metro/base/content/bindings/bindings.xml
browser/metro/base/content/bindings/browser.js
browser/metro/base/content/bindings/browser.xml
browser/metro/base/content/bindings/circularprogress.xml
browser/metro/base/content/bindings/console.xml
browser/metro/base/content/bindings/cssthrobber.xml
browser/metro/base/content/bindings/dialog.xml
browser/metro/base/content/bindings/flyoutpanel.xml
browser/metro/base/content/bindings/grid.xml
browser/metro/base/content/bindings/notification.xml
browser/metro/base/content/bindings/popup.xml
browser/metro/base/content/bindings/selectionoverlay.xml
browser/metro/base/content/bindings/tabprompts.xml
browser/metro/base/content/bindings/tabs.xml
browser/metro/base/content/bindings/toggleswitch.xml
browser/metro/base/content/bindings/urlbar.xml
browser/metro/base/content/bookmarks.js
browser/metro/base/content/browser-scripts.js
browser/metro/base/content/browser-ui.js
browser/metro/base/content/browser.js
browser/metro/base/content/browser.xul
browser/metro/base/content/commandUtil.js
browser/metro/base/content/console.js
browser/metro/base/content/contenthandlers/ConsoleAPIObserver.js
browser/metro/base/content/contenthandlers/Content.js
browser/metro/base/content/contenthandlers/ContextMenuHandler.js
browser/metro/base/content/contenthandlers/FormHelper.js
browser/metro/base/content/contenthandlers/PluginHelper.js
browser/metro/base/content/contenthandlers/SelectionHandler.js
browser/metro/base/content/cursor.css
browser/metro/base/content/dbg-metro-actors.js
browser/metro/base/content/downloads.js
browser/metro/base/content/exceptions.js
browser/metro/base/content/flyoutpanels/AboutFlyoutPanel.js
browser/metro/base/content/flyoutpanels/FlyoutPanelsUI.js
browser/metro/base/content/flyoutpanels/PrefsFlyoutPanel.js
browser/metro/base/content/flyoutpanels/SearchFlyoutPanel.js
browser/metro/base/content/flyoutpanels/SettingsCharm.js
browser/metro/base/content/flyoutpanels/SyncFlyoutPanel.js
browser/metro/base/content/helperui/AlertsHelper.js
browser/metro/base/content/helperui/ChromeSelectionHandler.js
browser/metro/base/content/helperui/FindHelperUI.js
browser/metro/base/content/helperui/FormHelperUI.js
browser/metro/base/content/helperui/IndexedDB.js
browser/metro/base/content/helperui/ItemPinHelper.js
browser/metro/base/content/helperui/MenuUI.js
browser/metro/base/content/helperui/OfflineApps.js
browser/metro/base/content/helperui/SelectHelperUI.js
browser/metro/base/content/helperui/SelectionHelperUI.js
browser/metro/base/content/input.js
browser/metro/base/content/jsshell/shell.html
browser/metro/base/content/jsshell/shell.xul
browser/metro/base/content/library/SelectionPrototype.js
browser/metro/base/content/pages/aboutAddons.xhtml
browser/metro/base/content/pages/aboutCertError.xhtml
browser/metro/base/content/pages/aboutRights.xhtml
browser/metro/base/content/pages/blockedSite.xhtml
browser/metro/base/content/pages/config.js
browser/metro/base/content/pages/config.xhtml
browser/metro/base/content/pages/crashprompt.xhtml
browser/metro/base/content/pages/netError.xhtml
browser/metro/base/content/sanitize.js
browser/metro/base/content/sanitizeUI.js
browser/metro/base/content/startui/BookmarksView.js
browser/metro/base/content/startui/FirstRunContentOverlay.xul
browser/metro/base/content/startui/FirstRunOverlay.xul
browser/metro/base/content/startui/HistoryView.js
browser/metro/base/content/startui/RemoteTabsView.js
browser/metro/base/content/startui/Start.xul
browser/metro/base/content/startui/StartUI.js
browser/metro/base/content/startui/TopSitesView.js
browser/metro/base/content/startui/startui-scripts.js
browser/metro/base/jar.mn
browser/metro/base/moz.build
browser/metro/base/tests/mochiperf/browser_apzc.js
browser/metro/base/tests/mochiperf/browser_deck_01.js
browser/metro/base/tests/mochiperf/browser_firstx.js
browser/metro/base/tests/mochiperf/browser_layers_01.js
browser/metro/base/tests/mochiperf/browser_miscgfx_01.js
browser/metro/base/tests/mochiperf/browser_msgmgr_01.js
browser/metro/base/tests/mochiperf/browser_tabs_01.js
browser/metro/base/tests/mochiperf/head.js
browser/metro/base/tests/mochiperf/metro.ini
browser/metro/base/tests/mochiperf/msgmanagerecho.js
browser/metro/base/tests/mochiperf/res/divs_test.html
browser/metro/base/tests/mochiperf/res/fx.png
browser/metro/base/tests/mochiperf/res/ripples.html
browser/metro/base/tests/mochiperf/res/scroll_test.html
browser/metro/base/tests/mochiperf/res/scroll_test_tall.html
browser/metro/base/tests/mochiperf/res/tide.mp4
browser/metro/base/tests/mochiperf/res/tidevideo.html
browser/metro/base/tests/mochitest/browser_apzc_basic.js
browser/metro/base/tests/mochitest/browser_bookmarks.js
browser/metro/base/tests/mochitest/browser_canonizeURL.js
browser/metro/base/tests/mochitest/browser_circular_progress_indicator.js
browser/metro/base/tests/mochitest/browser_colorUtils.js
browser/metro/base/tests/mochitest/browser_context_menu_tests.js
browser/metro/base/tests/mochitest/browser_context_menu_tests_01.html
browser/metro/base/tests/mochitest/browser_context_menu_tests_02.html
browser/metro/base/tests/mochitest/browser_context_menu_tests_03.html
browser/metro/base/tests/mochitest/browser_context_menu_tests_04.html
browser/metro/base/tests/mochitest/browser_context_menu_tests_05.html
browser/metro/base/tests/mochitest/browser_context_ui.js
browser/metro/base/tests/mochitest/browser_crashprompt.js
browser/metro/base/tests/mochitest/browser_downloads.js
browser/metro/base/tests/mochitest/browser_findbar.html
browser/metro/base/tests/mochitest/browser_findbar.js
browser/metro/base/tests/mochitest/browser_flyouts.js
browser/metro/base/tests/mochitest/browser_form_auto_complete.html
browser/metro/base/tests/mochitest/browser_form_auto_complete.js
browser/metro/base/tests/mochitest/browser_form_selects.html
browser/metro/base/tests/mochitest/browser_form_selects.js
browser/metro/base/tests/mochitest/browser_history.js
browser/metro/base/tests/mochitest/browser_inputsource.js
browser/metro/base/tests/mochitest/browser_link_click.html
browser/metro/base/tests/mochitest/browser_link_click.js
browser/metro/base/tests/mochitest/browser_menu_hoverstate.js
browser/metro/base/tests/mochitest/browser_mouse_events.js
browser/metro/base/tests/mochitest/browser_notifications.js
browser/metro/base/tests/mochitest/browser_onscreen_keyboard.html
browser/metro/base/tests/mochitest/browser_onscreen_keyboard.js
browser/metro/base/tests/mochitest/browser_prefs_ui.js
browser/metro/base/tests/mochitest/browser_private_browsing.js
browser/metro/base/tests/mochitest/browser_progress_indicator.xul
browser/metro/base/tests/mochitest/browser_prompt.js
browser/metro/base/tests/mochitest/browser_remotetabs.js
browser/metro/base/tests/mochitest/browser_selection_basic.html
browser/metro/base/tests/mochitest/browser_selection_basic.js
browser/metro/base/tests/mochitest/browser_selection_caretfocus.html
browser/metro/base/tests/mochitest/browser_selection_caretfocus.js
browser/metro/base/tests/mochitest/browser_selection_contenteditable.html
browser/metro/base/tests/mochitest/browser_selection_contenteditable.js
browser/metro/base/tests/mochitest/browser_selection_frame_content.html
browser/metro/base/tests/mochitest/browser_selection_frame_content.js
browser/metro/base/tests/mochitest/browser_selection_frame_in_scrollable_container.html
browser/metro/base/tests/mochitest/browser_selection_frame_in_scrollable_container.js
browser/metro/base/tests/mochitest/browser_selection_frame_inputs.html
browser/metro/base/tests/mochitest/browser_selection_frame_inputs.js
browser/metro/base/tests/mochitest/browser_selection_frame_textarea.html
browser/metro/base/tests/mochitest/browser_selection_frame_textarea.js
browser/metro/base/tests/mochitest/browser_selection_inputs.html
browser/metro/base/tests/mochitest/browser_selection_inputs.js
browser/metro/base/tests/mochitest/browser_selection_textarea.html
browser/metro/base/tests/mochitest/browser_selection_textarea.js
browser/metro/base/tests/mochitest/browser_selection_urlbar.js
browser/metro/base/tests/mochitest/browser_sessionstore.js
browser/metro/base/tests/mochitest/browser_snappedState.js
browser/metro/base/tests/mochitest/browser_tabs.js
browser/metro/base/tests/mochitest/browser_tabs_container.js
browser/metro/base/tests/mochitest/browser_test.js
browser/metro/base/tests/mochitest/browser_tilegrid.xul
browser/metro/base/tests/mochitest/browser_tiles.js
browser/metro/base/tests/mochitest/browser_topsites.js
browser/metro/base/tests/mochitest/browser_ui_telemetry.js
browser/metro/base/tests/mochitest/browser_urlbar.js
browser/metro/base/tests/mochitest/browser_urlbar_highlightURLs.js
browser/metro/base/tests/mochitest/browser_urlbar_trimURLs.js
browser/metro/base/tests/mochitest/head.js
browser/metro/base/tests/mochitest/helpers/BookmarksHelper.js
browser/metro/base/tests/mochitest/helpers/HistoryHelper.js
browser/metro/base/tests/mochitest/helpers/ViewStateHelper.js
browser/metro/base/tests/mochitest/metro.ini
browser/metro/base/tests/mochitest/res/blankpage1.html
browser/metro/base/tests/mochitest/res/blankpage2.html
browser/metro/base/tests/mochitest/res/blankpage3.html
browser/metro/base/tests/mochitest/res/documentindesignmode.html
browser/metro/base/tests/mochitest/res/image01.png
browser/metro/base/tests/mochitest/res/testEngine.xml
browser/metro/base/tests/mochitest/res/textarea01.html
browser/metro/base/tests/mochitest/res/textblock01.html
browser/metro/base/tests/mochitest/res/textdivs01.html
browser/metro/base/tests/mochitest/res/textinput01.html
browser/metro/base/tests/unit/blank.xhtml
browser/metro/base/tests/unit/test_util_extend.js
browser/metro/base/tests/unit/test_util_populateFragmentFromString.js
browser/metro/base/tests/unit/xpcshell.ini
browser/metro/components/AboutRedirector.js
browser/metro/components/AlertsService.js
browser/metro/components/BrowserCLH.js
browser/metro/components/BrowserStartup.js
browser/metro/components/ContentDispatchChooser.js
browser/metro/components/ContentPermissionPrompt.js
browser/metro/components/DirectoryProvider.js
browser/metro/components/DownloadManagerUI.js
browser/metro/components/HelperAppDialog.js
browser/metro/components/LoginManagerPrompter.js
browser/metro/components/PromptService.js
browser/metro/components/SafeBrowsing.js
browser/metro/components/SessionStore.idl
browser/metro/components/SessionStore.js
browser/metro/components/Sidebar.js
browser/metro/components/components.manifest
browser/metro/components/moz.build
browser/metro/defs.mk
browser/metro/locales/Makefile.in
browser/metro/locales/en-US/chrome/aboutAddons.dtd
browser/metro/locales/en-US/chrome/aboutCertError.dtd
browser/metro/locales/en-US/chrome/aboutPanel.dtd
browser/metro/locales/en-US/chrome/browser.dtd
browser/metro/locales/en-US/chrome/browser.properties
browser/metro/locales/en-US/chrome/checkbox.dtd
browser/metro/locales/en-US/chrome/config.dtd
browser/metro/locales/en-US/chrome/config.properties
browser/metro/locales/en-US/chrome/crashprompt.dtd
browser/metro/locales/en-US/chrome/passwordmgr.properties
browser/metro/locales/en-US/chrome/phishing.dtd
browser/metro/locales/en-US/chrome/preferences.dtd
browser/metro/locales/en-US/chrome/region.properties
browser/metro/locales/en-US/chrome/searchPanel.dtd
browser/metro/locales/en-US/chrome/sync.dtd
browser/metro/locales/en-US/chrome/sync.properties
browser/metro/locales/generic/profile/bookmarks.json.in
browser/metro/locales/import/Makefile.in
browser/metro/locales/import/moz.build
browser/metro/locales/jar.mn
browser/metro/locales/moz.build
browser/metro/metroapp.ini.in
browser/metro/modules/ContentUtil.jsm
browser/metro/modules/CrossSlide.jsm
browser/metro/modules/View.jsm
browser/metro/modules/colorUtils.jsm
browser/metro/modules/moz.build
browser/metro/moz.build
browser/metro/profile/metro.js
browser/metro/profile/moz.build
browser/metro/shell/Makefile.in
browser/metro/shell/commandexecutehandler/CEHHelper.cpp
browser/metro/shell/commandexecutehandler/CEHHelper.h
browser/metro/shell/commandexecutehandler/CommandExecuteHandler.cpp
browser/metro/shell/commandexecutehandler/CommandExecuteHandler.def
browser/metro/shell/commandexecutehandler/CommandExecuteHandler.exe.manifest
browser/metro/shell/commandexecutehandler/CommandExecuteHandler.rc
browser/metro/shell/commandexecutehandler/Makefile.in
browser/metro/shell/commandexecutehandler/moz.build
browser/metro/shell/linktool/linktool.cpp
browser/metro/shell/linktool/moz.build
browser/metro/shell/moz.build
browser/metro/shell/priconfig.xml
browser/metro/shell/resources.pri
browser/metro/shell/testing/metrotestharness.cpp
browser/metro/shell/testing/moz.build
browser/metro/shell/tileresources/Resources.resw
browser/metro/shell/tileresources/layout.resfiles
browser/metro/shell/tileresources/resources.resfiles
browser/metro/theme/about.css
browser/metro/theme/aboutAddons.css
browser/metro/theme/aboutPage.css
browser/metro/theme/browser.css
browser/metro/theme/circularprogress.css
browser/metro/theme/config.css
browser/metro/theme/content.css
browser/metro/theme/crashprompt.css
browser/metro/theme/cssthrobber.css
browser/metro/theme/defines.inc
browser/metro/theme/firstrun.css
browser/metro/theme/firstruncontent.css
browser/metro/theme/flyoutpanel.css
browser/metro/theme/images/aboutAddonsBackground.png
browser/metro/theme/images/aboutAddonsBackgroundFillSlice.png
browser/metro/theme/images/alert-downloads-30.png
browser/metro/theme/images/appbar-icons.png
browser/metro/theme/images/arrow-left-light.png
browser/metro/theme/images/arrow-left-light@1.4x.png
browser/metro/theme/images/arrow-left-light@1.8x.png
browser/metro/theme/images/arrow-left.png
browser/metro/theme/images/arrow-left@1.4x.png
browser/metro/theme/images/arrow-left@1.8x.png
browser/metro/theme/images/arrow-top-light.png
browser/metro/theme/images/arrow-top-light@1.4x.png
browser/metro/theme/images/arrow-top-light@1.8x.png
browser/metro/theme/images/arrow-top.png
browser/metro/theme/images/arrow-top@1.4x.png
browser/metro/theme/images/arrow-top@1.8x.png
browser/metro/theme/images/arrowbox-down-blue-filled.png
browser/metro/theme/images/arrowbox-down-blue-filled@2x.png
browser/metro/theme/images/arrowbox-horiz-blue-filled.png
browser/metro/theme/images/arrowbox-horiz-blue-filled@2x.png
browser/metro/theme/images/arrowdown-16.png
browser/metro/theme/images/arrowdowndark-16.png
browser/metro/theme/images/arrowleft-16.png
browser/metro/theme/images/arrowleftdark-16.png
browser/metro/theme/images/arrowright-16.png
browser/metro/theme/images/arrowrightdark-16.png
browser/metro/theme/images/arrowup-16.png
browser/metro/theme/images/arrowupdark-16.png
browser/metro/theme/images/autoscroll.png
browser/metro/theme/images/closetab-default.png
browser/metro/theme/images/errorpage-blocked-site.png
browser/metro/theme/images/errorpage-blocked-site@1.4x.png
browser/metro/theme/images/errorpage-blocked-site@1.8x.png
browser/metro/theme/images/errorpage-cert-untrusted.png
browser/metro/theme/images/errorpage-cert-untrusted@1.4x.png
browser/metro/theme/images/errorpage-cert-untrusted@1.8x.png
browser/metro/theme/images/errorpage-warning.png
browser/metro/theme/images/errorpage-warning@1.4x.png
browser/metro/theme/images/errorpage-warning@1.8x.png
browser/metro/theme/images/exitfullscreen-hdpi.png
browser/metro/theme/images/favicon-default-32.png
browser/metro/theme/images/firefox-watermark.png
browser/metro/theme/images/flyout-back-button.png
browser/metro/theme/images/fullscreen-hdpi.png
browser/metro/theme/images/icon-autocomplete-search.png
browser/metro/theme/images/icon-autocomplete-search@1.4x.png
browser/metro/theme/images/icon-autocomplete-search@1.8x.png
browser/metro/theme/images/icons-identity-firefox.png
browser/metro/theme/images/icons-identity-firefox@1.4x.png
browser/metro/theme/images/icons-identity-firefox@1.8x.png
browser/metro/theme/images/identity-icons-generic.png
browser/metro/theme/images/identity-icons-https-ev.png
browser/metro/theme/images/identity-icons-https-mixed.png
browser/metro/theme/images/identity-icons-https.png
browser/metro/theme/images/infobar-close.png
browser/metro/theme/images/infobar-geolocation.png
browser/metro/theme/images/infobar-key.png
browser/metro/theme/images/infobar-popup.png
browser/metro/theme/images/lock.png
browser/metro/theme/images/mute-hdpi.png
browser/metro/theme/images/navbar-back.png
browser/metro/theme/images/navbar-back@1.4x.png
browser/metro/theme/images/navbar-back@1.8x.png
browser/metro/theme/images/navbar-close.png
browser/metro/theme/images/navbar-close@1.4x.png
browser/metro/theme/images/navbar-close@1.8x.png
browser/metro/theme/images/navbar-contextual-clear.png
browser/metro/theme/images/navbar-contextual-clear@1.4x.png
browser/metro/theme/images/navbar-contextual-clear@1.8x.png
browser/metro/theme/images/navbar-contextual-delete.png
browser/metro/theme/images/navbar-contextual-delete@1.4x.png
browser/metro/theme/images/navbar-contextual-delete@1.8x.png
browser/metro/theme/images/navbar-contextual-hide.png
browser/metro/theme/images/navbar-contextual-hide@1.4x.png
browser/metro/theme/images/navbar-contextual-hide@1.8x.png
browser/metro/theme/images/navbar-contextual-pin.png
browser/metro/theme/images/navbar-contextual-pin@1.4x.png
browser/metro/theme/images/navbar-contextual-pin@1.8x.png
browser/metro/theme/images/navbar-contextual-restore.png
browser/metro/theme/images/navbar-contextual-restore@1.4x.png
browser/metro/theme/images/navbar-contextual-restore@1.8x.png
browser/metro/theme/images/navbar-contextual-unpin.png
browser/metro/theme/images/navbar-contextual-unpin@1.4x.png
browser/metro/theme/images/navbar-contextual-unpin@1.8x.png
browser/metro/theme/images/navbar-download-finished.png
browser/metro/theme/images/navbar-download-finished@1.4x.png
browser/metro/theme/images/navbar-download-finished@1.8x.png
browser/metro/theme/images/navbar-download.png
browser/metro/theme/images/navbar-download@1.4x.png
browser/metro/theme/images/navbar-download@1.8x.png
browser/metro/theme/images/navbar-forward.png
browser/metro/theme/images/navbar-forward@1.4x.png
browser/metro/theme/images/navbar-forward@1.8x.png
browser/metro/theme/images/navbar-menu.png
browser/metro/theme/images/navbar-menu@1.4x.png
browser/metro/theme/images/navbar-menu@1.8x.png
browser/metro/theme/images/navbar-pin.png
browser/metro/theme/images/navbar-pin@1.4x.png
browser/metro/theme/images/navbar-pin@1.8x.png
browser/metro/theme/images/navbar-star.png
browser/metro/theme/images/navbar-star@1.4x.png
browser/metro/theme/images/navbar-star@1.8x.png
browser/metro/theme/images/newtab-default.png
browser/metro/theme/images/overlay-back.png
browser/metro/theme/images/overlay-back@1.4x.png
browser/metro/theme/images/overlay-back@1.8x.png
browser/metro/theme/images/overlay-plus.png
browser/metro/theme/images/overlay-plus@1.4x.png
browser/metro/theme/images/overlay-plus@1.8x.png
browser/metro/theme/images/panel-dark.png
browser/metro/theme/images/pause-hdpi.png
browser/metro/theme/images/pinned-hdpi.png
browser/metro/theme/images/pinned.png
browser/metro/theme/images/play-hdpi.png
browser/metro/theme/images/plus-24.png
browser/metro/theme/images/plus-34.png
browser/metro/theme/images/popup-bg-hdpi.png
browser/metro/theme/images/popup-selected-item-hdpi.png
browser/metro/theme/images/progresscircle-bg.png
browser/metro/theme/images/progresscircle.png
browser/metro/theme/images/reader-plus-icon-xhdpi.png
browser/metro/theme/images/scrubber-hdpi.png
browser/metro/theme/images/search-clear-30.png
browser/metro/theme/images/search-glass-30.png
browser/metro/theme/images/search.png
browser/metro/theme/images/selection-monocle.png
browser/metro/theme/images/selection-monocle@1.4x.png
browser/metro/theme/images/selection-monocle@1.8x.png
browser/metro/theme/images/tab-arrows.png
browser/metro/theme/images/tab-crop.png
browser/metro/theme/images/tab-overlay.png
browser/metro/theme/images/textfield.png
browser/metro/theme/images/tile-selected-check-hdpi.png
browser/metro/theme/images/tile-selected-check-rtl-hdpi.png
browser/metro/theme/images/unmute-hdpi.png
browser/metro/theme/images/urlbar-go.png
browser/metro/theme/images/urlbar-go@1.4x.png
browser/metro/theme/images/urlbar-go@1.8x.png
browser/metro/theme/images/urlbar-reload.png
browser/metro/theme/images/urlbar-reload@1.4x.png
browser/metro/theme/images/urlbar-reload@1.8x.png
browser/metro/theme/images/urlbar-stop.png
browser/metro/theme/images/urlbar-stop@1.4x.png
browser/metro/theme/images/urlbar-stop@1.8x.png
browser/metro/theme/jar.mn
browser/metro/theme/moz.build
browser/metro/theme/netError.css
browser/metro/theme/platform.css
browser/metro/theme/start.css
browser/metro/theme/tiles.css
browser/metro/theme/touchcontrols.css
deleted file mode 100644
--- a/browser/metro/Makefile.in
+++ /dev/null
@@ -1,23 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-include $(topsrcdir)/config/rules.mk
-
-#########################################
-# application.ini
-
-GRE_BUILDID := $(shell cat $(DEPTH)/config/buildid)
-DEFINES += -DGRE_BUILDID=$(GRE_BUILDID) -DMOZ_APP_BASENAME=$(MOZ_APP_BASENAME)
-
-# 'application.ini' breaks firefox build config. So we use something different.
-metroapp.ini: metroapp.ini.in $(DEPTH)/config/buildid $(topsrcdir)/config/milestone.txt
-	$(RM) metroapp.ini
-	$(call py_action,preprocessor,$(DEFINES) $< -o $@)
-
-libs:: metroapp.ini
-	$(INSTALL) metroapp.ini $(FINAL_TARGET)
-
-#########################################
-
-GARBAGE += metroapp.ini
deleted file mode 100644
--- a/browser/metro/base/content/BrowserTouchHandler.js
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * BrowserTouchHandler
- *
- * Receives touch events from our input event capturing in input.js
- * and relays appropriate events to content. Also handles requests
- * from content for UI.
- */
-
-const BrowserTouchHandler = {
-  _debugEvents: false,
-
-  init: function init() {
-    // Misc. events we catch during the bubbling phase
-    document.addEventListener("PopupChanged", this, false);
-    document.addEventListener("CancelTouchSequence", this, false);
-
-    // Messages sent from content.js
-    messageManager.addMessageListener("Content:ContextMenu", this);
-    messageManager.addMessageListener("Content:SelectionCaret", this);
-  },
-
-  // Content forwarding the contextmenu command
-  _onContentContextMenu: function _onContentContextMenu(aMessage) {
-    // Note, target here is the target of the message manager message,
-    // usually the browser.
-    // Touch input selection handling
-    if (!InputSourceHelper.isPrecise &&
-        !SelectionHelperUI.isActive &&
-        SelectionHelperUI.canHandleContextMenuMsg(aMessage)) {
-      SelectionHelperUI.openEditSession(aMessage.target,
-                                        aMessage.json.xPos,
-                                        aMessage.json.yPos);
-      return;
-    }
-
-    // Check to see if we have context menu item(s) that apply to what
-    // was clicked on.
-    let contextInfo = { name: aMessage.name,
-                        json: aMessage.json,
-                        target: aMessage.target };
-    if (ContextMenuUI.showContextMenu(contextInfo)) {
-      let event = document.createEvent("Events");
-      event.initEvent("CancelTouchSequence", true, false);
-      document.dispatchEvent(event);
-    } else {
-      // Send the MozEdgeUIGesture to input.js to
-      // toggle the context ui.
-      let event = document.createEvent("Events");
-      event.initEvent("MozEdgeUICompleted", true, false);
-      window.dispatchEvent(event);
-    }
-  },
-
-  /*
-   * Called when Content wants to initiate selection management
-   * due to a tap in a form input.
-   */
-  _onCaretSelectionStarted: function _onCaretSelectionStarted(aMessage) {
-    SelectionHelperUI.attachToCaret(aMessage.target,
-                                    aMessage.json.xPos,
-                                    aMessage.json.yPos);
-  },
-
-  /*
-   * Events
-   */
-
-  handleEvent: function handleEvent(aEvent) {
-    // ignore content events we generate
-    if (aEvent.target == document)
-      return;
-
-    if (this._debugEvents)
-      Util.dumpLn("BrowserTouchHandler:", aEvent.type);
-
-    switch (aEvent.type) {
-      case "PopupChanged":
-      case "CancelTouchSequence":
-        if (!aEvent.detail)
-          ContextMenuUI.reset();
-        break;
-    }
-  },
-
-  receiveMessage: function receiveMessage(aMessage) {
-    if (this._debugEvents) Util.dumpLn("BrowserTouchHandler:", aMessage.name);
-    switch (aMessage.name) {
-      // Content forwarding the contextmenu command
-      case "Content:ContextMenu":
-        this._onContentContextMenu(aMessage);
-        break;
-      case "Content:SelectionCaret":
-        this._onCaretSelectionStarted(aMessage);
-        break;
-    }
-  },
-};
deleted file mode 100644
--- a/browser/metro/base/content/ContentAreaObserver.js
+++ /dev/null
@@ -1,361 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
- /*
-  * ContentAreaObserver manages tracking the viewable area within the browser.
-  * It also handles certain tasks like positioning of input elements within
-  * content when the viewable area changes.
-  *
-  * ContentAreaObserver creates styles that content can apply and also fires
-  * events when things change. The 'width' and 'height' properties of the
-  * styles are updated whenever various parts of the UI are resized.
-  *
-  *  styles: window-width, window-height
-  *  events: SizeChanged
-  *
-  *  The innerWidth/innerHeight of the main chrome window.
-  *
-  *  styles: content-width, content-height
-  *  events: ContentSizeChanged
-  *
-  *  The area of the window dedicated to web content; this is equal to the
-  *  innerWidth/Height minus any toolbars or similar chrome.
-  *
-  *  styles: viewable-width, viewable-height
-  *  events: ViewableSizeChanged
-  *
-  *  The portion of the content area that is not obscured by the on-screen
-  *  keyboard.
-  *
-  * ContentAreaObserver also manages soft keyboard related events. Events
-  * fired include:
-  *
-  *  KeyboardChanged - fired after the visibility of the soft keyboard changes
-  *  and after any view related changes are made to accomidate view dim
-  *  changes as a result.
-  *
-  *  MozDeckOffsetChanging, MozDeckOffsetChanged - interim events fired when
-  *  the browser deck is being repositioned to move focused elements out of
-  *  the way of the keyboard.
-  */
-
-var ContentAreaObserver = {
-  styles: {},
-  _shiftAmount: 0,
-  _deckTransitioning: false,
-
-  /*
-   * Properties
-   */
-
-  get width() {
-    return window.innerWidth || 1366;
-  },
-
-  get height() {
-    return window.innerHeight || 768;
-  },
-
-  get contentHeight() {
-    return this._getContentHeightForWindow(this.height);
-  },
-
-  get viewableHeight() {
-    return this._getViewableHeightForContent(this.contentHeight);
-  },
-
-  get isKeyboardOpened() {
-    return Services.metro.keyboardVisible;
-  },
-
-  get isKeyboardTransitioning() {
-    return this._deckTransitioning;
-  },
-
-  get viewstate() {
-    if (this.width < Services.prefs.getIntPref("browser.ui.snapped.maxWidth")) {
-      return "snapped";
-    }
-    return (this.height > this.width) ? "portrait" : "landscape";
-  },
-
-  /*
-   * Public apis
-   */
-
-  init: function init() {
-    window.addEventListener("resize", this, false);
-
-    // Message manager msgs we listen for
-    messageManager.addMessageListener("Content:RepositionInfoResponse", this);
-
-    // Observer msgs we listen for
-    Services.obs.addObserver(this, "metro_softkeyboard_shown", false);
-    Services.obs.addObserver(this, "metro_softkeyboard_hidden", false);
-
-    // setup initial values for browser form repositioning
-    this.shiftBrowserDeck(0);
-
-    // initialize our custom width and height styles
-    this._initStyles();
-
-    // apply default styling
-    this.update();
-  },
-
-  shutdown: function shutdown() {
-    messageManager.removeMessageListener("Content:RepositionInfoResponse", this);
-    Services.obs.removeObserver(this, "metro_softkeyboard_shown");
-    Services.obs.removeObserver(this, "metro_softkeyboard_hidden");
-  },
-
-  update: function cao_update (width, height) {
-    let oldWidth = parseInt(this.styles["window-width"].width);
-    let oldHeight = parseInt(this.styles["window-height"].height);
-
-    let newWidth = width || this.width;
-    let newHeight = height || this.height;
-
-    if (newHeight == oldHeight && newWidth == oldWidth) {
-      return;
-    }
-
-    this.styles["window-width"].width = newWidth + "px";
-    this.styles["window-width"].maxWidth = newWidth + "px";
-    this.styles["window-height"].height = newHeight + "px";
-    this.styles["window-height"].maxHeight = newHeight + "px";
-
-    this._updateViewState();
-
-    this.updateContentArea(newWidth, this._getContentHeightForWindow(newHeight));
-    this._dispatchBrowserEvent("SizeChanged");
-  },
-
-  updateContentArea: function cao_updateContentArea (width, height) {
-    let oldHeight = parseInt(this.styles["content-height"].height);
-    let oldWidth = parseInt(this.styles["content-width"].width);
-
-    let newWidth = width || this.width;
-    let newHeight = height || this.contentHeight;
-
-    if (newHeight == oldHeight && newWidth == oldWidth) {
-      return;
-    }
-
-    this.styles["content-height"].height = newHeight + "px";
-    this.styles["content-height"].maxHeight = newHeight + "px";
-    this.styles["content-width"].width = newWidth + "px";
-    this.styles["content-width"].maxWidth = newWidth + "px";
-
-    this.updateViewableArea(newWidth, this._getViewableHeightForContent(newHeight));
-    this._dispatchBrowserEvent("ContentSizeChanged");
-  },
-
-  updateViewableArea: function cao_updateViewableArea (width, height) {
-    let oldHeight = parseInt(this.styles["viewable-height"].height);
-    let oldWidth = parseInt(this.styles["viewable-width"].width);
-
-    let newWidth = width || this.width;
-    let newHeight = height || this.viewableHeight;
-
-    if (newHeight == oldHeight && newWidth == oldWidth) {
-      return;
-    }
-
-    this.styles["viewable-height"].height = newHeight + "px";
-    this.styles["viewable-height"].maxHeight = newHeight + "px";
-    this.styles["viewable-width"].width = newWidth + "px";
-    this.styles["viewable-width"].maxWidth = newWidth + "px";
-
-    this.updateAppBarPosition();
-
-    // Update the back/tab button states. If the keyboard is up
-    // these are hidden.
-    BrowserUI._updateButtons();
-
-    this._dispatchBrowserEvent("ViewableSizeChanged");
-  },
-
-  updateAppBarPosition: function updateAppBarPosition(aForceDown) {
-    // Adjust the app and find bar position above the soft keyboard
-    let keyboardHeight = aForceDown ? 0 : Services.metro.keyboardHeight;
-    Elements.navbar.style.bottom = keyboardHeight + "px";
-    Elements.contextappbar.style.bottom = keyboardHeight + "px";
-    Elements.findbar.style.bottom = keyboardHeight + "px";
-  },
-
-  /*
-   * Called by BrowserUI right before we blur the nav bar edit. We use
-   * this to get a head start on shuffling app bars around before the
-   * soft keyboard transitions down.
-   */
-  navBarWillBlur: function navBarWillBlur() {
-    this.updateAppBarPosition(true);
-  },
-
-  onBrowserCreated: function onBrowserCreated(aBrowser) {
-    let notificationBox = aBrowser.parentNode.parentNode;
-    notificationBox.classList.add("content-width");
-    notificationBox.classList.add("content-height");
-  },
-
-  /*
-   * Event handling
-   */
-
-  _onKeyboardDisplayChanging: function _onKeyboardDisplayChanging(aNewState) {
-    if (aNewState) {
-      Elements.stack.setAttribute("keyboardVisible", true);
-    } else {
-      Elements.stack.removeAttribute("keyboardVisible");
-    }
-
-    this.updateViewableArea();
-
-    if (!aNewState) {
-      this.shiftBrowserDeck(0);
-      return;
-    }
-
-    // Request info about the target form element to see if we
-    // need to reposition the browser above the keyboard.
-    if (SelectionHelperUI.layerMode === 2 /*kContentLayer*/) {
-      Browser.selectedBrowser.messageManager.sendAsyncMessage("Browser:RepositionInfoRequest", {
-        viewHeight: this.viewableHeight,
-      });
-    }
-  },
-
-  _onRepositionResponse: function _onRepositionResponse(aJsonMsg) {
-    if (!aJsonMsg.reposition || !this.isKeyboardOpened) {
-      this.shiftBrowserDeck(0);
-      return;
-    }
-    this.shiftBrowserDeck(aJsonMsg.raiseContent);
-  },
-
-  observe: function cao_observe(aSubject, aTopic, aData) {
-    // Note these are fired before the transition starts. Also per MS specs
-    // we should not do anything "heavy" here. We have about 100ms before
-    // windows just ignores the event and starts the animation.
-    switch (aTopic) {
-      case "metro_softkeyboard_hidden":
-      case "metro_softkeyboard_shown":
-        // Mark that we are in a transition state. Auto-complete and other
-        // popups will wait for an event before displaying anything.
-        this._deckTransitioning = true;
-        // This also insures tap events are delivered before we fire
-        // this event. Form repositioning requires the selection handler
-        // be running before we send this.
-        let self = this;
-        let state = aTopic == "metro_softkeyboard_shown";
-        Util.executeSoon(function () {
-          self._onKeyboardDisplayChanging(state);
-        });
-        break;
-    }
-  },
-
-  handleEvent: function cao_handleEvent(aEvent) {
-    switch (aEvent.type) {
-      case 'resize':
-        if (aEvent.target != window)
-          return;
-        ContentAreaObserver.update();
-        break;
-    }
-  },
-
-  receiveMessage: function sh_receiveMessage(aMessage) {
-    switch (aMessage.name) {
-      case "Content:RepositionInfoResponse":
-        this._onRepositionResponse(aMessage.json);
-        break;
-    }
-  },
-
-  /*
-   * Internal helpers
-   */
-
-  _updateViewState: function (aState) {
-    let oldViewstate = Elements.windowState.getAttribute("viewstate");
-    let viewstate = aState || this.viewstate;
-    if (viewstate != oldViewstate) {
-      Elements.windowState.setAttribute("viewstate", viewstate);
-      Services.obs.notifyObservers(null, "metro_viewstate_changed", viewstate);
-    }
-  },
-
-  shiftBrowserDeck: function (aAmount) {
-    if (aAmount == 0) {
-      this._deckTransitioning = false;
-      this._dispatchWindowEvent("KeyboardChanged", this.isKeyboardOpened);
-    }
-
-    if (this._shiftAmount == aAmount)
-      return;
-
-    this._shiftAmount = aAmount;
-    this._dispatchWindowEvent("MozDeckOffsetChanging", aAmount);
-
-    // Elements.browsers is the deck all browsers sit in
-    let self = this;
-    Elements.browsers.addEventListener("transitionend", function () {
-      Elements.browsers.removeEventListener("transitionend", arguments.callee, true);
-      self._deckTransitioning = false;
-      self._dispatchWindowEvent("MozDeckOffsetChanged", aAmount);
-      self._dispatchWindowEvent("KeyboardChanged", self.isKeyboardOpened);
-    }, true);
-
-    // selectAtPoint bug 858471
-    //Elements.browsers.style.transform = "translateY(" + (-1 * aAmount) + "px)";
-    Elements.browsers.style.marginTop = "" + (-1 * aAmount) + "px";
-  },
-
-  _dispatchWindowEvent: function _dispatchWindowEvent(aEventName, aDetail) {
-    let event = document.createEvent("UIEvents");
-    event.initUIEvent(aEventName, true, false, window, aDetail);
-    window.dispatchEvent(event);
-  },
-
-  _dispatchBrowserEvent: function (aName, aDetail) {
-    setTimeout(function() {
-      let event = document.createEvent("Events");
-      event.initEvent(aName, true, false);
-      Elements.browsers.dispatchEvent(event);
-    }, 0);
-  },
-
-  _initStyles: function _initStyles() {
-    let stylesheet = document.styleSheets[0];
-    for (let style of ["window-width", "window-height",
-                       "content-height", "content-width",
-                       "viewable-height", "viewable-width"]) {
-      let index = stylesheet.insertRule("." + style + " {}", stylesheet.cssRules.length);
-      this.styles[style] = stylesheet.cssRules[index].style;
-    }
-  },
-
-  _getContentHeightForWindow: function (windowHeight) {
-    return windowHeight;
-  },
-
-  _getViewableHeightForContent: function (contentHeight) {
-    let keyboardHeight = Services.metro.keyboardHeight;
-    return contentHeight - keyboardHeight;
-  },
-
-  _debugDumpDims: function _debugDumpDims() {
-    let width = parseInt(this.styles["window-width"].width);
-    let height = parseInt(this.styles["window-height"].height);
-    Util.dumpLn("window:", width, height);
-    width = parseInt(this.styles["content-width"].width);
-    height = parseInt(this.styles["content-height"].height);
-    Util.dumpLn("content:", width, height);
-    width = parseInt(this.styles["viewable-width"].width);
-    height = parseInt(this.styles["viewable-height"].height);
-    Util.dumpLn("viewable:", width, height);
-  }
-};
deleted file mode 100644
--- a/browser/metro/base/content/ContextCommands.js
+++ /dev/null
@@ -1,436 +0,0 @@
-// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
- /*
-  * context menu command handlers
-  */
-
-var ContextCommands = {
-  _picker: null,
-
-  get _ellipsis() {
-    delete this._ellipsis;
-    this._ellipsis = "\u2026";
-    try {
-      this._ellipsis = Services.prefs.getComplexValue("intl.ellipsis", Ci.nsIPrefLocalizedString).data;
-    } catch (ex) { }
-    return this._ellipsis;
-  },
-
-  get clipboard() {
-    return Cc["@mozilla.org/widget/clipboardhelper;1"]
-             .getService(Ci.nsIClipboardHelper);
-  },
-
-  get docRef() {
-    return Browser.selectedBrowser.contentWindow.document;
-  },
-
-  /*
-   * Context menu handlers
-   */
-
-  // Text specific
-
-  cut: function cc_cut() {
-    let target = ContextMenuUI.popupState.target;
-
-    if (!target) {
-      return;
-    }
-
-    if (target.localName === "browser") {
-      // content
-      if (ContextMenuUI.popupState.string) {
-        this.sendCommand("cut");
-
-        SelectionHelperUI.closeEditSession(true);
-      }
-    } else {
-      // chrome
-      CommandUpdater.doCommand("cmd_cut");
-    }
-
-    target.focus();
-  },
-
-  copy: function cc_copy() {
-    let target = ContextMenuUI.popupState.target;
-
-    if (!target) {
-      return;
-    }
-
-    if (target.localName == "browser") {
-      // content
-      if (ContextMenuUI.popupState.string) {
-        this.sendCommand("copy");
-      }
-    } else if (ContextMenuUI.popupState.string) {
-      this.clipboard.copyString(ContextMenuUI.popupState.string, this.docRef);
-    } else {
-      // chrome
-      CommandUpdater.doCommand("cmd_copy");
-    }
-
-    target.focus();
-  },
-
-  paste: function cc_paste() {
-    let target = ContextMenuUI.popupState.target;
-
-    if (!target) {
-      return;
-    }
-
-    if (target.localName == "browser") {
-      // content
-      let x = ContextMenuUI.popupState.x;
-      let y = ContextMenuUI.popupState.y;
-      let json = {x: x, y: y, command: "paste" };
-      target.messageManager.sendAsyncMessage("Browser:ContextCommand", json);
-    } else {
-      // chrome
-      CommandUpdater.doCommand("cmd_paste");
-      target.focus();
-    }
-    SelectionHelperUI.closeEditSession();
-  },
-
-  pasteAndGo: function cc_pasteAndGo() {
-    let target = ContextMenuUI.popupState.target;
-    target.editor.selectAll();
-    target.editor.paste(Ci.nsIClipboard.kGlobalClipboard);
-    BrowserUI.goToURI();
-  },
-
-  select: function cc_select() {
-    SelectionHelperUI.openEditSession(ContextMenuUI.popupState.target,
-                                      ContextMenuUI.popupState.xPos,
-                                      ContextMenuUI.popupState.yPos,
-                                      true);
-  },
-
-  selectAll: function cc_selectAll() {
-    let target = ContextMenuUI.popupState.target;
-    if (target.localName == "browser") {
-      // content
-      let x = ContextMenuUI.popupState.xPos;
-      let y = ContextMenuUI.popupState.yPos;
-      let json = {x: x, y: y, command: "select-all" };
-      target.messageManager.sendAsyncMessage("Browser:ContextCommand", json);
-      SelectionHelperUI.attachEditSession(target, x, y);
-    } else {
-      // chrome
-      target.editor.selectAll();
-      target.focus();
-    }
-  },
-
-  // called on display of the search text menu item
-  searchTextSetup: function cc_searchTextSetup(aRichListItem, aSearchString) {
-    let defaultURI;
-    let defaultName;
-    aSearchString = aSearchString.trim();
-    try {
-      let defaultPB = Services.prefs.getDefaultBranch(null);
-      const nsIPLS = Ci.nsIPrefLocalizedString;
-      defaultName = defaultPB.getComplexValue("browser.search.defaultenginename", nsIPLS).data;
-      let defaultEngine = Services.search.getEngineByName(defaultName);
-      defaultURI = defaultEngine.getSubmission(aSearchString).uri.spec;
-    } catch (ex) {
-      Cu.reportError(ex);
-      return false;
-    }
-    let displayString = aSearchString;
-    if (displayString.length > 15) {
-      displayString = displayString.substring(0, 15) + this._ellipsis;
-    }
-    // label child node
-    let label = Services.strings
-                        .createBundle("chrome://browser/locale/browser.properties")
-                        .formatStringFromName("browser.search.contextTextSearchLabel2",
-                                              [defaultName, displayString], 2);
-    aRichListItem.childNodes[0].setAttribute("value", label);
-    aRichListItem.setAttribute("searchString", defaultURI);
-    return true;
-  },
-
-  searchText: function cc_searchText(aRichListItem) {
-    let defaultURI = aRichListItem.getAttribute("searchString");
-    aRichListItem.childNodes[0].setAttribute("value", "");
-    aRichListItem.setAttribute("searchString", "");
-    BrowserUI.addAndShowTab(defaultURI, Browser.selectedTab);
-  },
-
-  // Link specific
-
-  openLinkInNewTab: function cc_openLinkInNewTab() {
-    let url = ContextMenuUI.popupState.linkURL;
-    BrowserUI.openLinkInNewTab(url, false, Browser.selectedTab);
-  },
-
-  copyLink: function cc_copyLink() {
-    this.clipboard.copyString(ContextMenuUI.popupState.linkURL,
-                              this.docRef);
-  },
-
-  bookmarkLink: function cc_bookmarkLink() {
-    let state = ContextMenuUI.popupState;
-    let uri = Util.makeURI(state.linkURL);
-    let title = state.linkTitle || state.linkURL;
-
-    try {
-      Bookmarks.addForURI(uri, title);
-    } catch (e) {
-      return;
-    }
-  },
-
-  // Image specific
-
-  saveImageToLib: function cc_saveImageToLib() {
-    this.saveToWinLibrary("Pict");
-  },
-
-  copyImage: function cc_copyImage() {
-    // copy to clibboard
-    this.sendCommand("copy-image-contents");
-  },
-
-  copyImageSrc: function cc_copyImageSrc() {
-    this.clipboard.copyString(ContextMenuUI.popupState.mediaURL,
-                              this.docRef);
-  },
-
-  openImageInNewTab: function cc_openImageInNewTab() {
-    BrowserUI.addAndShowTab(ContextMenuUI.popupState.mediaURL, Browser.selectedTab);
-  },
-
-  // Video specific
-
-  saveVideoToLib: function cc_saveVideoToLib() {
-    this.saveToWinLibrary("Vids");
-  },
-
-  copyVideoSrc: function cc_copyVideoSrc() {
-    this.clipboard.copyString(ContextMenuUI.popupState.mediaURL,
-                              this.docRef);
-  },
-
-  openVideoInNewTab: function cc_openVideoInNewTab() {
-    BrowserUI.addAndShowTab(ContextMenuUI.popupState.mediaURL, Browser.selectedTab);
-  },
-
-  // Bookmarks
-
-  editBookmark: function cc_editBookmark() {
-    let target = ContextMenuUI.popupState.target;
-    target.startEditing();
-  },
-
-  removeBookmark: function cc_removeBookmark() {
-    let target = ContextMenuUI.popupState.target;
-    target.remove();
-  },
-
-  // App bar
-
-  errorConsole: function cc_errorConsole() {
-    PanelUI.show("console-container");
-  },
-
-  jsShell: function cc_jsShell() {
-    // XXX for debugging, this only works when running on the desktop.
-    if (!Services.metro.immersive)
-      window.openDialog("chrome://browser/content/shell.xul", "_blank",
-                        "all=no,scrollbars=yes,resizable=yes,dialog=no");
-  },
-
-  findInPage: function cc_findInPage() {
-    FindHelperUI.show();
-  },
-
-  viewOnDesktop: function cc_viewOnDesktop() {
-    Appbar.onViewOnDesktop();
-  },
-
-  // Checks for MS app store specific meta data, and if present opens
-  // the Windows Store to the appropriate app
-  openWindowsStoreLink: function cc_openWindowsStoreLink() {
-    let storeLink = this.getStoreLink();
-    if (storeLink) {
-      Browser.selectedBrowser.contentWindow.document.location = storeLink;
-    }
-  },
-
-  getStoreLink: function cc_getStoreLink() {
-    let metaData = Browser.selectedBrowser.contentWindow.document.getElementsByTagName("meta");
-    let msApplicationName = metaData.namedItem("msApplication-PackageFamilyName");
-    if (msApplicationName) {
-      return "ms-windows-store:PDP?PFN=" + msApplicationName.getAttribute("content");
-    }
-    return null;
-  },
-
-  getPageSource: function cc_getPageSource() {
-    let uri = Services.io.newURI(Browser.selectedBrowser.currentURI.spec, null, null);
-    if (!uri.schemeIs("view-source")) {
-      return "view-source:" + Browser.selectedBrowser.currentURI.spec;
-    }
-    return null;
-  },
-
-  viewPageSource: function cc_viewPageSource() {
-    let uri = this.getPageSource();
-    if (uri) {
-      BrowserUI.addAndShowTab(uri, Browser.selectedTab);
-    }
-  },
-
-  /*
-   * Utilities
-   */
-
-  saveToWinLibrary: function cc_saveToWinLibrary(aType) {
-    let popupState = ContextMenuUI.popupState;
-    let browser = popupState.target;
-
-    // ContentAreaUtils internalSave relies on various desktop related prefs,
-    // values, and functionality. We want to be more direct by saving the
-    // image to the users Windows Library. If users want to specify the
-    // save location they can use the context menu option 'Save (type) To'.
-
-    let dirSvc = Components.classes["@mozilla.org/file/directory_service;1"]
-                           .getService(Components.interfaces.nsIProperties);
-    let saveLocationPath = dirSvc.get(aType, Components.interfaces.nsIFile);
-
-    let fileInfo = new ContentAreaUtils.FileInfo();
-    ContentAreaUtils.initFileInfo(fileInfo, popupState.mediaURL,
-                                  browser.documentURI.originCharset,
-                                  null, null, null);
-    let filename =
-      ContentAreaUtils.getNormalizedLeafName(fileInfo.fileName, fileInfo.fileExt);
-    saveLocationPath.append(filename);
-
-    // Start the background save process
-    ContentAreaUtils.internalPersist({
-      sourceURI         : fileInfo.uri,
-      sourceDocument    : null,
-      sourceReferrer    : browser.documentURI,
-      targetContentType : popupState.contentType,
-      targetFile        : saveLocationPath,
-      sourceCacheKey    : null,
-      sourcePostData    : null,
-      bypassCache       : false,
-      initiatingWindow  : this.docRef.defaultView
-    });
-  },
-
-  sendCommand: function sendCommand(aCommand) {
-    // Send via message manager over to ContextMenuHandler
-    let browser = ContextMenuUI.popupState.target;
-    browser.messageManager.sendAsyncMessage("Browser:ContextCommand", { command: aCommand });
-  },
-
-  /*
-   * isAccessibleDirectory
-   *
-   * Test to see if the directory exists and is writable.
-   */
-  isAccessibleDirectory: function isAccessibleDirectory(aDirectory) {
-    return aDirectory && aDirectory.exists() && aDirectory.isDirectory() &&
-           aDirectory.isWritable();
-  },
-
-  /*
-   * saveFileAs
-   *
-   * Browse for a location and then save a file to the local system using
-   * standard download prefs.
-   *
-   * @param aFileUriString path to file
-   */
-  saveFileAs: function saveFileAs(aPopupState) {
-    let srcUri = null;
-    let mediaURL = aPopupState.mediaURL;
-    try {
-      srcUri = Util.makeURI(mediaURL, null, null);
-    } catch (ex) {
-      Util.dumpLn("could not parse:", mediaURL);
-      return;
-    }
-
-    let picker = Cc["@mozilla.org/filepicker;1"].createInstance(Ci.nsIFilePicker);
-    let windowTitle = Strings.browser.GetStringFromName("browserForSaveLocation");
-
-    picker.init(window, windowTitle, Ci.nsIFilePicker.modeSave);
-
-    // prefered filename
-    let fileName = mediaURL.substring(mediaURL.lastIndexOf("/") + 1);
-    if (fileName.length)
-      picker.defaultString = fileName;
-
-    // prefered file extension
-    let fileExtension = mediaURL.substring(mediaURL.lastIndexOf(".") + 1);
-    if (fileExtension.length)
-      picker.defaultExtension = fileExtension;
-    picker.appendFilters(Ci.nsIFilePicker.filterImages);
-
-    // prefered save location
-    Task.spawn(function() {
-      let preferredDir = yield Downloads.getPreferredDownloadsDirectory();
-      picker.displayDirectory = new FileUtils.File(preferredDir);
-
-      try {
-        let lastDir = Services.prefs.getComplexValue("browser.download.lastDir", Ci.nsILocalFile);
-        if (this.isAccessibleDirectory(lastDir))
-          picker.displayDirectory = lastDir;
-      }
-      catch (e) { }
-
-      this._picker = picker;
-      this._pickerUrl = mediaURL;
-      this._pickerContentDisp = aPopupState.contentDisposition;
-      this._contentType = aPopupState.contentType;
-      picker.open(ContextCommands);
-    }.bind(this));
-  },
-
-  /*
-   * Filepicker callback
-   */
-  done: function done(aSuccess) {
-    let picker = this._picker;
-    this._picker = null;
-
-    if (aSuccess == Ci.nsIFilePicker.returnCancel)
-      return;
-
-    let file = picker.file;
-    if (file == null)
-      return;
-
-    try {
-      if (file.exists())
-        file.remove(false);
-    } catch (e) {}
-
-    ContentAreaUtils.internalSave(this._pickerUrl, null, null,
-                                  this._pickerContentDisp,
-                                  this._contentType, false, "SaveImageTitle",
-                                  new AutoChosen(file, Util.makeURI(this._pickerUrl, null, null)),
-                                  getBrowser().documentURI, this.docRef, true, null);
-
-    var newDir = file.parent.QueryInterface(Ci.nsILocalFile);
-    Services.prefs.setComplexValue("browser.download.lastDir", Ci.nsILocalFile, newDir);
-  },
-};
-
-function AutoChosen(aFileAutoChosen, aUriAutoChosen) {
-  this.file = aFileAutoChosen;
-  this.uri  = aUriAutoChosen;
-}
-
deleted file mode 100644
--- a/browser/metro/base/content/ContextUI.js
+++ /dev/null
@@ -1,399 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-// Fired when the tabtray is displayed
-const kContextUITabsShowEvent = "MozContextUITabsShow";
-// add more as needed...
-
-/*
- * Manages context UI (navbar, tabbar, appbar) and track visibility. Also
- * tracks events that summon and hide the context UI.
- */
-var ContextUI = {
-  _expandable: true,
-  _hidingId: 0,
-
-  /*******************************************
-   * init
-   */
-
-  init: function init() {
-    Elements.browsers.addEventListener('URLChanged', this, true);
-    Elements.browsers.addEventListener("AlertActive", this, true);
-    Elements.browsers.addEventListener("AlertClose", this, true);
-    Elements.tabList.addEventListener('TabSelect', this, true);
-    Elements.panelUI.addEventListener('ToolPanelShown', this, false);
-    Elements.panelUI.addEventListener('ToolPanelHidden', this, false);
-
-    Elements.tray.addEventListener("mousemove", this, false);
-    Elements.tray.addEventListener("mouseleave", this, false);
-
-    window.addEventListener("touchstart", this, true);
-    window.addEventListener("mousedown", this, true);
-    window.addEventListener("MozEdgeUIStarted", this, true);
-    window.addEventListener("MozEdgeUICanceled", this, true);
-    window.addEventListener("MozEdgeUICompleted", this, true);
-    window.addEventListener("keypress", this, true);
-    window.addEventListener("KeyboardChanged", this, false);
-    window.addEventListener("MozFlyoutPanelShowing", this, false);
-
-    Elements.tray.addEventListener("transitionend", this, true);
-
-    Appbar.init();
-  },
-
-  /*******************************************
-   * Context UI state getters & setters
-   */
-
-  // any visiblilty
-  get isVisible() {
-    return this.navbarVisible || this.tabbarVisible || this.contextAppbarVisible;
-  },
-
-  // navbar visiblilty
-  get navbarVisible() {
-    return (Elements.navbar.hasAttribute("visible") ||
-            Elements.navbar.hasAttribute("startpage"));
-  },
-
-  // tabbar visiblilty
-  get tabbarVisible() {
-    return Elements.tray.hasAttribute("expanded");
-  },
-
-  // appbar visiblilty
-  get contextAppbarVisible() {
-    return Elements.contextappbar.isShowing;
-  },
-
-  // currently not in use, for the always show tabs feature
-  get isExpandable() { return this._expandable; },
-  set isExpandable(aFlag) {
-    this._expandable = aFlag;
-    if (!this._expandable)
-      this.dismiss();
-  },
-
-  /*******************************************
-   * Public api
-   */
-
-  /*
-   * Toggle the current nav UI state. Fires context ui events.
-   */
-  toggleNavUI: function () {
-    // The navbar is forced open when the start page is visible. appbar.js
-    // controls the "visible" property, and browser-ui controls the "startpage"
-    // property. Hence we rely on the tabbar for current toggle state.
-    if (this.tabbarVisible) {
-      this.dismiss();
-    } else {
-      this.displayNavUI();
-    }
-  },
-
-  /*
-   * Show the nav and tabs bar. Returns true if any non-visible UI
-   * was shown. Fires context ui events.
-   */
-  displayNavUI: function () {
-    let shown = false;
-
-    if (!this.navbarVisible) {
-      BrowserUI.updateURI();
-      this.displayNavbar();
-      shown = true;
-    }
-
-    if (!this.tabbarVisible) {
-      this.displayTabs();
-      shown = true;
-    }
-
-    if (shown) {
-      ContentAreaObserver.updateContentArea();
-    }
-
-    return shown;
-  },
-
-  /*
-   * Dismiss any context UI currently visible. Returns true if any
-   * visible UI was dismissed. Fires context ui events.
-   */
-  dismiss: function () {
-    let dismissed = false;
-
-    this._clearDelayedTimeout();
-
-    // No assurances this will hide the nav bar. It may have the
-    // 'startpage' property set. This removes the 'visible' property.
-    if (this.navbarVisible) {
-      BrowserUI.blurNavBar();
-      this.dismissNavbar();
-      dismissed = true;
-    }
-    if (this.tabbarVisible) {
-      this.dismissTabs();
-      dismissed = true;
-    }
-    if (Elements.contextappbar.isShowing) {
-      this.dismissContextAppbar();
-      dismissed = true;
-    }
-
-    if (dismissed) {
-      ContentAreaObserver.updateContentArea();
-    }
-
-    return dismissed;
-  },
-
-  /*
-   * Briefly show the tab bar and then hide it. Fires context ui events.
-   */
-  peekTabs: function peekTabs(aDelay) {
-    if (!this.tabbarVisible)
-      this.displayTabs();
-
-    ContextUI.dismissTabsWithDelay(aDelay);
-  },
-
-  /*
-   * Dismiss tab bar after a delay. Fires context ui events.
-   */
-  dismissTabsWithDelay: function (aDelay) {
-    aDelay = aDelay || kForegroundTabAnimationDelay;
-    this._clearDelayedTimeout();
-    this._lastTimeoutDelay = aDelay;
-    this._hidingId = setTimeout(function () {
-        ContextUI.dismissTabs();
-      }, aDelay);
-  },
-
-  /*
-   * Display the nav bar.
-   *
-   * @return false if we were already visible, and didn't do anything.
-   */
-  displayNavbar: function () {
-    if (Elements.chromeState.getAttribute("navbar") == "visible") {
-      return false;
-    }
-
-    Elements.navbar.show();
-    Elements.chromeState.setAttribute("navbar", "visible");
-    ContentAreaObserver.updateContentArea();
-    return true;
-  },
-
-  // Display the tab tray
-  displayTabs: function () {
-    this._clearDelayedTimeout();
-    this._setIsExpanded(true);
-  },
-
-  // Dismiss the navbar if visible.
-  dismissNavbar: function dismissNavbar() {
-    if (!BrowserUI.isStartTabVisible) {
-      Elements.autocomplete.closePopup();
-      Elements.navbar.dismiss();
-      Elements.chromeState.removeAttribute("navbar");
-      ContentAreaObserver.updateContentArea();
-    }
-  },
-
-  // Dismiss the tabstray if visible.
-  dismissTabs: function dimissTabs() {
-    this._clearDelayedTimeout();
-    this._setIsExpanded(false);
-  },
-
-  // Dismiss the appbar if visible.
-  dismissContextAppbar: function dismissContextAppbar() {
-    Elements.contextappbar.dismiss();
-  },
-
-  /*******************************************
-   * Internal utils
-   */
-
-  // tabtray state
-  _setIsExpanded: function _setIsExpanded(aFlag, setSilently) {
-    // if the tray can't be expanded, don't expand it.
-    if (!this.isExpandable || this.tabbarVisible == aFlag)
-      return;
-
-    if (aFlag)
-      Elements.tray.setAttribute("expanded", "true");
-    else
-      Elements.tray.removeAttribute("expanded");
-
-    if (!setSilently)
-      this._fire(kContextUITabsShowEvent);
-  },
-
-  _clearDelayedTimeout: function _clearDelayedTimeout() {
-    if (this._hidingId) {
-      clearTimeout(this._hidingId);
-      this._hidingId = 0;
-      this._delayedHide = false;
-    }
-  },
-
-  _resetDelayedTimeout: function () {
-    this._hidingId = setTimeout(function () {
-        ContextUI.dismissTabs();
-      }, this._lastTimeoutDelay);
-  },
-
-  /*******************************************
-   * Events
-   */
-
-  _onEdgeUIStarted: function(aEvent) {
-    this._hasEdgeSwipeStarted = true;
-    this._clearDelayedTimeout();
-    this.toggleNavUI();
-  },
-
-  _onEdgeUICanceled: function(aEvent) {
-    this._hasEdgeSwipeStarted = false;
-    this.dismiss();
-  },
-
-  _onEdgeUICompleted: function(aEvent) {
-    if (this._hasEdgeSwipeStarted) {
-      this._hasEdgeSwipeStarted = false;
-      return;
-    }
-
-    this._clearDelayedTimeout();
-    this.toggleNavUI();
-  },
-
-  onDownInput: function onDownInput(aEvent) {
-    if (!this.isVisible) {
-      return;
-    }
-
-    // Various ui element containers we do not update context ui for.
-    let whitelist = [
-      // Clicks on tab bar elements should not close the tab bar. the tabbar
-      // handles this.
-      Elements.tabs,
-      // Don't let a click on an infobar button dismiss the appbar or navbar.
-      // Note the notification box should always hover above these other two
-      // bars.
-      Browser.getNotificationBox()
-    ];
-
-    if (whitelist.some(elem => elem.contains(aEvent.target))) {
-      return;
-    }
-
-    // If a start tab is visible only dismiss the tab bar.
-    if (BrowserUI.isStartTabVisible) {
-      ContextUI.dismissTabs();
-      return;
-    }
-
-    // content, dismiss anything visible
-    if (aEvent.target.ownerDocument.defaultView.top == getBrowser().contentWindow) {
-      this.dismiss();
-      return;
-    }
-
-    // dismiss tabs and context app bar if visible
-    this.dismissTabs();
-    this.dismissContextAppbar();
-  },
-
-  onMouseMove: function (aEvent) {
-    if (this._hidingId) {
-      this._clearDelayedTimeout();
-      this._delayedHide = true;
-    }
-  },
-
-  onMouseLeave: function (aEvent) {
-    if (this._delayedHide) {
-      this._delayedHide = false;
-      this._resetDelayedTimeout();
-    }
-  },
-
-  handleEvent: function handleEvent(aEvent) {
-    switch (aEvent.type) {
-      case "URLChanged":
-        // "aEvent.detail" is a boolean value that indicates whether actual URL
-        // has changed ignoring URL fragment changes.
-        if (aEvent.target == Browser.selectedBrowser && aEvent.detail) {
-          this.displayNavbar();
-        }
-        break;
-      case "MozEdgeUIStarted":
-        this._onEdgeUIStarted(aEvent);
-        break;
-      case "MozEdgeUICanceled":
-        this._onEdgeUICanceled(aEvent);
-        break;
-      case "MozEdgeUICompleted":
-        this._onEdgeUICompleted(aEvent);
-        break;
-      case "keypress":
-        if (String.fromCharCode(aEvent.which) == "z" &&
-            aEvent.getModifierState("Win"))
-          this.toggleNavUI();
-        break;
-      case "transitionend":
-        setTimeout(function () {
-          ContentAreaObserver.updateContentArea();
-        }, 0);
-        break;
-      case "KeyboardChanged":
-        this.dismissTabs();
-        break;
-      case "mousedown":
-        if (aEvent.button != 0) {
-          break;
-        }
-        this.onDownInput(aEvent);
-        break;
-      case "mousemove":
-        this.onMouseMove(aEvent);
-        break;
-      case "mouseleave":
-        this.onMouseLeave(aEvent);
-        break;
-      case "touchstart":
-        this.onDownInput(aEvent);
-        break;
-      case "ToolPanelShown":
-      case "ToolPanelHidden":
-        this.dismiss();
-        break;
-      case "AlertActive":
-      case "AlertClose":
-      case "TabSelect":
-        ContentAreaObserver.updateContentArea();
-        break;
-      case "MozFlyoutPanelShowing":
-        if (BrowserUI.isStartTabVisible) {
-          this.dismissTabs();
-          this.dismissContextAppbar();
-        } else {
-          this.dismiss();
-        }
-        break;
-    }
-  },
-
-  _fire: function (name) {
-    let event = document.createEvent("Events");
-    event.initEvent(name, true, true);
-    window.dispatchEvent(event);
-  }
-};
deleted file mode 100644
--- a/browser/metro/base/content/NavButtonSlider.js
+++ /dev/null
@@ -1,217 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-/*
- * Handles nav overlay button positioning.
- */
-
-// minimum amount of movement using the mouse after which we cancel the button click handlers
-const kOnClickMargin = 3;
-
-const kNavButtonPref = "browser.display.overlaynavbuttons";
-
-var NavButtonSlider = {
-  _back: document.getElementById("overlay-back"),
-  _plus: document.getElementById("overlay-plus"),
-  _mouseMoveStarted: false,
-  _mouseDown: false,
-  _yPos: -1,
-
-  get back() {
-    return this._back;
-  },
-
-  get plus() {
-    return this._plus;
-  },
-
-  /*
-   * custom dragger, see input.js
-   */
-
-  freeDrag: function freeDrag() {
-    return true;
-  },
-
-  isDraggable: function isDraggable(aTarget, aContent) {
-    return { x: false, y: true };
-  },
-
-  dragStart: function dragStart(aX, aY, aTarget, aScroller) {
-    return true;
-  },
-
-  dragStop: function dragStop(aDx, aDy, aScroller) {
-    return true;
-  },
-
-  dragMove: function dragMove(aDx, aDy, aScroller, aIsKenetic, aClientX, aClientY) {
-    // Note if aIsKenetic is true this is synthetic movement,
-    // we don't want that so return false.
-    if (aIsKenetic) {
-      return false;
-    }
-    
-    this._updatePosition(aClientY);
-
-    // return true if we moved, false otherwise. The result
-    // is used in deciding if we should repaint between drags.
-    return true;
-  },
-
-  /*
-   * logic
-   */
-
-  init: function init() {
-    // Touch drag support provided by input.js
-    this._back.customDragger = this;
-    this._plus.customDragger = this;
-    Elements.browsers.addEventListener("ContentSizeChanged", this, true);
-    let events = ["mousedown", "mouseup", "mousemove", "click", "touchstart", "touchmove", "touchend"];
-    events.forEach(function (value) {
-      this._back.addEventListener(value, this, true);
-      this._plus.addEventListener(value, this, true);
-    }, this);
-
-    this._updateStops();
-    this._updateVisibility();
-    Services.prefs.addObserver(kNavButtonPref, this, false);
-  },
-
-  observe: function (aSubject, aTopic, aData) {
-    if (aTopic == "nsPref:changed" && aData == kNavButtonPref) {
-      this._updateVisibility();
-    }
-  },
-
-  _updateVisibility: function () {
-    if (Services.prefs.getBoolPref(kNavButtonPref)) {
-      this._back.removeAttribute("hidden");
-      this._plus.removeAttribute("hidden");
-    } else {
-      this._back.setAttribute("hidden", true);
-      this._plus.setAttribute("hidden", true);
-    }
-  },
-
-  _updateStops: function () {
-    this._contentHeight = ContentAreaObserver.contentHeight;
-    this._imageHeight = 118;
-    this._topStop = this._imageHeight * .7;
-    this._bottomStop = this._contentHeight - (this._imageHeight * .7);
-
-    // Check to see if we need to move the slider into view
-    if (this._yPos != -1 &&
-        (this._topStop > this._yPos || this._bottomStop < this._yPos)) {
-      this._back.style.top = "50%";
-      this._plus.style.top = "50%";
-    }
-  },
-
-  _getPosition: function _getPosition() {
-    this._yPos = parseInt(getComputedStyle(this._back).top);
-  },
-
-  _setPosition: function _setPosition() {
-    this._back.style.top = this._yPos + "px";
-    this._plus.style.top = this._yPos + "px";
-  },
-
-  _updatePosition: function (aClientY) {
-    if (this._topStop > aClientY || this._bottomStop < aClientY)
-      return;
-    this._yPos = aClientY;
-    this._setPosition();
-  },
-
-  _updateOffset: function (aOffset) {
-    let newPos = this._yPos + aOffset;
-    if (this._topStop > newPos || this._bottomStop < newPos)
-      return;
-    this._yPos = newPos;
-    this._setPosition();
-  },
-
-  /*
-   * Events
-   */
-
-  handleEvent: function handleEvent(aEvent) {
-    switch (aEvent.type) {
-      case "ContentSizeChanged":
-        this._updateStops();
-        break;
-
-      case "touchstart":
-        if (aEvent.touches.length != 1)
-          break;
-        aEvent.preventDefault();
-        aEvent = aEvent.touches[0];
-      case "mousedown":
-        this._getPosition();
-        this._mouseDown = true;
-        this._mouseMoveStarted = false;
-        this._mouseY = aEvent.clientY;
-        if (aEvent.originalTarget)
-          aEvent.originalTarget.setCapture();
-        this._back.setAttribute("mousedrag", true);
-        this._plus.setAttribute("mousedrag", true);
-        break;
-
-      case "touchend":
-        if (aEvent.touches.length != 0)
-          break;
-        this._mouseDown = false;
-        this._back.removeAttribute("mousedrag");
-        this._plus.removeAttribute("mousedrag");
-        if (!this._mouseMoveStarted) {
-          if (aEvent.originalTarget == this._back) {
-            CommandUpdater.doCommand('cmd_back');
-          } else {
-            CommandUpdater.doCommand('cmd_newTab');
-          }
-        }
-        break;
-      case "mouseup":
-        this._mouseDown = false;
-        this._back.removeAttribute("mousedrag");
-        this._plus.removeAttribute("mousedrag");
-        break;
-
-      case "touchmove":
-        if (aEvent.touches.length != 1)
-          break;
-        aEvent = aEvent.touches[0];
-      case "mousemove":
-        // Check to be sure this is a drag operation
-        if (!this._mouseDown) {
-          return;
-        }
-        // Don't start a drag until we've passed a threshold
-        let dy = aEvent.clientY - this._mouseY;
-        if (!this._mouseMoveStarted && Math.abs(dy) < kOnClickMargin) {
-          return;
-        }
-        // Start dragging via the mouse
-        this._mouseMoveStarted = true;
-        this._mouseY = aEvent.clientY;
-        this._updateOffset(dy);
-        break;
-      case "click":
-        // Don't invoke the click action if we've moved the buttons via the mouse.
-        if (this._mouseMoveStarted) {
-          return;
-        }
-        if (aEvent.originalTarget == this._back) {
-           CommandUpdater.doCommand('cmd_back');
-        } else {
-           CommandUpdater.doCommand('cmd_newTab');
-        }
-        break;
-    }
-  },
-};
-
-
deleted file mode 100644
--- a/browser/metro/base/content/Site.js
+++ /dev/null
@@ -1,74 +0,0 @@
-// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-'use strict';
-
-/**
- * dumb model class to provide default values for sites.
- * link parameter/model object expected to have a .url property, and optionally .title
- */
-function Site(aLink) {
-  if (!aLink.url) {
-    throw Cr.NS_ERROR_INVALID_ARG;
-  }
-  this._link = aLink;
-}
-
-Site.prototype = {
-  icon: '',
-  get url() {
-    return this._link.url;
-  },
-  get title() {
-    // use url if no title was recorded
-    return this._link.title || this._link.url;
-  },
-  get label() {
-    // alias for .title
-    return this.title;
-  },
-  get pinned() {
-    return NewTabUtils.pinnedLinks.isPinned(this);
-  },
-  get contextActions() {
-    return [
-      'delete', // delete means hide here
-      this.pinned ? 'unpin' : 'pin'
-    ];
-  },
-  get blocked() {
-    return NewTabUtils.blockedLinks.isBlocked(this);
-  },
-  get attributeValues() {
-    return {
-      value: this.url,
-      label: this.title,
-      pinned: this.pinned ? true : undefined,
-      selected: this.selected,
-      customColor: this.color,
-      customImage: this.backgroundImage,
-      iconURI: this.icon,
-      "data-contextactions": this.contextActions.join(',')
-    };
-  },
-  applyToTileNode: function(aNode) {
-    // apply this site's properties as attributes on a tile element
-    // the decorated node acts as a view-model for the tile binding
-    let attrs = this.attributeValues;
-    for (let key in attrs) {
-      if (undefined === attrs[key]) {
-        aNode.removeAttribute(key);
-      } else {
-        aNode.setAttribute(key, attrs[key]);
-      }
-    }
-    // is binding already applied?
-    if ('refresh' in aNode) {
-      // just update it
-      aNode.refresh();
-    } else {
-      // these attribute values will get picked up later when the binding is applied
-    }
-  }
-};
deleted file mode 100644
--- a/browser/metro/base/content/TopSites.js
+++ /dev/null
@@ -1,158 +0,0 @@
-// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-'use strict';
-
-/**
- * singleton to provide data-level functionality to the views
- */
-let TopSites = {
-  prepareCache: function(aForce){
-    // front to the NewTabUtils' links cache
-    //  -ensure NewTabUtils.links links are pre-cached
-
-    // avoid re-fetching links data while a fetch is in flight
-    if (this._promisedCache && !aForce) {
-      return this._promisedCache;
-    }
-    let deferred = Promise.defer();
-    this._promisedCache = deferred.promise;
-
-    NewTabUtils.links.populateCache(function () {
-      deferred.resolve();
-      this._promisedCache = null;
-      this._sites = null;  // reset our sites cache so they are built anew
-      this._sitesDirty.clear();
-    }.bind(this), true);
-    return this._promisedCache;
-  },
-
-  _sites: null,
-  _sitesDirty: new Set(),
-  getSites: function() {
-    if (this._sites) {
-      return this._sites;
-    }
-
-    let links = NewTabUtils.links.getLinks();
-    let sites = links.map(function(aLink){
-      let site = new Site(aLink);
-      return site;
-    });
-
-    // reset state
-    this._sites = sites;
-    this._sitesDirty.clear();
-    return this._sites;
-  },
-
-  /**
-   * Get list of top site as in need of update/re-render
-   * @param aSite Optionally add Site arguments to be refreshed/updated
-   */
-  dirty: function() {
-    // add any arguments for more fine-grained updates rather than invalidating the whole collection
-    for (let i=0; i<arguments.length; i++) {
-      this._sitesDirty.add(arguments[i]);
-    }
-    return this._sitesDirty;
-  },
-
-  /**
-   * Cause update of top sites
-   */
-  update: function() {
-    NewTabUtils.allPages.update();
-    // then clear all the dirty flags
-    this._sitesDirty.clear();
-  },
-
-  /**
-   * Pin top site at a given index
-   * @param aSites array of sites to be pinned
-   * @param aSlotIndices indices corresponding to the site to be pinned
-   */
-  pinSites: function(aSites, aSlotIndices) {
-    if (aSites.length !== aSlotIndices.length)
-        throw new Error("TopSites.pinSites: Mismatched sites/indices arguments");
-
-    for (let i=0; i<aSites.length && i<aSlotIndices.length; i++){
-      let site = aSites[i],
-          idx = aSlotIndices[i];
-      if (!(site && site.url)) {
-        throw Cr.NS_ERROR_INVALID_ARG
-      }
-      // pinned state is a pref, using Storage apis therefore sync
-      NewTabUtils.pinnedLinks.pin(site, idx);
-      this.dirty(site);
-    }
-    this.update();
-  },
-
-  /**
-   * Unpin top sites
-   * @param aSites array of sites to be unpinned
-   */
-  unpinSites: function(aSites) {
-    for (let site of aSites) {
-      if (!(site && site.url)) {
-        throw Cr.NS_ERROR_INVALID_ARG
-      }
-      // pinned state is a pref, using Storage apis therefore sync
-      NewTabUtils.pinnedLinks.unpin(site);
-      this.dirty(site);
-    }
-    this.update();
-  },
-
-  /**
-   * Hide (block) top sites
-   * @param aSites array of sites to be unpinned
-   */
-  hideSites: function(aSites) {
-    for (let site of aSites) {
-      if (!(site && site.url)) {
-        throw Cr.NS_ERROR_INVALID_ARG
-      }
-
-      site._restorePinIndex = NewTabUtils.pinnedLinks._indexOfLink(site);
-      // blocked state is a pref, using Storage apis therefore sync
-      NewTabUtils.blockedLinks.block(site);
-    }
-    // clear out the cache, we'll fetch and re-render
-    this._sites = null;
-    this._sitesDirty.clear();
-    this.update();
-  },
-
-  /**
-   * Un-hide (restore) top sites
-   * @param aSites array of sites to be restored
-   */
-  restoreSites: function(aSites) {
-    for (let site of aSites) {
-      if (!(site && site.url)) {
-        throw Cr.NS_ERROR_INVALID_ARG
-      }
-      NewTabUtils.blockedLinks.unblock(site);
-      let pinIndex = site._restorePinIndex;
-
-      if (!isNaN(pinIndex) && pinIndex > -1) {
-        NewTabUtils.pinnedLinks.pin(site, pinIndex);
-      }
-    }
-    // clear out the cache, we'll fetch and re-render
-    this._sites = null;
-    this._sitesDirty.clear();
-    this.update();
-  },
-
-  _linkFromNode: function _linkFromNode(aNode) {
-    return {
-      url: aNode.getAttribute("value"),
-      title: aNode.getAttribute("label")
-    };
-  }
-};
-
deleted file mode 100644
--- a/browser/metro/base/content/Util.js
+++ /dev/null
@@ -1,430 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-let Cc = Components.classes;
-let Ci = Components.interfaces;
-
-Components.utils.import("resource:///modules/ContentUtil.jsm");
-
-let Util = {
-  /*
-   * General purpose utilities
-   */
-
-  getWindowUtils: function getWindowUtils(aWindow) {
-    return aWindow.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils);
-  },
-
-  // Put the Mozilla networking code into a state that will kick the
-  // auto-connection process.
-  forceOnline: function forceOnline() {
-    Services.io.offline = false;
-  },
-
-  /*
-   * Timing utilties
-   */
-
-  // Executes aFunc after other events have been processed.
-  executeSoon: function executeSoon(aFunc) {
-    Services.tm.mainThread.dispatch({
-      run: function() {
-        aFunc();
-      }
-    }, Ci.nsIThread.DISPATCH_NORMAL);
-  },
-
-  /*
-   * Console printing utilities
-   */
-
-  // Like dump, but each arg is handled and there's an automatic newline
-  dumpLn: function dumpLn() {
-    for (let i = 0; i < arguments.length; i++)
-      dump(arguments[i] + " ");
-    dump("\n");
-  },
-
-  /*
-   * Element utilities
-   */
-
-  transitionElementVisibility: function(aNodes, aVisible) {
-    // accept single node or a collection of nodes
-    aNodes = aNodes.length ? aNodes : [aNodes];
-    let defd = Promise.defer();
-    let pending = 0;
-    Array.forEach(aNodes, function(aNode) {
-      if (aVisible) {
-        aNode.hidden = false;
-        aNode.removeAttribute("fade"); // trigger transition to full opacity
-      } else {
-        aNode.setAttribute("fade", true); // trigger transition to 0 opacity
-      }
-      aNode.addEventListener("transitionend", function onTransitionEnd(aEvent){
-        aNode.removeEventListener("transitionend", onTransitionEnd);
-        if (!aVisible) {
-          aNode.hidden = true;
-        }
-        pending--;
-        if (!pending){
-          defd.resolve(true);
-        }
-      }, false);
-      pending++;
-    });
-    return defd.promise;
-  },
-
-  isTextInput: function isTextInput(aElement) {
-    return ((aElement instanceof Ci.nsIDOMHTMLInputElement &&
-             aElement.mozIsTextField(false)) ||
-            aElement instanceof Ci.nsIDOMHTMLTextAreaElement);
-  },
-
-  /**
-   * Checks whether aElement's content can be edited either if it(or any of its
-   * parents) has "contenteditable" attribute set to "true" or aElement's
-   * ownerDocument is in design mode.
-   */
-  isEditableContent: function isEditableContent(aElement) {
-    return !!aElement && (aElement.isContentEditable ||
-                          this.isOwnerDocumentInDesignMode(aElement));
-
-  },
-
-  isEditable: function isEditable(aElement) {
-    if (!aElement) {
-      return false;
-    }
-
-    if (this.isTextInput(aElement) || this.isEditableContent(aElement)) {
-      return true;
-    }
-
-    // If a body element is editable and the body is the child of an
-    // iframe or div we can assume this is an advanced HTML editor
-    if ((aElement instanceof Ci.nsIDOMHTMLIFrameElement ||
-         aElement instanceof Ci.nsIDOMHTMLDivElement) &&
-        aElement.contentDocument &&
-        this.isEditableContent(aElement.contentDocument.body)) {
-      return true;
-    }
-
-    return false;
-  },
-
-  /**
-   * Checks whether aElement's owner document has design mode turned on.
-   */
-  isOwnerDocumentInDesignMode: function(aElement) {
-    return !!aElement && !!aElement.ownerDocument &&
-           aElement.ownerDocument.designMode == "on";
-  },
-
-  isMultilineInput: function isMultilineInput(aElement) {
-    return (aElement instanceof Ci.nsIDOMHTMLTextAreaElement);
-  },
-
-  isLink: function isLink(aElement) {
-    return ((aElement instanceof Ci.nsIDOMHTMLAnchorElement && aElement.href) ||
-            (aElement instanceof Ci.nsIDOMHTMLAreaElement && aElement.href) ||
-            aElement instanceof Ci.nsIDOMHTMLLinkElement ||
-            aElement.getAttributeNS(kXLinkNamespace, "type") == "simple");
-  },
-
-  isText: function isText(aElement) {
-    return (aElement instanceof Ci.nsIDOMHTMLParagraphElement ||
-            aElement instanceof Ci.nsIDOMHTMLDivElement ||
-            aElement instanceof Ci.nsIDOMHTMLLIElement ||
-            aElement instanceof Ci.nsIDOMHTMLPreElement ||
-            aElement instanceof Ci.nsIDOMHTMLHeadingElement ||
-            aElement instanceof Ci.nsIDOMHTMLTableCellElement ||
-            aElement instanceof Ci.nsIDOMHTMLBodyElement);
-  },
-
-  /*
-   * Rect and nsIDOMRect utilities
-   */
-
-  getCleanRect: function getCleanRect() {
-    return {
-      left: 0, top: 0, right: 0, bottom: 0
-    };
-  },
-
-  pointWithinRect: function pointWithinRect(aX, aY, aRect) {
-    return (aRect.left < aX && aRect.top < aY &&
-            aRect.right > aX && aRect.bottom > aY);
-  },
-
-  pointWithinDOMRect: function pointWithinDOMRect(aX, aY, aRect) {
-    if (!aRect.width || !aRect.height)
-      return false;
-    return this.pointWithinRect(aX, aY, aRect);
-  },
-
-  isEmptyDOMRect: function isEmptyDOMRect(aRect) {
-    if ((aRect.bottom - aRect.top) <= 0 &&
-        (aRect.right - aRect.left) <= 0)
-      return true;
-    return false;
-  },
-
-  // Dumps the details of a dom rect to the console
-  dumpDOMRect: function dumpDOMRect(aMsg, aRect) {
-    try {
-      Util.dumpLn(aMsg,
-                  "left:" + Math.round(aRect.left) + ",",
-                  "top:" + Math.round(aRect.top) + ",",
-                  "right:" + Math.round(aRect.right) + ",",
-                  "bottom:" + Math.round(aRect.bottom) + ",",
-                  "width:" + Math.round(aRect.right - aRect.left) + ",",
-                  "height:" + Math.round(aRect.bottom - aRect.top) );
-    } catch (ex) {
-      Util.dumpLn("dumpDOMRect:", ex.message);
-    }
-  },
-
-  /*
-   * DownloadUtils.convertByteUnits returns [size, localized-unit-string]
-   * so they are joined for a single download size string.
-   */
-  getDownloadSize: function dv__getDownloadSize (aSize) {
-    let [size, units] = DownloadUtils.convertByteUnits(aSize);
-    if (aSize > 0)
-      return size + units;
-    else
-      return Strings.browser.GetStringFromName("downloadsUnknownSize");
-  },
-
-  /*
-   * URIs and schemes
-   */
-
-  makeURI: function makeURI(aURL, aOriginCharset, aBaseURI) {
-    return Services.io.newURI(aURL, aOriginCharset, aBaseURI);
-  },
-
-  makeURLAbsolute: function makeURLAbsolute(base, url) {
-    // Note:  makeURI() will throw if url is not a valid URI
-    return this.makeURI(url, null, this.makeURI(base)).spec;
-  },
-
-  isLocalScheme: function isLocalScheme(aURL) {
-    return ((aURL.indexOf("about:") == 0 &&
-             aURL != "about:blank" &&
-             aURL != "about:empty" &&
-             aURL != "about:start") ||
-            aURL.indexOf("chrome:") == 0);
-  },
-
-  // Don't display anything in the urlbar for these special URIs.
-  isURLEmpty: function isURLEmpty(aURL) {
-    return (!aURL ||
-            aURL == "about:blank" ||
-            aURL == "about:empty" ||
-            aURL == "about:home" ||
-            aURL == "about:newtab" ||
-            aURL.startsWith("about:newtab"));
-  },
-
-  // Title to use for emptyURL tabs.
-  getEmptyURLTabTitle: function getEmptyURLTabTitle() {
-    let browserStrings = Services.strings.createBundle("chrome://browser/locale/browser.properties");
-
-    return browserStrings.GetStringFromName("tabs.emptyTabTitle");
-  },
-
-  // Don't remember these pages in the session store.
-  isURLMemorable: function isURLMemorable(aURL) {
-    return !(aURL == "about:blank" ||
-             aURL == "about:empty" ||
-             aURL == "about:start");
-  },
-
-  /*
-   * Math utilities
-   */
-
-  clamp: function(num, min, max) {
-    return Math.max(min, Math.min(max, num));
-  },
-
-  /*
-   * Screen and layout utilities
-   */
-
-   /*
-    * translateToTopLevelWindow - Given an element potentially within
-    * a subframe, calculate the offsets up to the top level browser.
-    */
-  translateToTopLevelWindow: function translateToTopLevelWindow(aElement) {
-    let offsetX = 0;
-    let offsetY = 0;
-    let element = aElement;
-    while (element &&
-           element.ownerDocument &&
-           element.ownerDocument.defaultView != content) {
-      element = element.ownerDocument.defaultView.frameElement;
-      let rect = element.getBoundingClientRect();
-      offsetX += rect.left;
-      offsetY += rect.top;
-    }
-    let win = null;
-    if (element == aElement)
-      win = content;
-    else
-      win = element.contentDocument.defaultView;
-    return { targetWindow: win, offsetX: offsetX, offsetY: offsetY };
-  },
-
-  get displayDPI() {
-    delete this.displayDPI;
-    return this.displayDPI = this.getWindowUtils(window).displayDPI;
-  },
-
-  /*
-   * aViewHeight - the height of the viewable area in the browser
-   * aRect - a bounding rectangle of a selection or element.
-   *
-   * return - number of pixels for the browser to be shifted up by such
-   * that aRect is centered vertically within aViewHeight.
-   */
-  centerElementInView: function centerElementInView(aViewHeight, aRect) {
-    // If the bottom of the target bounds is higher than the new height,
-    // there's no need to adjust. It will be above the keyboard.
-    if (aRect.bottom <= aViewHeight) {
-      return 0;
-    }
-
-    // height of the target element
-    let targetHeight = aRect.bottom - aRect.top;
-    // height of the browser view.
-    let viewBottom = content.innerHeight;
-
-    // If the target is shorter than the new content height, we can go ahead
-    // and center it.
-    if (targetHeight <= aViewHeight) {
-      // Try to center the element vertically in the new content area, but
-      // don't position such that the bottom of the browser view moves above
-      // the top of the chrome. We purposely do not resize the browser window
-      // by making it taller when trying to center elements that are near the
-      // lower bounds. This would trigger reflow which can cause content to
-      // shift around.
-      let splitMargin = Math.round((aViewHeight - targetHeight) * .5);
-      let distanceToPageBounds = viewBottom - aRect.bottom;
-      let distanceFromChromeTop = aRect.bottom - aViewHeight;
-      let distanceToCenter =
-        distanceFromChromeTop + Math.min(distanceToPageBounds, splitMargin);
-      return distanceToCenter;
-    }
-  },
-
-  /*
-   * Local system utilities
-   */
-
-  copyImageToClipboard: function Util_copyImageToClipboard(aImageLoadingContent) {
-    let image = aImageLoadingContent.QueryInterface(Ci.nsIImageLoadingContent);
-    if (!image) {
-      Util.dumpLn("copyImageToClipboard error: image is not an nsIImageLoadingContent");
-      return;
-    }
-    try {
-      let xferable = Cc["@mozilla.org/widget/transferable;1"].createInstance(Ci.nsITransferable);
-      xferable.init(null);
-      let imgRequest = aImageLoadingContent.getRequest(Ci.nsIImageLoadingContent.CURRENT_REQUEST);
-      let mimeType = imgRequest.mimeType;
-      let imgContainer = imgRequest.image;
-      let imgPtr = Cc["@mozilla.org/supports-interface-pointer;1"].createInstance(Ci.nsISupportsInterfacePointer);
-      imgPtr.data = imgContainer;
-      xferable.setTransferData(mimeType, imgPtr, null);
-      let clip = Cc["@mozilla.org/widget/clipboard;1"].getService(Ci.nsIClipboard);
-      clip.setData(xferable, null, Ci.nsIClipboard.kGlobalClipboard);
-    } catch (e) {
-      Util.dumpLn(e.message);
-    }
-  },
-};
-
-
-/*
- * Timeout
- *
- * Helper class to nsITimer that adds a little more pizazz.  Callback can be an
- * object with a notify method or a function.
- */
-Util.Timeout = function(aCallback) {
-  this._callback = aCallback;
-  this._timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
-  this._type = null;
-};
-
-Util.Timeout.prototype = {
-  // Timer callback. Don't call this manually.
-  notify: function notify() {
-    if (this._type == this._timer.TYPE_ONE_SHOT)
-      this._type = null;
-
-    if (this._callback.notify)
-      this._callback.notify();
-    else
-      this._callback.apply(null);
-  },
-
-  // Helper function for once and interval.
-  _start: function _start(aDelay, aType, aCallback) {
-    if (aCallback)
-      this._callback = aCallback;
-    this.clear();
-    this._timer.initWithCallback(this, aDelay, aType);
-    this._type = aType;
-    return this;
-  },
-
-  // Do the callback once.  Cancels other timeouts on this object.
-  once: function once(aDelay, aCallback) {
-    return this._start(aDelay, this._timer.TYPE_ONE_SHOT, aCallback);
-  },
-
-  // Do the callback every aDelay msecs. Cancels other timeouts on this object.
-  interval: function interval(aDelay, aCallback) {
-    return this._start(aDelay, this._timer.TYPE_REPEATING_SLACK, aCallback);
-  },
-
-  // Clear any pending timeouts.
-  clear: function clear() {
-    if (this.isPending()) {
-      this._timer.cancel();
-      this._type = null;
-    }
-    return this;
-  },
-
-  // If there is a pending timeout, call it and cancel the timeout.
-  flush: function flush() {
-    if (this.isPending()) {
-      this.notify();
-      this.clear();
-    }
-    return this;
-  },
-
-  // Return true if we are waiting for a callback.
-  isPending: function isPending() {
-    return this._type !== null;
-  }
-};
-
-// Mixin the ContentUtil module exports
-{
-  for (let name in ContentUtil) {
-    let copy = ContentUtil[name];
-    if (copy !== undefined)
-      Util[name] = copy;
-  }
-}
-
-this.Util = Util;
deleted file mode 100644
--- a/browser/metro/base/content/WebProgress.js
+++ /dev/null
@@ -1,244 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-// Progress heartbeat timer duration (ms)
-const kHeartbeatDuration = 1000;
-// Start and end progress screen css margins as percentages
-const kProgressMarginStart = 30;
-const kProgressMarginEnd = 70;
-
-const WebProgress = {
-  get _identityBox() { return document.getElementById("identity-box"); },
-
-  init: function init() {
-    messageManager.addMessageListener("Content:StateChange", this);
-    messageManager.addMessageListener("Content:LocationChange", this);
-    messageManager.addMessageListener("Content:SecurityChange", this);
-
-    Elements.progress.addEventListener("transitionend", this, true);
-    Elements.tabList.addEventListener("TabSelect", this, true);
-
-    let urlBar = document.getElementById("urlbar-edit");
-    urlBar.addEventListener("input", this, false);
-
-    return this;
-  },
-
-  receiveMessage: function receiveMessage(aMessage) {
-    let json = aMessage.json;
-    let tab = Browser.getTabForBrowser(aMessage.target);
-
-    switch (aMessage.name) {
-      case "Content:StateChange": {
-        if (json.stateFlags & Ci.nsIWebProgressListener.STATE_IS_WINDOW) {
-          if (json.stateFlags & Ci.nsIWebProgressListener.STATE_START)
-            this._windowStart(json, tab);
-          else if (json.stateFlags & Ci.nsIWebProgressListener.STATE_STOP)
-            this._windowStop(json, tab);
-        }
-
-        if (json.stateFlags & Ci.nsIWebProgressListener.STATE_IS_NETWORK) {
-          if (json.stateFlags & Ci.nsIWebProgressListener.STATE_START)
-            this._networkStart(json, tab);
-          else if (json.stateFlags & Ci.nsIWebProgressListener.STATE_STOP)
-            this._networkStop(json, tab);
-        }
-
-        this._progressStep(tab);
-        break;
-      }
-
-      case "Content:LocationChange": {
-        this._locationChange(json, tab);
-        this._progressStep(tab);
-        break;
-      }
-
-      case "Content:SecurityChange": {
-        this._securityChange(json, tab);
-        this._progressStep(tab);
-        break;
-      }
-    }
-  },
-
-  handleEvent: function handleEvent(aEvent) {
-    switch (aEvent.type) {
-      case "transitionend":
-        this._progressTransEnd(aEvent);
-        break;
-      case "TabSelect":
-        this._onTabSelect(aEvent);
-        break;
-      case "input":
-        this._onUrlBarInput(aEvent);
-        break;
-    }
-  },
-
-  _securityChange: function _securityChange(aJson, aTab) {
-    let state = aJson.state;
-    let nsIWebProgressListener = Ci.nsIWebProgressListener;
-
-    if (state & nsIWebProgressListener.STATE_IDENTITY_EV_TOPLEVEL) {
-      aTab._identityState = "verifiedIdentity";
-    } else if (state & nsIWebProgressListener.STATE_IS_SECURE) {
-      aTab._identityState = "verifiedDomain";
-    } else {
-      aTab._identityState = "";
-    }
-
-    if (aTab == Browser.selectedTab) {
-      this._identityBox.className = aTab._identityState;
-    }
-  },
-
-  _locationChange: function _locationChange(aJson, aTab) {
-    let spec = aJson.location;
-    let location = spec.split("#")[0]; // Ignore fragment identifier changes.
-
-    if (aTab == Browser.selectedTab) {
-      BrowserUI.updateURI();
-      BrowserUI.update();
-      BrowserUI.updateStartURIAttributes(aJson.location);
-    }
-
-    let locationHasChanged = (location != aTab.browser.lastLocation);
-    if (locationHasChanged) {
-      Browser.getNotificationBox(aTab.browser).removeTransientNotifications();
-      aTab.browser.lastLocation = location;
-      aTab.browser.userTypedValue = "";
-      aTab.browser.appIcon = { href: null, size:-1 };
-
-#ifdef MOZ_CRASHREPORTER
-      if (CrashReporter.enabled)
-        CrashReporter.annotateCrashReport("URL", spec);
-#endif
-    }
-
-    let event = document.createEvent("UIEvents");
-    event.initUIEvent("URLChanged", true, false, window, locationHasChanged);
-    aTab.browser.dispatchEvent(event);
-  },
-
-  _networkStart: function _networkStart(aJson, aTab) {
-    aTab.startLoading();
-
-    if (aTab == Browser.selectedTab) {
-      // NO_STARTUI_VISIBILITY since the current uri for the tab has not
-      // been updated yet. If we're coming off of the start page, this
-      // would briefly show StartUI until _locationChange is called.
-      BrowserUI.update(BrowserUI.NO_STARTUI_VISIBILITY);
-    }
-  },
-
-  _networkStop: function _networkStop(aJson, aTab) {
-    aTab.endLoading();
-
-    if (aTab == Browser.selectedTab) {
-      BrowserUI.update();
-    }
-  },
-
-  _windowStart: function _windowStart(aJson, aTab) {
-    this._progressStart(aJson, aTab);
-  },
-
-  _windowStop: function _windowStop(aJson, aTab) {
-    this._progressStop(aJson, aTab);
-  },
-
-  _progressStart: function _progressStart(aJson, aTab) {
-    // We will get multiple calls from _windowStart, so
-    // only process once.
-    if (aTab._progressActive)
-      return;
-
-    aTab._progressActive = true;
-
-    // 'Whoosh' in
-    aTab._progressCount = kProgressMarginStart;
-    this._showProgressBar(aTab);
-  },
-
-  _showProgressBar: function (aTab) {
-    // display the track
-    if (aTab == Browser.selectedTab) {
-      Elements.progressContainer.removeAttribute("collapsed");
-      Elements.progress.style.width = aTab._progressCount + "%";
-      Elements.progress.removeAttribute("fade");
-    }
-
-    // Create a pulse timer to keep things moving even if we don't
-    // collect any state changes.
-    setTimeout(function() {
-      WebProgress._progressStepTimer(aTab);
-    }, kHeartbeatDuration, this);
-  },
-
-  _stepProgressCount: function _stepProgressCount(aTab) {
-    // Step toward the end margin in smaller slices as we get closer
-    let left = kProgressMarginEnd - aTab._progressCount;
-    let step = left * .05;
-    aTab._progressCount += Math.ceil(step);
-
-    // Don't go past the 'whoosh out' margin.
-    if (aTab._progressCount > kProgressMarginEnd) {
-      aTab._progressCount = kProgressMarginEnd;
-    }
-  },
-
-  _progressStep: function _progressStep(aTab) {
-    if (!aTab._progressActive)
-      return;
-    this._stepProgressCount(aTab);
-    if (aTab == Browser.selectedTab) {
-      Elements.progress.style.width = aTab._progressCount + "%";
-    }
-  },
-
-  _progressStepTimer: function _progressStepTimer(aTab) {
-    if (!aTab._progressActive)
-      return;
-    this._progressStep(aTab);
-
-    setTimeout(function() {
-      WebProgress._progressStepTimer(aTab);
-    }, kHeartbeatDuration, this);
-  },
-
-  _progressStop: function _progressStop(aJson, aTab) {
-    aTab._progressActive = false;
-    // 'Whoosh out' and fade
-    if (aTab == Browser.selectedTab) {
-      Elements.progress.style.width = "100%";
-      Elements.progress.setAttribute("fade", true);
-    }
-  },
-
-  _progressTransEnd: function _progressTransEnd(aEvent) {
-    if (!Elements.progress.hasAttribute("fade"))
-      return;
-    // Close out fade finished, reset
-    if (aEvent.propertyName == "opacity") {
-      Elements.progress.style.width = "0px";
-      Elements.progressContainer.setAttribute("collapsed", true);
-    }
-  },
-
-  _onTabSelect: function(aEvent) {
-    let tab = Browser.getTabFromChrome(aEvent.originalTarget);
-    this._identityBox.className = tab._identityState || "";
-    if (tab._progressActive) {
-      this._showProgressBar(tab);
-    } else {
-      Elements.progress.setAttribute("fade", true);
-      Elements.progressContainer.setAttribute("collapsed", true);
-    }
-  },
-
-  _onUrlBarInput: function(aEvent) {
-    Browser.selectedTab._identityState = this._identityBox.className = "";
-  },
-};
deleted file mode 100644
--- a/browser/metro/base/content/appbar.js
+++ /dev/null
@@ -1,323 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-"use strict";
-
-var Appbar = {
-  get starButton()    { return document.getElementById('star-button'); },
-  get pinButton()     { return document.getElementById('pin-button'); },
-  get menuButton()    { return document.getElementById('menu-button'); },
-
-  // track selected/active richgrid/tilegroup - the context for contextual action buttons
-  activeTileset: null,
-
-  init: function Appbar_init() {
-    // fired from appbar bindings
-    Elements.contextappbar.addEventListener('MozAppbarShowing', this, false);
-    Elements.contextappbar.addEventListener('MozAppbarDismissing', this, false);
-
-    // fired when a context sensitive item (bookmarks) changes state
-    window.addEventListener('MozContextActionsChange', this, false);
-
-    // browser events we need to update button state on
-    Elements.browsers.addEventListener('URLChanged', this, true);
-    Elements.tabList.addEventListener('TabSelect', this, true);
-
-    // tilegroup selection events for all modules get bubbled up
-    window.addEventListener("selectionchange", this, false);
-    Services.obs.addObserver(this, "metro_on_async_tile_created", false);
-
-    // gather appbar telemetry data
-    try {
-      UITelemetry.addSimpleMeasureFunction("metro-appbar",
-                                           this.getAppbarMeasures.bind(this));
-    } catch (ex) {
-      // swallow exception that occurs if metro-appbar measure is already set up
-    }
-  },
-
-  observe: function(aSubject, aTopic, aData) {
-    switch (aTopic) {
-      case "metro_on_async_tile_created":
-        this._updatePinButton();
-        break;
-    }
-  },
-
-  handleEvent: function Appbar_handleEvent(aEvent) {
-    switch (aEvent.type) {
-      case 'URLChanged':
-      case 'TabSelect':
-        this.update();
-        this.flushActiveTileset(aEvent.lastTab);
-        break;
-
-      case 'MozAppbarShowing':
-        this.update();
-        break;
-
-      case 'MozAppbarDismissing':
-        if (this.activeTileset && ('isBound' in this.activeTileset)) {
-          this.activeTileset.clearSelection();
-        }
-        this._clearContextualActions();
-        this.activeTileset = null;
-        break;
-
-      case 'MozContextActionsChange':
-        let actions = aEvent.actions;
-        let setName = aEvent.target.contextSetName;
-        // could transition in old, new buttons?
-        this.showContextualActions(actions, setName);
-        break;
-
-      case "selectionchange":
-        let nodeName = aEvent.target.nodeName;
-        if ('richgrid' === nodeName) {
-          this._onTileSelectionChanged(aEvent);
-        }
-        break;
-    }
-  },
-
-  flushActiveTileset: function flushActiveTileset(aTab) {
-    try {
-      let tab = aTab || Browser.selectedTab;
-      // Switching away from or loading a site into a startui tab that has actions
-      // pending, we consider this confirmation that the user wants to flush changes.
-      if (this.activeTileset && tab && tab.browser && tab.browser.currentURI.spec == kStartURI) {
-        ContextUI.dismiss();
-      }
-    } catch (ex) {}
-  },
-
-  shutdown: function shutdown() {
-    this.flushActiveTileset();
-  },
-
-  /*
-   * Called from various places when the visible content
-   * has changed such that button states may need to be
-   * updated.
-   */
-  update: function update() {
-    this._updatePinButton();
-    this._updateStarButton();
-  },
-
-  onPinButton: function() {
-    if (this.pinButton.checked) {
-      Browser.pinSite();
-    } else {
-      Browser.unpinSite();
-    }
-  },
-
-  onStarButton: function(aValue) {
-    if (aValue === undefined) {
-      aValue = this.starButton.checked;
-    }
-
-    if (aValue) {
-      Browser.starSite(function () {
-        Appbar._updateStarButton();
-      });
-    } else {
-      Browser.unstarSite(function () {
-        Appbar._updateStarButton();
-      });
-    }
-  },
-
-  onMenuButton: function(aEvent) {
-      let typesArray = [];
-
-      if (BrowserUI.isPrivateBrowsingEnabled) {
-        typesArray.push("private-browsing");
-      }
-      if (!BrowserUI.isStartTabVisible) {
-        typesArray.push("find-in-page");
-        if (ContextCommands.getPageSource())
-          typesArray.push("view-page-source");
-      }
-      if (ContextCommands.getStoreLink())
-        typesArray.push("ms-meta-data");
-      if (ConsolePanelView.enabled)
-        typesArray.push("open-error-console");
-      if (!Services.metro.immersive)
-        typesArray.push("open-jsshell");
-
-      typesArray.push("view-on-desktop");
-
-      var x = this.menuButton.getBoundingClientRect().left;
-      var y = Elements.toolbar.getBoundingClientRect().top;
-      ContextMenuUI.showContextMenu({
-        json: {
-          types: typesArray,
-          string: '',
-          xPos: x,
-          yPos: y,
-          leftAligned: true,
-          bottomAligned: true
-      }
-
-      });
-  },
-
-  onViewOnDesktop: function() {
-    let appStartup = Components.classes["@mozilla.org/toolkit/app-startup;1"].
-      getService(Components.interfaces.nsIAppStartup);
-
-    Services.prefs.setBoolPref('browser.sessionstore.resume_session_once', true);
-    this._incrementCountableEvent("switch-to-desktop-button");
-    appStartup.quit(Components.interfaces.nsIAppStartup.eAttemptQuit |
-                    Components.interfaces.nsIAppStartup.eRestart);
-  },
-
-  onAutocompleteCloseButton: function () {
-    Elements.autocomplete.closePopup();
-  },
-
-  dispatchContextualAction: function(aActionName){
-    let activeTileset = this.activeTileset;
-    if (activeTileset && ('isBound' in this.activeTileset)) {
-      // fire event on the richgrid, others can listen
-      // but we keep coupling loose so grid doesn't need to know about appbar
-      let event = document.createEvent("Events");
-      event.action = aActionName;
-      event.initEvent("context-action", true, true); // is cancelable
-      activeTileset.dispatchEvent(event);
-      if (!event.defaultPrevented) {
-        activeTileset.clearSelection();
-        Elements.contextappbar.dismiss();
-      }
-    }
-  },
-
-  showContextualActions: function(aVerbs, aSetName) {
-    // When the appbar is not visible, we want the icons to refresh right away
-    let immediate = !Elements.contextappbar.isShowing;
-
-    if (aVerbs.length) {
-      Elements.contextappbar.show();
-    }
-
-    // Look up all of the buttons for the verbs that should be visible.
-    let idsToVisibleVerbs = new Map();
-    for (let verb of aVerbs) {
-      let id = verb + "-selected-button";
-      if (!document.getElementById(id)) {
-        throw new Error("Appbar.showContextualActions: no button for " + verb);
-      }
-      idsToVisibleVerbs.set(id, verb);
-    }
-
-    // Sort buttons into 2 buckets - needing showing and needing hiding.
-    let toHide = [], toShow = [];
-    let buttons = Elements.contextappbar.getElementsByTagName("toolbarbutton");
-    for (let button of buttons) {
-      let verb = idsToVisibleVerbs.get(button.id);
-      if (verb != undefined) {
-        // Button should be visible, and may or may not be showing.
-        this._updateContextualActionLabel(button, verb, aSetName);
-        if (button.hidden) {
-          toShow.push(button);
-        }
-      } else if (!button.hidden) {
-        // Button is visible, but shouldn't be.
-        toHide.push(button);
-      }
-    }
-
-    if (immediate) {
-      toShow.forEach(function(element) {
-        element.removeAttribute("fade");
-        element.hidden = false;
-      });
-      toHide.forEach(function(element) {
-        element.setAttribute("fade", true);
-        element.hidden = true;
-      });
-      return;
-    }
-
-    return Task.spawn(function() {
-      if (toHide.length) {
-        yield Util.transitionElementVisibility(toHide, false);
-      }
-      if (toShow.length) {
-        yield Util.transitionElementVisibility(toShow, true);
-      }
-    });
-  },
-
-  _clearContextualActions: function() {
-    this.showContextualActions([]);
-  },
-
-  _updateContextualActionLabel: function(aButton, aVerb, aSetName) {
-    // True if the action's label string contains the set name and
-    // thus has to be selected based on the list passed in.
-    let usesSetName = aButton.hasAttribute("label-uses-set-name");
-    let name = "contextAppbar2." + aVerb + (usesSetName ? "." + aSetName : "");
-    aButton.label = Strings.browser.GetStringFromName(name);
-  },
-
-  _onTileSelectionChanged: function _onTileSelectionChanged(aEvent){
-    let activeTileset = aEvent.target;
-
-    // deselect tiles in other tile groups,
-    // ensure previousyl-activeTileset is bound before calling methods on it
-    if (this.activeTileset &&
-          ('isBound' in this.activeTileset) &&
-          this.activeTileset !== activeTileset) {
-      this.activeTileset.clearSelection();
-    }
-    // keep track of which view is the target/scope for the contextual actions
-    this.activeTileset = activeTileset;
-
-    // ask the view for the list verbs/action-names it thinks are
-    // appropriate for the tiles selected
-    let contextActions = activeTileset.contextActions;
-    let verbs = [v for (v of contextActions)];
-
-    // fire event with these verbs as payload
-    let event = document.createEvent("Events");
-    event.actions = verbs;
-    event.initEvent("MozContextActionsChange", true, false);
-    activeTileset.dispatchEvent(event);
-
-    if (verbs.length) {
-      Elements.contextappbar.show(); // should be no-op if we're already showing
-    } else {
-      Elements.contextappbar.dismiss();
-    }
-  },
-
-  // track certain appbar events and interactions for the UITelemetry probe
-  _countableEvents: {},
-
-  _incrementCountableEvent: function(aName) {
-    if (!(aName in this._countableEvents)) {
-      this._countableEvents[aName] = 0;
-    }
-    this._countableEvents[aName]++;
-  },
-
-  getAppbarMeasures: function() {
-    return {
-      countableEvents: this._countableEvents
-    };
-  },
-
-  _updatePinButton: function() {
-    this.pinButton.checked = Browser.isSitePinned();
-  },
-
-  _updateStarButton: function() {
-    Browser.isSiteStarredAsync(function (isStarred) {
-      this.starButton.checked = isStarred;
-    }.bind(this));
-  },
-
-};
deleted file mode 100644
--- a/browser/metro/base/content/apzc.js
+++ /dev/null
@@ -1,153 +0,0 @@
-// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-let Cc = Components.classes;
-let Ci = Components.interfaces;
-let Cu = Components.utils;
-let Cr = Components.results;
-
-/**
- * Misc. front end utilities for apzc management.
- * the pref: layers.async-pan-zoom.enabled is true.
- */
-
-var APZCObserver = {
-  _debugEvents: false,
-  _enabled: false,
-
-  get enabled() {
-    return this._enabled;
-  },
-
-  init: function() {
-    this._enabled = Services.prefs.getBoolPref(kAsyncPanZoomEnabled);
-    if (!this._enabled) {
-      return;
-    }
-
-    let os = Services.obs;
-    os.addObserver(this, "apzc-transform-begin", false);
-
-    Elements.tabList.addEventListener("TabSelect", this, true);
-    Elements.browsers.addEventListener("pageshow", this, true);
-    messageManager.addMessageListener("Content:ZoomToRect", this);
-  },
-
-  shutdown: function shutdown() {
-    if (!this._enabled) {
-      return;
-    }
-
-    let os = Services.obs;
-    os.removeObserver(this, "apzc-transform-begin");
-
-    Elements.tabList.removeEventListener("TabSelect", this, true);
-    Elements.browsers.removeEventListener("pageshow", this, true);
-    messageManager.removeMessageListener("Content:ZoomToRect", this);
-  },
-
-  handleEvent: function APZC_handleEvent(aEvent) {
-    switch (aEvent.type) {
-      case 'TabSelect':
-        this._resetDisplayPort();
-        break;
-
-      case 'pageshow':
-        if (aEvent.target != Browser.selectedBrowser.contentDocument) {
-          break;
-        }
-        this._resetDisplayPort();
-        break;
-    }
-  },
-
-  observe: function ao_observe(aSubject, aTopic, aData) {
-    if (aTopic == "apzc-transform-begin") {
-      // When we're panning, hide the main scrollbars by setting imprecise
-      // input (which sets a property on the browser which hides the scrollbar
-      // via CSS).  This reduces jittering from left to right. We may be able
-      // to get rid of this once we implement axis locking in /gfx APZC.
-      if (InputSourceHelper.isPrecise) {
-        InputSourceHelper._imprecise();
-      }
-    }
-  },
-
-  receiveMessage: function(aMessage) {
-    let json = aMessage.json;
-    let browser = aMessage.target;
-    switch (aMessage.name) {
-      case "Content:ZoomToRect": {
-        let { presShellId, viewId } = json;
-        let rect = Rect.fromRect(json.rect);
-        if (this.isRectZoomedIn(rect, browser.contentViewportBounds)) {
-          // If we're already zoomed in, zoom out instead.
-          rect = new Rect(0,0,0,0);
-        }
-        let data = [rect.x, rect.y, rect.width, rect.height, presShellId, viewId].join(",");
-        Services.obs.notifyObservers(null, "apzc-zoom-to-rect", data);
-      }
-    }
-  },
-
-  /**
-   * Check to see if the area of the rect visible in the viewport is
-   * approximately the max area of the rect we can show.
-   * Based on code from BrowserElementPanning.js
-   */
-  isRectZoomedIn: function (aRect, aViewport) {
-    let overlap = aViewport.intersect(aRect);
-    let overlapArea = overlap.width * overlap.height;
-    let availHeight = Math.min(aRect.width * aViewport.height / aViewport.width, aRect.height);
-    let showing = overlapArea / (aRect.width * availHeight);
-    let ratioW = (aRect.width / aViewport.width);
-    let ratioH = (aRect.height / aViewport.height);
-
-    return (showing > 0.9 && (ratioW > 0.9 || ratioH > 0.9));
-  },
-
-  _resetDisplayPort: function () {
-    // Start off with something reasonable. The apzc will handle these
-    // calculations once scrolling starts.
-    let doc = Browser.selectedBrowser.contentDocument.documentElement;
-    // While running tests, sometimes this can be null. If we don't have a
-    // root document, there's no point in setting a scrollable display port.
-    if (!doc) {
-      return;
-    }
-    let win = Browser.selectedBrowser.contentWindow;
-    let factor = 0.2;
-    let portX = 0;
-    let portY = 0;
-    let portWidth = ContentAreaObserver.width;
-    let portHeight = ContentAreaObserver.height;
-
-    if (portWidth < doc.scrollWidth) {
-      portWidth += ContentAreaObserver.width * factor;
-      if (portWidth > doc.scrollWidth) {
-        portWidth = doc.scrollWidth;
-      }
-    }
-    if (portHeight < doc.scrollHeight) {
-      portHeight += ContentAreaObserver.height * factor;
-      if (portHeight > doc.scrollHeight) {
-        portHeight = doc.scrollHeight;
-      }
-    }
-    if (win.scrollX > 0) {
-      portX -= ContentAreaObserver.width * factor;
-    }
-    if (win.scrollY > 0) {
-      portY -= ContentAreaObserver.height * factor;
-    }
-    let cwu = Browser.selectedBrowser.contentWindow
-                      .QueryInterface(Ci.nsIInterfaceRequestor)
-                      .getInterface(Ci.nsIDOMWindowUtils);
-    cwu.setDisplayPortForElement(portX, portY,
-                                 portWidth, portHeight,
-                                 Browser.selectedBrowser.contentDocument.documentElement,
-                                 0);
-  }
-};
deleted file mode 100644
--- a/browser/metro/base/content/bindings.css
+++ /dev/null
@@ -1,215 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-browser[tabmodalPromptShowing] {
-  -moz-user-focus: none !important;
-}
-
-browser[remote="false"] {
-  -moz-binding: url("chrome://browser/content/bindings/browser.xml#local-browser");
-}
-
-browser[remote="true"] {
-  -moz-binding: url("chrome://browser/content/bindings/browser.xml#remote-browser");
-}
-
-#tabs {
-  -moz-binding: url("chrome://browser/content/bindings/tabs.xml#tablist");
-}
-
-documenttab {
-  -moz-binding: url("chrome://browser/content/bindings/tabs.xml#documenttab");
-}
-
-appbar {
-  -moz-binding: url('chrome://browser/content/bindings/appbar.xml#appbarBinding');
-}
-
-flyoutpanel {
-  -moz-binding: url('chrome://browser/content/bindings/flyoutpanel.xml#flyoutpanelBinding');
-}
-cssthrobber {
-  -moz-binding: url('chrome://browser/content/bindings/cssthrobber.xml#cssthrobberBinding');
-}
-label[linewrap] {
-  -moz-binding: url("chrome://browser/content/bindings/bindings.xml#line-wrap-label");
-}
-label[linewrap].text-link, label[onclick][linewrap] {
-  -moz-binding: url("chrome://browser/content/bindings/bindings.xml#line-wrap-text-link");
-}
-
-settings {
-  -moz-binding: url("chrome://mozapps/content/extensions/setting.xml#settings");
-}
-setting {
-  display: none;
-}
-autoscroller {
-  -moz-binding: url('chrome://browser/content/bindings/popup.xml#element-popup');
-}
-
-notificationbox {
-  -moz-binding: url('chrome://browser/content/bindings/notification.xml#notificationbox');
-}
-notification {
-  -moz-binding: url('chrome://browser/content/bindings/notification.xml#notification');
-}
-
-circularprogressindicator {
-  -moz-binding: url('chrome://browser/content/bindings/circularprogress.xml#circular-progress-indicator');
-}
-
-setting[type="bool"] {
-  display: -moz-box;
-  -moz-binding: url("chrome://browser/content/bindings/toggleswitch.xml#setting-fulltoggle-bool");
-}
-
-setting[type="bool"][localized="true"] {
-  display: -moz-box;
-  -moz-binding: url("chrome://browser/content/bindings/toggleswitch.xml#setting-fulltoggle-localized-bool");
-}
-
-setting[type="boolint"] {
-  display: -moz-box;
-  -moz-binding: url("chrome://browser/content/bindings/toggleswitch.xml#setting-fulltoggle-boolint");
-}
-
-setting[type="integer"] {
-  display: -moz-box;
-  -moz-binding: url("chrome://mozapps/content/extensions/setting.xml#setting-integer");
-}
-
-setting[type="control"] {
-  display: -moz-box;
-  -moz-binding: url("chrome://mozapps/content/extensions/setting.xml#setting-control");
-}
-
-setting[type="string"] {
-  display: -moz-box;
-  -moz-binding: url("chrome://mozapps/content/extensions/setting.xml#setting-string");
-}
-
-setting[type="color"] {
-  display: -moz-box;
-  -moz-binding: url("chrome://mozapps/content/extensions/setting.xml#setting-color");
-}
-
-setting[type="file"],
-setting[type="directory"] {
-  display: -moz-box;
-  -moz-binding: url("chrome://mozapps/content/extensions/setting.xml#setting-path");
-}
-
-setting[type="radio"],
-setting[type="menulist"] {
-  display: -moz-box;
-  -moz-binding: url("chrome://mozapps/content/extensions/setting.xml#setting-multi");
-}
-
-#chrome-selection-overlay,
-#content-selection-overlay {
-  -moz-binding: url("chrome://browser/content/bindings/selectionoverlay.xml#selection-binding");
-}
-
-#urlbar-edit {
-  -moz-binding: url("chrome://browser/content/bindings/urlbar.xml#urlbar");
-}
-
-#urlbar-autocomplete {
-  -moz-binding: url("chrome://browser/content/bindings/urlbar.xml#urlbar-autocomplete");
-}
-
-richgrid {
-  -moz-binding: url("chrome://browser/content/bindings/grid.xml#richgrid");
-}
-
-richgriditem {
-  -moz-binding: url("chrome://browser/content/bindings/grid.xml#richgrid-empty-item");
-}
-richgriditem[value] {
-  -moz-binding: url("chrome://browser/content/bindings/grid.xml#richgrid-item");
-}
-
-placeitem {
-  -moz-binding: url("chrome://browser/content/bindings/bindings.xml#place-item");
-  background-color: transparent;
-}
-
-placeitem[type="folder"] {
-  -moz-binding: url("chrome://browser/content/bindings/bindings.xml#place-folder");
-}
-
-placelabel {
-  -moz-binding: url("chrome://browser/content/bindings/bindings.xml#place-label");
-}
-
-radio[type="toggle"] {
-  -moz-binding: url("chrome://global/content/bindings/radio.xml#radio");
-}
-
-radiogroup {
-  -moz-binding: url("chrome://global/content/bindings/radio.xml#radiogroup");
-}
-
-checkbox.toggleswitch {
-  -moz-binding: url("chrome://browser/content/bindings/toggleswitch.xml#checkbox-toggleswitch");
-}
-
-menulist {
-  -moz-binding: url("chrome://browser/content/bindings/bindings.xml#menulist");
-}
-
-.chrome-select-option {
-  -moz-binding: url("chrome://browser/content/bindings/bindings.xml#chrome-select-option");
-}
-
-/* richlist defaults ------------------------------------------------------- */
-richlistbox[batch] {
-  -moz-binding: url("chrome://browser/content/bindings/bindings.xml#richlistbox-batch");
-}
-
-richlistbox[bindingType="contextmenu"] {
-  -moz-binding: url("chrome://browser/content/bindings/bindings.xml#richlistbox-contextmenu");
-}
-
-richlistitem {
-  -moz-binding: url("chrome://browser/content/bindings/bindings.xml#richlistitem");
-}
-
-richlistitem[type="error"],
-richlistitem[type="warning"] {
-  -moz-binding: url("chrome://browser/content/bindings/console.xml#error");
-}
-
-richlistitem[type="message"]{
-  -moz-binding: url("chrome://browser/content/bindings/console.xml#message");
-}
-
-dialog {
-  -moz-binding: url("chrome://browser/content/bindings/dialog.xml#dialog");
-}
-
-/* Do not allow these to inherit from the toolkit binding */
-dialog.content-dialog {
-  -moz-binding: none;
-}
-
-/* Disable context menus in textboxes */
-.textbox-input-box,
-.textbox-input-box[spellcheck="true"] {
-  -moz-binding: url("chrome://browser/content/bindings/bindings.xml#input-box");
-}
-
-textbox {
-  -moz-binding: url("chrome://browser/content/bindings/bindings.xml#textbox");
-}
-
-/* used in about:config */
-textbox[type="search"] {
-  -moz-binding: url("chrome://browser/content/bindings/bindings.xml#search-textbox");
-}
-
-tabmodalprompt {
-  -moz-binding: url("chrome://browser/content/bindings/tabprompts.xml#tabmodalprompt");
-}
deleted file mode 100644
--- a/browser/metro/base/content/bindings/appbar.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-<?xml version="1.0"?>
-
-<bindings xmlns="http://www.mozilla.org/xbl"
-          xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-  <binding id="appbarBinding">
-    <content>
-      <xul:toolbar anonid="toolbar"><children/></xul:toolbar>
-    </content>
-
-    <implementation implements="nsIDOMEventListener">
-      <field name="sticky">false</field>
-      <field name="_toolbar" readonly="true">document.getAnonymousElementByAttribute(this, "anonid", "toolbar");</field>
-
-      <property name="isShowing" readonly="true">
-        <getter>
-          <![CDATA[
-            return this.getAttribute("visible") == "true";
-          ]]>
-        </getter>
-      </property>
-
-      <method name="_fire">
-        <parameter name="aName"/>
-        <body>
-          <![CDATA[
-            let event = document.createEvent("Events");
-            event.initEvent(aName, true, false);
-            this.dispatchEvent(event);
-          ]]>
-        </body>
-      </method>
-
-      <method name="dismiss">
-        <body>
-          <![CDATA[
-            if (!this.isShowing)
-              return;
-
-            let self = this;
-            this.setAttribute("hiding", "true");
-            this.addEventListener("transitionend", function appbar_transitionend() {
-              self.removeEventListener("transitionend", appbar_transitionend, false);
-              self.removeAttribute("hiding");
-            }, false);
-
-            this._fire("MozAppbarDismissing");
-            this.removeAttribute("visible");
-          ]]>
-        </body>
-      </method>
-
-      <method name="show">
-        <body>
-          <![CDATA[
-            if (this.isShowing)
-              return;
-
-            this._fire("MozAppbarShowing");
-            this.setAttribute("visible", "true");
-          ]]>
-        </body>
-      </method>
-
-      <method name="toggle">
-        <body>
-          <![CDATA[
-            if (this.getAttribute("visible") === "true") {
-              this.dismiss();
-            } else {
-              this.show();
-            }
-          ]]>
-        </body>
-      </method>
-    </implementation>
-  </binding>
-</bindings>
deleted file mode 100644
--- a/browser/metro/base/content/bindings/bindings.xml
+++ /dev/null
@@ -1,356 +0,0 @@
-<?xml version="1.0"?>
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
-   - License, v. 2.0. If a copy of the MPL was not distributed with this
-   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-
-<!DOCTYPE bindings [
-<!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd">
-%browserDTD;
-]>
-
-<bindings
-    xmlns="http://www.mozilla.org/xbl"
-    xmlns:xbl="http://www.mozilla.org/xbl"
-    xmlns:svg="http://www.w3.org/2000/svg"
-    xmlns:html="http://www.w3.org/1999/xhtml"
-    xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
-  <binding id="richlistbox-batch" extends="chrome://global/content/bindings/richlistbox.xml#richlistbox">
-    <handlers>
-      <handler event="scroll">
-        <![CDATA[
-          // if there no more items to insert, just return early
-          if (this._items.length == 0)
-            return;
-
-          if (this._contentScrollHeight == -1) {
-            this._contentScrollHeight = this.scrollBoxObject.scrolledHeight;
-          }
-
-          let y = this.scrollBoxObject.positionY;
-          let scrollRatio = (y + this._childrenHeight) / this._contentScrollHeight;
-
-          // If we're scrolled 80% to the bottom of the list, append the next
-          // set of items
-          if (scrollRatio > 0.8)
-            this._insertItems();
-        ]]>
-      </handler>
-    </handlers>
-    <implementation>
-      <!-- Number of elements to add to the list initially. If there are more
-           than this many elements to display, only add them to the list once
-           the user has scrolled towards them. This is a performance
-           optimization to avoid locking up while attempting to append hundreds
-           of nodes to our richlistbox.
-      -->
-      <property name="batchSize" readonly="true" onget="return this.getAttribute('batch')"/>
-
-      <field name="_childrenHeight">this.scrollBoxObject.height;</field>
-      <field name="_items">[]</field>
-
-      <method name="setItems">
-        <parameter name="aItems"/>
-        <body><![CDATA[
-          this._items = aItems;
-          this._insertItems();
-        ]]></body>
-      </method>
-
-      <method name="_insertItems">
-        <body><![CDATA[
-          let items = this._items.splice(0, this.batchSize);
-          if (!items.length)
-            return; // no items to insert
-
-          let count = items.length;
-          for (let i = 0; i<count; i++)
-            this.appendChild(items[i]);
-
-
-          // make sure we recalculate the scrollHeight of the content
-          this._contentScrollHeight = -1;
-        ]]></body>
-      </method>
-    </implementation>
-  </binding>
-
-  <binding id="richlistbox-contextmenu" extends="chrome://global/content/bindings/richlistbox.xml#richlistbox">
-    <handlers>
-      <handler event="click" phase="bubble">
-        <![CDATA[
-          ContextMenuUI.hide();
-        ]]>
-      </handler>
-    </handlers>
-  </binding>
-
-  <binding id="richlistitem" extends="chrome://global/content/bindings/richlistbox.xml#richlistitem">
-    <handlers>
-      <handler event="mousedown" phase="capturing">
-        <![CDATA[
-          // We'll get this if the user is interacting via the mouse
-          let domUtils = Components.classes["@mozilla.org/inspector/dom-utils;1"].
-                                           getService(Ci.inIDOMUtils);
-          domUtils.setContentState(this, 0x00000001);
-        ]]>
-      </handler>
-      <handler event="click" phase="capturing">
-        <![CDATA[
-          // allow normal mouse event processing
-          if (!InputSourceHelper || InputSourceHelper.isPrecise)
-            return;
-          // trap this here, we'll rely on tap events
-          // event.stopPropagation();
-        ]]>
-      </handler>
-      <handler event="touchstart" phase="capturing">
-        <![CDATA[
-          // touch input event
-          let domUtils = Components.classes["@mozilla.org/inspector/dom-utils;1"].
-                                           getService(Ci.inIDOMUtils);
-          domUtils.setContentState(this, 0x00000001);
-        ]]>
-      </handler>
-    </handlers>
-  </binding>
-
-  <binding id="menulist" display="xul:box" extends="chrome://global/content/bindings/menulist.xml#menulist">
-    <handlers>
-      <handler event="mousedown" phase="capturing">
-        <![CDATA[
-          // Stop the normal menupopup from appearing
-          event.stopPropagation();
-        ]]>
-      </handler>
-
-      <handler event="click" button="0">
-        <![CDATA[
-          if (this.disabled || this.itemCount == 0)
-            return;
-
-          this.focus();
-          MenuControlUI.show(this);
-        ]]>
-      </handler>
-
-      <handler event="command" phase="capturing">
-        <![CDATA[
-          // The dropmark (button) fires a command event too. Don't forward that.
-          // Just forward the menuitem command events, which the toolkit version does.
-          if (event.target.parentNode.parentNode != this)
-            event.stopPropagation();
-        ]]>
-      </handler>
-    </handlers>
-  </binding>
-
-  <binding id="chrome-select-option">
-    <content orient="horizontal" flex="1">
-      <xul:image class="chrome-select-option-image" anonid="check"/>
-      <xul:label anonid="label" xbl:inherits="value=label"/>
-    </content>
-
-    <implementation>
-      <property name="selected">
-        <getter>
-          <![CDATA[
-            return this.hasAttribute("selected");
-          ]]>
-        </getter>
-        <setter>
-          <![CDATA[
-            if (val)
-              this.setAttribute("selected", "true");
-            else
-              this.removeAttribute("selected");
-            return val;
-          ]]>
-        </setter>
-      </property>
-    </implementation>
-  </binding>
-
-  <binding id="select-button" extends="xul:box">
-    <content>
-      <svg:svg width="11px" version="1.1" xmlns="http://www.w3.org/2000/svg" style="position: absolute; top: -moz-calc(50% - 2px); left: 4px;">
-        <svg:polyline points="1 1 5 6 9 1" stroke="#414141" stroke-width="2" stroke-linecap="round" fill="transparent" stroke-linejoin="round"/>
-      </svg:svg>
-    </content>
-  </binding>
-
-  <binding id="textbox" extends="chrome://global/content/bindings/textbox.xml#textbox">
-    <handlers>
-      <handler event="contextmenu" phase="capturing">
-        <![CDATA[
-          let box = this.inputField.parentNode;
-          box.showContextMenu(this, event, false);
-        ]]>
-      </handler>
-      <handler event="click" phase="capturing">
-        <![CDATA[
-        if (event.mozInputSource == Ci.nsIDOMMouseEvent.MOZ_SOURCE_TOUCH) {
-          if (typeof SelectionHelperUI != 'undefined') {
-            SelectionHelperUI.attachEditSession(ChromeSelectionHandler,
-                event.clientX, event.clientY, this);
-          } else {
-            // If we don't have access to SelectionHelperUI then we are using this
-            // binding for browser content (e.g. about:config)
-            Services.obs.notifyObservers(event, "attach_edit_session_to_content", "");
-          }
-        }
-      ]]>
-      </handler>
-    </handlers>
-  </binding>
-
-  <binding id="search-textbox" extends="chrome://global/content/bindings/textbox.xml#search-textbox">
-    <implementation>
-      <field name="_searchClear">
-        <![CDATA[
-          document.getAnonymousElementByAttribute(this, "class", "textbox-search-clear");
-        ]]>
-      </field>
-    </implementation>
-
-    <handlers>
-      <handler event="contextmenu" phase="capturing">
-        <![CDATA[
-          let box = this.inputField.parentNode;
-          box.showContextMenu(this, event, false);
-        ]]>
-      </handler>
-
-      <handler event="text" phase="bubbling"><![CDATA[
-        // Listen for composition update, some VKB that does suggestions does not
-        // update directly the content of the field but in this case we want to
-        // search as soon as something is entered in the field
-        let evt = document.createEvent("Event");
-        evt.initEvent("input", true, false);
-        this.dispatchEvent(evt);
-      ]]></handler>
-
-      <handler event="click" phase="bubbling"><![CDATA[
-        // bug 629661. To reset the autosuggestions mechanism of Android, the
-        // textfield need to reset the IME state
-        if (event.originalTarget == this._searchClear) {
-          setTimeout(function(self) {
-            try {
-              let imeEditor = self.inputField.QueryInterface(Ci.nsIDOMNSEditableElement)
-                                             .editor
-                                             .QueryInterface(Ci.nsIEditorIMESupport);
-              if (imeEditor.composing)
-                imeEditor.forceCompositionEnd();
-            } catch(e) {}
-          }, 0, this);
-        }
-      ]]></handler>
-    </handlers>
-  </binding>
-
-  <binding id="input-box" extends="xul:box">
-    <implementation>
-      <method name="showContextMenu">
-        <parameter name="aTextbox"/>
-        <parameter name="aEvent"/>
-        <parameter name="aIgnoreReadOnly"/>
-        <body><![CDATA[
-          let selectionStart = aTextbox.selectionStart;
-          let selectionEnd = aTextbox.selectionEnd;
-
-          let json = { types: ["input-text"], string: "" };
-          if (selectionStart != selectionEnd) {
-            json.types.push("cut");
-            json.types.push("copy");
-          }
-
-          if (selectionStart > 0 || selectionEnd < aTextbox.textLength)
-            json.types.push("select-all");
-
-          let clipboard = Components.classes["@mozilla.org/widget/clipboard;1"].
-                                            getService(Ci.nsIClipboard);
-          let flavors = ["text/unicode"];
-          let hasData = clipboard.hasDataMatchingFlavors(flavors, flavors.length, Ci.nsIClipboard.kGlobalClipboard);
-
-          if (hasData && (!aTextbox.readOnly || aIgnoreReadOnly)) {
-            json.types.push("paste");
-            if (aTextbox.type == "url") {
-              json.types.push("paste-url");
-            }
-          }
-          json.xPos = aEvent.clientX;
-          json.yPos = aEvent.clientY;
-          json.source = aEvent.mozInputSource;
-          ContextMenuUI.showContextMenu({ target: aTextbox, json: json });
-        ]]></body>
-      </method>
-    </implementation>
-    <handlers>
-      <handler event="click" phase="capturing">
-        <![CDATA[
-          if (event.mozInputSource == Ci.nsIDOMMouseEvent.MOZ_SOURCE_TOUCH) {
-            if (typeof SelectionHelperUI != 'undefined') {
-              SelectionHelperUI.attachEditSession(ChromeSelectionHandler,
-                  event.clientX, event.clientY, event.target);
-            } else {
-              // If we don't have access to SelectionHelperUI then we are using this
-              // binding for browser content (e.g. about:config)
-              Services.obs.notifyObservers(event, "attach_edit_session_to_content", "");
-            }
-          }
-        ]]>
-      </handler>
-    </handlers>
-  </binding>
-
-  <binding id="line-wrap-label" extends="chrome://global/content/bindings/text.xml#text-label">
-    <implementation>
-      <constructor>
-        <![CDATA[
-          if (this.hasAttribute("value")) {
-            this.textContent = this.getAttribute("value");
-            this.removeAttribute("value");
-          }
-        ]]>
-      </constructor>
-      <property name="value">
-        <getter>
-          <![CDATA[
-            return this.textContent;
-          ]]>
-        </getter>
-        <setter>
-          <![CDATA[
-            return (this.textContent = val);
-          ]]>
-        </setter>
-      </property>
-    </implementation>
-  </binding>
-  <binding id="line-wrap-text-link" extends="chrome://global/content/bindings/text.xml#text-link">
-    <implementation>
-      <constructor>
-        <![CDATA[
-          if (this.hasAttribute("value")) {
-            this.textContent = this.getAttribute("value");
-            this.removeAttribute("value");
-          }
-        ]]>
-      </constructor>
-      <property name="value">
-        <getter>
-          <![CDATA[
-            return this.textContent;
-          ]]>
-        </getter>
-        <setter>
-          <![CDATA[
-            return (this.textContent = val);
-          ]]>
-        </setter>
-      </property>
-    </implementation>
-  </binding>
-
-</bindings>
deleted file mode 100644
--- a/browser/metro/base/content/bindings/browser.js
+++ /dev/null
@@ -1,764 +0,0 @@
-// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-let Cc = Components.classes;
-let Ci = Components.interfaces;
-let Cu = Components.utils;
-
-Cu.import("resource://gre/modules/Services.jsm");
-Cu.import("resource://gre/modules/FormData.jsm");
-Cu.import("resource://gre/modules/ScrollPosition.jsm");
-Cu.import("resource://gre/modules/Timer.jsm", this);
-
-let WebProgressListener = {
-  _lastLocation: null,
-  _firstPaint: false,
-
-  init: function() {
-    let flags = Ci.nsIWebProgress.NOTIFY_LOCATION |
-                Ci.nsIWebProgress.NOTIFY_SECURITY |
-                Ci.nsIWebProgress.NOTIFY_STATE_WINDOW |
-                Ci.nsIWebProgress.NOTIFY_STATE_NETWORK |
-                Ci.nsIWebProgress.NOTIFY_STATE_DOCUMENT;
-
-    let webProgress = docShell.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIWebProgress);
-    webProgress.addProgressListener(this, flags);
-  },
-
-  onStateChange: function onStateChange(aWebProgress, aRequest, aStateFlags, aStatus) {
-    if (content != aWebProgress.DOMWindow)
-      return;
-
-    sendAsyncMessage("Content:StateChange", {
-      contentWindowId: this.contentWindowId,
-      stateFlags: aStateFlags,
-      status: aStatus
-    });
-  },
-
-  onLocationChange: function onLocationChange(aWebProgress, aRequest, aLocationURI, aFlags) {
-    if (content != aWebProgress.DOMWindow)
-      return;
-
-    let spec = aLocationURI ? aLocationURI.spec : "";
-    let location = spec.split("#")[0];
-
-    let charset = content.document.characterSet;
-
-    sendAsyncMessage("Content:LocationChange", {
-      contentWindowId: this.contentWindowId,
-      documentURI:     aWebProgress.DOMWindow.document.documentURIObject.spec,
-      location:        spec,
-      canGoBack:       docShell.canGoBack,
-      canGoForward:    docShell.canGoForward,
-      charset:         charset.toString()
-    });
-
-    this._firstPaint = false;
-    let self = this;
-
-    // Keep track of hash changes
-    this.hashChanged = (location == this._lastLocation);
-    this._lastLocation = location;
-
-    // When a new page is loaded fire a message for the first paint
-    addEventListener("MozAfterPaint", function(aEvent) {
-      removeEventListener("MozAfterPaint", arguments.callee, true);
-
-      self._firstPaint = true;
-      let scrollOffset = ContentScroll.getScrollOffset(content);
-      sendAsyncMessage("Browser:FirstPaint", scrollOffset);
-    }, true);
-  },
-
-  onStatusChange: function onStatusChange(aWebProgress, aRequest, aStatus, aMessage) {
-  },
-
-  onSecurityChange: function onSecurityChange(aWebProgress, aRequest, aState) {
-    if (content != aWebProgress.DOMWindow)
-      return;
-
-    let serialization = SecurityUI.getSSLStatusAsString();
-
-    sendAsyncMessage("Content:SecurityChange", {
-      contentWindowId: this.contentWindowId,
-      SSLStatusAsString: serialization,
-      state: aState
-    });
-  },
-
-  get contentWindowId() {
-    return content.QueryInterface(Ci.nsIInterfaceRequestor)
-                  .getInterface(Ci.nsIDOMWindowUtils)
-                  .currentInnerWindowID;
-  },
-
-  QueryInterface: function QueryInterface(aIID) {
-    if (aIID.equals(Ci.nsIWebProgressListener) ||
-        aIID.equals(Ci.nsISupportsWeakReference) ||
-        aIID.equals(Ci.nsISupports)) {
-        return this;
-    }
-
-    throw Components.results.NS_ERROR_NO_INTERFACE;
-  }
-};
-
-WebProgressListener.init();
-
-
-let SecurityUI = {
-  getSSLStatusAsString: function() {
-    let status = docShell.securityUI.QueryInterface(Ci.nsISSLStatusProvider).SSLStatus;
-
-    if (status) {
-      let serhelper = Cc["@mozilla.org/network/serialization-helper;1"]
-                      .getService(Ci.nsISerializationHelper);
-
-      status.QueryInterface(Ci.nsISerializable);
-      return serhelper.serializeToString(status);
-    }
-
-    return null;
-  }
-};
-
-let WebNavigation =  {
-  _webNavigation: docShell.QueryInterface(Ci.nsIWebNavigation),
-  _timer: null,
-
-  init: function() {
-    addMessageListener("WebNavigation:GoBack", this);
-    addMessageListener("WebNavigation:GoForward", this);
-    addMessageListener("WebNavigation:GotoIndex", this);
-    addMessageListener("WebNavigation:LoadURI", this);
-    addMessageListener("WebNavigation:Reload", this);
-    addMessageListener("WebNavigation:Stop", this);
-  },
-
-  receiveMessage: function(message) {
-    switch (message.name) {
-      case "WebNavigation:GoBack":
-        this.goBack();
-        break;
-      case "WebNavigation:GoForward":
-        this.goForward();
-        break;
-      case "WebNavigation:GotoIndex":
-        this.gotoIndex(message);
-        break;
-      case "WebNavigation:LoadURI":
-        this.loadURI(message);
-        break;
-      case "WebNavigation:Reload":
-        this.reload(message);
-        break;
-      case "WebNavigation:Stop":
-        this.stop(message);
-        break;
-    }
-  },
-
-  goBack: function() {
-    if (this._webNavigation.canGoBack)
-      this._webNavigation.goBack();
-  },
-
-  goForward: function() {
-    if (this._webNavigation.canGoForward)
-      this._webNavigation.goForward();
-  },
-
-  gotoIndex: function(message) {
-    this._webNavigation.gotoIndex(message.index);
-  },
-
-  loadURI: function(message) {
-    let flags = message.json.flags || this._webNavigation.LOAD_FLAGS_NONE;
-    this._webNavigation.loadURI(message.json.uri, flags, null, null, null);
-
-    let tabData = message.json;
-    if (tabData.entries) {
-      // We are going to load from history so kill the current load. We do not
-      // want the load added to the history anyway. We reload after resetting history
-      this._webNavigation.stop(this._webNavigation.STOP_ALL);
-      this._restoreHistory(tabData, 0);
-    }
-  },
-
-  reload: function(message) {
-    let flags = message.json.flags || this._webNavigation.LOAD_FLAGS_NONE;
-    this._webNavigation.reload(flags);
-  },
-
-  stop: function(message) {
-    let flags = message.json.flags || this._webNavigation.STOP_ALL;
-    this._webNavigation.stop(flags);
-  },
-
-  _restoreHistory: function _restoreHistory(aTabData, aCount) {
-    // We need to wait for the sessionHistory to be initialized and there
-    // is no good way to do this. We'll try a wait loop like desktop
-    try {
-      if (!this._webNavigation.sessionHistory)
-        throw new Error();
-    } catch (ex) {
-      if (aCount < 10) {
-        let self = this;
-        this._timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
-        this._timer.initWithCallback(function(aTimer) {
-          self._timer = null;
-          self._restoreHistory(aTabData, aCount + 1);
-        }, 100, Ci.nsITimer.TYPE_ONE_SHOT);
-        return;
-      }
-    }
-
-    let history = this._webNavigation.sessionHistory;
-    if (history.count > 0)
-      history.PurgeHistory(history.count);
-    history.QueryInterface(Ci.nsISHistoryInternal);
-
-    // helper hashes for ensuring unique frame IDs and unique document
-    // identifiers.
-    let idMap = { used: {} };
-    let docIdentMap = {};
-
-    for (let i = 0; i < aTabData.entries.length; i++) {
-      if (!aTabData.entries[i].url)
-        continue;
-      history.addEntry(this._deserializeHistoryEntry(aTabData.entries[i], idMap, docIdentMap), true);
-    }
-
-    // We need to force set the active history item and cause it to reload since
-    // we stop the load above
-    let activeIndex = (aTabData.index || aTabData.entries.length) - 1;
-    history.getEntryAtIndex(activeIndex, true);
-    history.QueryInterface(Ci.nsISHistory).reloadCurrentEntry();
-  },
-
-  _deserializeHistoryEntry: function _deserializeHistoryEntry(aEntry, aIdMap, aDocIdentMap) {
-    let shEntry = Cc["@mozilla.org/browser/session-history-entry;1"].createInstance(Ci.nsISHEntry);
-
-    shEntry.setURI(Services.io.newURI(aEntry.url, null, null));
-    shEntry.setTitle(aEntry.title || aEntry.url);
-    if (aEntry.subframe)
-      shEntry.setIsSubFrame(aEntry.subframe || false);
-    shEntry.loadType = Ci.nsIDocShellLoadInfo.loadHistory;
-    if (aEntry.contentType)
-      shEntry.contentType = aEntry.contentType;
-    if (aEntry.referrer)
-      shEntry.referrerURI = Services.io.newURI(aEntry.referrer, null, null);
-
-    if (aEntry.cacheKey) {
-      let cacheKey = Cc["@mozilla.org/supports-PRUint32;1"].createInstance(Ci.nsISupportsPRUint32);
-      cacheKey.data = aEntry.cacheKey;
-      shEntry.cacheKey = cacheKey;
-    }
-
-    if (aEntry.ID) {
-      // get a new unique ID for this frame (since the one from the last
-      // start might already be in use)
-      let id = aIdMap[aEntry.ID] || 0;
-      if (!id) {
-        for (id = Date.now(); id in aIdMap.used; id++);
-        aIdMap[aEntry.ID] = id;
-        aIdMap.used[id] = true;
-      }
-      shEntry.ID = id;
-    }
-
-    if (aEntry.docshellID)
-      shEntry.docshellID = aEntry.docshellID;
-
-    if (aEntry.structuredCloneState && aEntry.structuredCloneVersion) {
-      shEntry.stateData =
-        Cc["@mozilla.org/docshell/structured-clone-container;1"].
-        createInstance(Ci.nsIStructuredCloneContainer);
-
-      shEntry.stateData.initFromBase64(aEntry.structuredCloneState, aEntry.structuredCloneVersion);
-    }
-
-    if (aEntry.scroll) {
-      let scrollPos = aEntry.scroll.split(",");
-      scrollPos = [parseInt(scrollPos[0]) || 0, parseInt(scrollPos[1]) || 0];
-      shEntry.setScrollPosition(scrollPos[0], scrollPos[1]);
-    }
-
-    let childDocIdents = {};
-    if (aEntry.docIdentifier) {
-      // If we have a serialized document identifier, try to find an SHEntry
-      // which matches that doc identifier and adopt that SHEntry's
-      // BFCacheEntry.  If we don't find a match, insert shEntry as the match
-      // for the document identifier.
-      let matchingEntry = aDocIdentMap[aEntry.docIdentifier];
-      if (!matchingEntry) {
-        matchingEntry = {shEntry: shEntry, childDocIdents: childDocIdents};
-        aDocIdentMap[aEntry.docIdentifier] = matchingEntry;
-      } else {
-        shEntry.adoptBFCacheEntry(matchingEntry.shEntry);
-        childDocIdents = matchingEntry.childDocIdents;
-      }
-    }
-
-    if (aEntry.owner_b64) {
-      let ownerInput = Cc["@mozilla.org/io/string-input-stream;1"].createInstance(Ci.nsIStringInputStream);
-      let binaryData = atob(aEntry.owner_b64);
-      ownerInput.setData(binaryData, binaryData.length);
-      let binaryStream = Cc["@mozilla.org/binaryinputstream;1"].createInstance(Ci.nsIObjectInputStream);
-      binaryStream.setInputStream(ownerInput);
-      try { // Catch possible deserialization exceptions
-        shEntry.owner = binaryStream.readObject(true);
-      } catch (ex) { dump(ex); }
-    }
-
-    if (aEntry.children && shEntry instanceof Ci.nsISHContainer) {
-      for (let i = 0; i < aEntry.children.length; i++) {
-        if (!aEntry.children[i].url)
-          continue;
-
-        // We're getting sessionrestore.js files with a cycle in the
-        // doc-identifier graph, likely due to bug 698656.  (That is, we have
-        // an entry where doc identifier A is an ancestor of doc identifier B,
-        // and another entry where doc identifier B is an ancestor of A.)
-        //
-        // If we were to respect these doc identifiers, we'd create a cycle in
-        // the SHEntries themselves, which causes the docshell to loop forever
-        // when it looks for the root SHEntry.
-        //
-        // So as a hack to fix this, we restrict the scope of a doc identifier
-        // to be a node's siblings and cousins, and pass childDocIdents, not
-        // aDocIdents, to _deserializeHistoryEntry.  That is, we say that two
-        // SHEntries with the same doc identifier have the same document iff
-        // they have the same parent or their parents have the same document.
-
-        shEntry.AddChild(this._deserializeHistoryEntry(aEntry.children[i], aIdMap, childDocIdents), i);
-      }
-    }
-    
-    return shEntry;
-  },
-
-  sendHistory: function sendHistory() {
-    // We need to package up the session history and send it to the sessionstore
-    let entries = [];
-    let history = docShell.QueryInterface(Ci.nsIWebNavigation).sessionHistory;
-    for (let i = 0; i < history.count; i++) {
-      let entry = this._serializeHistoryEntry(history.getEntryAtIndex(i, false));
-
-      // If someone directly navigates to one of these URLs and they switch to Desktop,
-      // we need to make the page load-able.
-      if (entry.url == "about:home" || entry.url == "about:start") {
-        entry.url = "about:newtab";
-      }
-      entries.push(entry);
-    }
-    let index = history.index + 1;
-    sendAsyncMessage("Content:SessionHistory", { entries: entries, index: index });
-  },
-
-  _serializeHistoryEntry: function _serializeHistoryEntry(aEntry) {
-    let entry = { url: aEntry.URI.spec };
-
-    if (Util.isURLEmpty(entry.url)) {
-      entry.title = Util.getEmptyURLTabTitle();
-    } else {
-      entry.title = aEntry.title;
-    }
-
-    if (!(aEntry instanceof Ci.nsISHEntry))
-      return entry;
-
-    let cacheKey = aEntry.cacheKey;
-    if (cacheKey && cacheKey instanceof Ci.nsISupportsPRUint32 && cacheKey.data != 0)
-      entry.cacheKey = cacheKey.data;
-
-    entry.ID = aEntry.ID;
-    entry.docshellID = aEntry.docshellID;
-
-    if (aEntry.referrerURI)
-      entry.referrer = aEntry.referrerURI.spec;
-
-    if (aEntry.contentType)
-      entry.contentType = aEntry.contentType;
-
-    let x = {}, y = {};
-    aEntry.getScrollPosition(x, y);
-    if (x.value != 0 || y.value != 0)
-      entry.scroll = x.value + "," + y.value;
-
-    if (aEntry.owner) {
-      try {
-        let binaryStream = Cc["@mozilla.org/binaryoutputstream;1"].createInstance(Ci.nsIObjectOutputStream);
-        let pipe = Cc["@mozilla.org/pipe;1"].createInstance(Ci.nsIPipe);
-        pipe.init(false, false, 0, 0xffffffff, null);
-        binaryStream.setOutputStream(pipe.outputStream);
-        binaryStream.writeCompoundObject(aEntry.owner, Ci.nsISupports, true);
-        binaryStream.close();
-
-        // Now we want to read the data from the pipe's input end and encode it.
-        let scriptableStream = Cc["@mozilla.org/binaryinputstream;1"].createInstance(Ci.nsIBinaryInputStream);
-        scriptableStream.setInputStream(pipe.inputStream);
-        let ownerBytes = scriptableStream.readByteArray(scriptableStream.available());
-        // We can stop doing base64 encoding once our serialization into JSON
-        // is guaranteed to handle all chars in strings, including embedded
-        // nulls.
-        entry.owner_b64 = btoa(String.fromCharCode.apply(null, ownerBytes));
-      } catch (e) { dump(e); }
-    }
-
-    entry.docIdentifier = aEntry.BFCacheEntry.ID;
-
-    if (aEntry.stateData != null) {
-      entry.structuredCloneState = aEntry.stateData.getDataAsBase64();
-      entry.structuredCloneVersion = aEntry.stateData.formatVersion;
-    }
-
-    if (!(aEntry instanceof Ci.nsISHContainer))
-      return entry;
-
-    if (aEntry.childCount > 0) {
-      entry.children = [];
-      for (let i = 0; i < aEntry.childCount; i++) {
-        let child = aEntry.GetChildAt(i);
-        if (child)
-          entry.children.push(this._serializeHistoryEntry(child));
-        else // to maintain the correct frame order, insert a dummy entry 
-          entry.children.push({ url: "about:blank" });
-
-        // don't try to restore framesets containing wyciwyg URLs (cf. bug 424689 and bug 450595)
-        if (/^wyciwyg:\/\//.test(entry.children[i].url)) {
-          delete entry.children;
-          break;
-        }
-      }
-    }
-
-    return entry;
-  }
-};
-
-WebNavigation.init();
-
-
-let DOMEvents =  {
-  _timeout: null,
-  _sessionEvents: new Set(),
-  _sessionEventMap: {"SessionStore:collectFormdata" : FormData.collect,
-                     "SessionStore:collectScrollPosition" : ScrollPosition.collect},
-
-  init: function() {
-    addEventListener("DOMContentLoaded", this, false);
-    addEventListener("DOMTitleChanged", this, false);
-    addEventListener("DOMLinkAdded", this, false);
-    addEventListener("DOMWillOpenModalDialog", this, false);
-    addEventListener("DOMModalDialogClosed", this, true);
-    addEventListener("DOMWindowClose", this, false);
-    addEventListener("DOMPopupBlocked", this, false);
-    addEventListener("pageshow", this, false);
-    addEventListener("pagehide", this, false);
-
-    addEventListener("input", this, true);
-    addEventListener("change", this, true);
-    addEventListener("scroll", this, true);
-    addMessageListener("SessionStore:restoreSessionTabData", this);
-  },
-
-  receiveMessage: function(message) {
-    switch (message.name) {
-      case "SessionStore:restoreSessionTabData":
-        if (message.json.formdata)
-          FormData.restore(content, message.json.formdata);
-        if (message.json.scroll)
-          ScrollPosition.restore(content, message.json.scroll.scroll);
-        break;
-    }
-  },
-
-  handleEvent: function(aEvent) {
-    let document = content.document;
-    switch (aEvent.type) {
-      case "DOMContentLoaded":
-        if (document.documentURIObject.spec == "about:blank")
-          return;
-
-        sendAsyncMessage("DOMContentLoaded", { });
-
-        // Send the session history now too
-        WebNavigation.sendHistory();
-        break;
-
-      case "pageshow":
-      case "pagehide": {
-        if (aEvent.target.defaultView != content)
-          break;
-
-        let util = aEvent.target.defaultView.QueryInterface(Ci.nsIInterfaceRequestor)
-                                            .getInterface(Ci.nsIDOMWindowUtils);
-
-        let json = {
-          contentWindowWidth: content.innerWidth,
-          contentWindowHeight: content.innerHeight,
-          windowId: util.outerWindowID,
-          persisted: aEvent.persisted
-        };
-
-        // Clear onload focus to prevent the VKB to be shown unexpectingly
-        // but only if the location has really changed and not only the
-        // fragment identifier
-        let contentWindowID = content.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils).currentInnerWindowID;
-        if (!WebProgressListener.hashChanged && contentWindowID == util.currentInnerWindowID) {
-          let focusManager = Cc["@mozilla.org/focus-manager;1"].getService(Ci.nsIFocusManager);
-          focusManager.clearFocus(content);
-        }
-
-        sendAsyncMessage(aEvent.type, json);
-        break;
-      }
-
-      case "DOMPopupBlocked": {
-        let util = aEvent.requestingWindow.QueryInterface(Ci.nsIInterfaceRequestor)
-                                          .getInterface(Ci.nsIDOMWindowUtils);
-        let json = {
-          windowId: util.outerWindowID,
-          popupWindowURI: {
-            spec: aEvent.popupWindowURI.spec,
-            charset: aEvent.popupWindowURI.originCharset
-          },
-          popupWindowFeatures: aEvent.popupWindowFeatures,
-          popupWindowName: aEvent.popupWindowName
-        };
-
-        sendAsyncMessage("DOMPopupBlocked", json);
-        break;
-      }
-
-      case "DOMTitleChanged":
-        sendAsyncMessage("DOMTitleChanged", { title: document.title });
-        break;
-
-      case "DOMLinkAdded":
-        let target = aEvent.originalTarget;
-        if (!target.href || target.disabled)
-          return;
-
-        let json = {
-          windowId: target.ownerDocument.defaultView.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils).currentInnerWindowID,
-          href: target.href,
-          charset: document.characterSet,
-          title: target.title,
-          rel: target.rel,
-          type: target.type
-        };
-        
-        // rel=icon can also have a sizes attribute
-        if (target.hasAttribute("sizes"))
-          json.sizes = target.getAttribute("sizes");
-
-        sendAsyncMessage("DOMLinkAdded", json);
-        break;
-
-      case "DOMWillOpenModalDialog":
-      case "DOMModalDialogClosed":
-      case "DOMWindowClose":
-        let retvals = sendSyncMessage(aEvent.type, { });
-        for (let i in retvals) {
-          if (retvals[i].preventDefault) {
-            aEvent.preventDefault();
-            break;
-          }
-        }
-        break;
-      case "input":
-      case "change":
-        this._sessionEvents.add("SessionStore:collectFormdata");
-        this._sendUpdates();
-        break;
-      case "scroll":
-        this._sessionEvents.add("SessionStore:collectScrollPosition");
-        this._sendUpdates();
-        break;
-    }
-  },
-
-  _sendUpdates: function() {
-    if (!this._timeout) {
-      // Wait a little before sending the message to batch multiple changes.
-      this._timeout = setTimeout(function() {
-        for (let eventType of this._sessionEvents) {
-          sendAsyncMessage(eventType, {
-            data: this._sessionEventMap[eventType](content)
-          });
-        }
-        this._sessionEvents.clear();
-        clearTimeout(this._timeout);
-        this._timeout = null;
-      }.bind(this), 1000);
-    }
-  }
-};
-
-DOMEvents.init();
-
-let ContentScroll =  {
-  // The most recent offset set by APZC for the root scroll frame
-  _scrollOffset: { x: 0, y: 0 },
-
-  init: function() {
-    addMessageListener("Content:SetWindowSize", this);
-
-    addEventListener("pagehide", this, false);
-    addEventListener("MozScrolledAreaChanged", this, false);
-  },
-
-  getScrollOffset: function(aWindow) {
-    let cwu = aWindow.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils);
-    let scrollX = {}, scrollY = {};
-    cwu.getScrollXY(false, scrollX, scrollY);
-    return { x: scrollX.value, y: scrollY.value };
-  },
-
-  getScrollOffsetForElement: function(aElement) {
-    if (aElement.parentNode == aElement.ownerDocument)
-      return this.getScrollOffset(aElement.ownerDocument.defaultView);
-    return { x: aElement.scrollLeft, y: aElement.scrollTop };
-  },
-
-  receiveMessage: function(aMessage) {
-    let json = aMessage.json;
-    switch (aMessage.name) {
-      case "Content:SetWindowSize": {
-        let cwu = content.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils);
-        cwu.setCSSViewport(json.width, json.height);
-        sendAsyncMessage("Content:SetWindowSize:Complete", {});
-        break;
-      }
-    }
-  },
-
-  handleEvent: function(aEvent) {
-    switch (aEvent.type) {
-      case "pagehide":
-        this._scrollOffset = { x: 0, y: 0 };
-        break;
-
-      case "MozScrolledAreaChanged": {
-        let doc = aEvent.originalTarget;
-        if (content != doc.defaultView) // We are only interested in root scroll pane changes
-          return;
-
-        sendAsyncMessage("MozScrolledAreaChanged", {
-          width: aEvent.width,
-          height: aEvent.height,
-          left: aEvent.x + content.scrollX
-        });
-
-        // Send event only after painting to make sure content views in the parent process have
-        // been updated.
-        addEventListener("MozAfterPaint", function afterPaint() {
-          removeEventListener("MozAfterPaint", afterPaint, false);
-          sendAsyncMessage("Content:UpdateDisplayPort");
-        }, false);
-
-        break;
-      }
-    }
-  }
-};
-this.ContentScroll = ContentScroll;
-
-ContentScroll.init();
-
-let ContentActive =  {
-  init: function() {
-    addMessageListener("Content:Activate", this);
-    addMessageListener("Content:Deactivate", this);
-  },
-
-  receiveMessage: function(aMessage) {
-    let json = aMessage.json;
-    switch (aMessage.name) {
-      case "Content:Deactivate":
-        docShell.isActive = false;
-        let cwu = content.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils);
-        if (json.keepviewport)
-          break;
-        cwu.setDisplayPortForElement(0, 0, 0, 0, content.document.documentElement, 0);
-        break;
-
-      case "Content:Activate":
-        docShell.isActive = true;
-        break;
-    }
-  }
-};
-
-ContentActive.init();
-
-/**
- * Helper class for IndexedDB, child part. Listens using
- * the observer service for events regarding IndexedDB
- * prompts, and sends messages to the parent to actually
- * show the prompts.
- */
-let IndexedDB = {
-  _permissionsPrompt: "indexedDB-permissions-prompt",
-  _permissionsResponse: "indexedDB-permissions-response",
-
-  waitingObservers: [],
-
-  init: function IndexedDBPromptHelper_init() {
-    let os = Services.obs;
-    os.addObserver(this, this._permissionsPrompt, false);
-    addMessageListener("IndexedDB:Response", this);
-  },
-
-  observe: function IndexedDBPromptHelper_observe(aSubject, aTopic, aData) {
-    if (aTopic != this._permissionsPrompt) {
-      throw new Error("Unexpected topic!");
-    }
-
-    let requestor = aSubject.QueryInterface(Ci.nsIInterfaceRequestor);
-    let observer = requestor.getInterface(Ci.nsIObserver);
-
-    let contentWindow = requestor.getInterface(Ci.nsIDOMWindow);
-    let contentDocument = contentWindow.document;
-
-    // Remote to parent
-    sendAsyncMessage("IndexedDB:Prompt", {
-      topic: aTopic,
-      host: contentDocument.documentURIObject.asciiHost,
-      location: contentDocument.location.toString(),
-      data: aData,
-      observerId: this.addWaitingObserver(observer)
-    });
-  },
-
-  receiveMessage: function(aMessage) {
-    let payload = aMessage.json;
-    switch (aMessage.name) {
-      case "IndexedDB:Response":
-        let observer = this.getAndRemoveWaitingObserver(payload.observerId);
-        observer.observe(null, payload.responseTopic, payload.permission);
-    }
-  },
-
-  addWaitingObserver: function(aObserver) {
-    let observerId = 0;
-    while (observerId in this.waitingObservers)
-      observerId++;
-    this.waitingObservers[observerId] = aObserver;
-    return observerId;
-  },
-
-  getAndRemoveWaitingObserver: function(aObserverId) {
-    let observer = this.waitingObservers[aObserverId];
-    delete this.waitingObservers[aObserverId];
-    return observer;
-  }
-};
-
-IndexedDB.init();
-
deleted file mode 100644
--- a/browser/metro/base/content/bindings/browser.xml
+++ /dev/null
@@ -1,1304 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
-   - License, v. 2.0. If a copy of the MPL was not distributed with this
-   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<!DOCTYPE bindings [
-  <!ENTITY % findBarDTD SYSTEM "chrome://global/locale/findbar.dtd" >
-  %findBarDTD;
-]>
-
-<bindings id="browser-bindings"
-          xmlns="http://www.mozilla.org/xbl"
-          xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
-  <binding id="local-browser" extends="chrome://global/content/bindings/browser.xml#browser">
-    <implementation type="application/javascript"
-      implements="nsIObserver, nsIDOMEventListener, nsIMessageListener">
-
-      <constructor>
-        <![CDATA[
-          this._frameLoader =
-            this.QueryInterface(Components.interfaces.nsIFrameLoaderOwner).frameLoader;
-          this._contentViewManager = null;
-            // TODO: rip out all the code dealing with _contentViewManager because it is
-            // obsolete and dead code. The nsIContentViewManager interface that it used
-            // to point to is being removed in bug 936690.
-
-          let prefService =
-            Components.classes["@mozilla.org/preferences-service;1"]
-                      .getService(Components.interfaces.nsIPrefBranch);
-          this._cacheRatioWidth =
-            Math.max(1, prefService.getIntPref("toolkit.browser.cacheRatioWidth") / 1000);
-          this._cacheRatioHeight =
-            Math.max(1, prefService.getIntPref("toolkit.browser.cacheRatioHeight") / 1000);
-
-          if (this._contentViewPrototype) {
-            this._contentViewPrototype.kDieTime = prefService.getIntPref("toolkit.browser.contentViewExpire");
-          }
-
-          this.messageManager.loadFrameScript("chrome://browser/content/bindings/browser.js", true);
-          this.messageManager.addMessageListener("DOMTitleChanged", this._messageListenerLocal);
-          this.messageManager.addMessageListener("DOMLinkAdded", this._messageListenerLocal);
-          this.messageManager.addMessageListener("pageshow", this._messageListenerLocal);
-          this.messageManager.addMessageListener("pagehide", this._messageListenerLocal);
-          this.messageManager.addMessageListener("DOMPopupBlocked", this._messageListenerLocal);
-          this.messageManager.addMessageListener("MozScrolledAreaChanged", this._messageListenerLocal);
-          this.messageManager.addMessageListener("Content:UpdateDisplayPort", this._messageListenerLocal);
-
-          this._webProgress._init();
-
-          // Remove event listeners added by toolkit <browser> binding.
-          this.removeEventListener("pageshow", this.onPageShow, true);
-          this.removeEventListener("pagehide", this.onPageHide, true);
-          this.removeEventListener("DOMPopupBlocked", this.onPopupBlocked, true);
-
-          this.setAttribute("autoscrollpopup", "autoscrollerid");
-        ]]>
-      </constructor>
-
-      <field name="_searchEngines">[]</field>
-      <property name="searchEngines"
-                onget="return this._searchEngines"
-                readonly="true"/>
-
-      <field name="_documentURI">null</field>
-      <property name="documentURI"
-                onget="return this._documentURI ? this._ios.newURI(this._documentURI, null, null) : null"
-                readonly="true"/>
-
-      <field name="contentWindowId">null</field>
-
-      <field name="_contentTitle">null</field>
-
-      <field name="_ios">
-         Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService);
-      </field>
-
-      <!--
-        * Point Conversion Routines - browsers may be shifted by UI such that
-        * a client point in an event does not coincide with a css position.
-        * Examples include the notification bar, which pushes the browser down,
-        * or deck movement when forms are positioned above the keyboard.
-        *
-        * Client to browser conversion:
-        *
-        * ptClientToBrowser
-        *  Convert client coordinates in device pixels to page-relative
-        *  coordinates in CSS pixels.
-        *
-        * @param aClientX, aClientY - client coordinates to convert.
-        * @param aIgnoreScroll ignore root frame scroll.
-        * @param aIgnoreScale ignore current scale factor.
-        * @return { x: converted x coordinate, y: converted y coordinate }
-        *
-        * rectClientToBrowser
-        *  Convert a client Rect() in device pixels to page-relative
-        *  coordinates in CSS pixels.
-        *
-        * @param aRect - client Rect to convert.
-        * @param aIgnoreScroll ignore root frame scroll.
-        * @param aIgnoreScale ignore current scale factor.
-        * @return converted Rect()
-        *
-        * ctobx, ctoby
-        *  Convert individual x and y coordinates.
-        *
-        * @param aX or aY - browser coordinate
-        * @param aIgnoreScroll ignore root frame scroll.
-        * @param aIgnoreScale ignore current scale factor.
-        * @return converted coordinate
-        *
-        * Browser to client conversion:
-        *
-        * ptBrowserToClient
-        *  Convert browser coordinates in css pixels to client (screen) coordinates
-        *  in device pixels. Useful in positioning UI elements at event targets.
-        *
-        * @param aBrowserX, aBrowserY - browser coordinates to convert.
-        * @param aIgnoreScroll ignore root frame scroll.
-        * @param aIgnoreScale ignore current scale factor.
-        * @return { x: converted x coordinate, y: converted y coordinate }
-        *
-        * msgBrowserToClient
-        *  Converts a message manager message with coordinates stored in
-        *  aMessage.json.xPos, aMessage.json.yPos.
-        *
-        * @param aMessage - message manager message
-        * @param aIgnoreScroll ignore root frame scroll.
-        * @param aIgnoreScale ignore current scale factor.
-        * @return { x: converted x coordinate, y: converted y coordinate }
-        *
-        * rectBrowserToClient
-        *  Converts a rect (left, top, right, bottom).
-        *
-        * @param aRect - rect to convert
-        * @param aIgnoreScroll ignore root frame scroll.
-        * @param aIgnoreScale ignore current scale factor.
-        * @return { left:, top:, right:, bottom: }
-        *
-        * btocx, btocy
-        *  Convert individual x and y coordinates.
-        *
-        * @param aX or aY - client coordinate
-        * @param aIgnoreScroll ignore root frame scroll.
-        * @param aIgnoreScale ignore current scale factor.
-        * @return converted coordinate
-      -->
-      <method name="ptClientToBrowser">
-        <parameter name="aClientX"/>
-        <parameter name="aClientY"/>
-        <parameter name="aIgnoreScroll"/>
-        <parameter name="aIgnoreScale"/>
-        <body>
-          <![CDATA[
-            let ignoreScroll = aIgnoreScroll || false;
-            let ignoreScale = aIgnoreScale || false;
-
-            let bcr = this.getBoundingClientRect();
-
-            let scrollX = 0;
-            let scrollY = 0;
-            if (!ignoreScroll) {
-              let scroll = this.getRootView().getPosition();
-              scrollX = scroll.x;
-              scrollY = scroll.y;
-            }
-
-            let scale = 1;
-            if (!ignoreScale) {
-              scale = this.scale;
-            }
-
-            return {
-              x: (aClientX - bcr.left) / scale + scrollX,
-              y: (aClientY - bcr.top) / scale + scrollY
-            };
-          ]]>
-        </body>
-      </method>
-
-      <method name="rectClientToBrowser">
-        <parameter name="aClientRect"/>
-        <parameter name="aIgnoreScroll"/>
-        <parameter name="aIgnoreScale"/>
-        <body>
-          <![CDATA[
-            let ignoreScroll = aIgnoreScroll || false;
-            let ignoreScale = aIgnoreScale || false;
-
-            let scrollX = 0;
-            let scrollY = 0;
-            if (!ignoreScroll) {
-              let scroll = this.getRootView().getPosition();
-              scrollX = scroll.x;
-              scrollY = scroll.y;
-            }
-
-            let scale = 1;
-            if (!ignoreScale) {
-              scale = this.scale;
-            }
-
-            let bcr = this.getBoundingClientRect();
-            let clientRect = Rect.fromRect(aClientRect);
-            return new Rect(
-              (clientRect.x - bcr.left) / scale + scrollX,
-              (clientRect.y - bcr.top) / scale + scrollY,
-              clientRect.width / scale,
-              clientRect.height / scale
-            );
-          ]]>
-        </body>
-      </method>
-
-      <method name="ctobx">
-        <parameter name="aX"/>
-        <parameter name="aIgnoreScroll"/>
-        <parameter name="aIgnoreScale"/>
-        <body>
-          <![CDATA[
-            let y = 0;
-            let result = this.ptClientToBrowser(aX, y, aIgnoreScroll, aIgnoreScale);
-            return result.x;
-          ]]>
-        </body>
-      </method>
-
-      <method name="ctoby">
-        <parameter name="aY"/>
-        <parameter name="aIgnoreScroll"/>
-        <parameter name="aIgnoreScale"/>
-        <body>
-          <![CDATA[
-            let x = 0;
-            let result = this.ptClientToBrowser(x, aY, aIgnoreScroll, aIgnoreScale);
-            return result.y;
-          ]]>
-        </body>
-      </method>
-
-      <method name="ptBrowserToClient">
-        <parameter name="aBrowserX"/>
-        <parameter name="aBrowserY"/>
-        <parameter name="aIgnoreScroll"/>
-        <parameter name="aIgnoreScale"/>
-        <body>
-          <![CDATA[
-            let ignoreScroll = aIgnoreScroll || false;
-            let ignoreScale = aIgnoreScale || false;
-
-            let bcr = this.getBoundingClientRect();
-
-            let scrollX = 0;
-            let scrollY = 0;
-            if (!ignoreScroll) {
-              let scroll = this.getRootView().getPosition();
-              scrollX = scroll.x;
-              scrollY = scroll.y;
-            }
-
-            let scale = 1;
-            if (!ignoreScale) {
-              scale = this.scale;
-            }
-
-            return {
-              x: (aBrowserX * scale - scrollX + bcr.left),
-              y: (aBrowserY * scale - scrollY + bcr.top)
-            };
-          ]]>
-        </body>
-      </method>
-
-      <method name="msgBrowserToClient">
-        <parameter name="aMessage"/>
-        <parameter name="aIgnoreScroll"/>
-        <parameter name="aIgnoreScale"/>
-        <body>
-          <![CDATA[
-            let x = aMessage.json.xPos;
-            let y = aMessage.json.yPos;
-            return this.ptBrowserToClient(x, y, aIgnoreScroll, aIgnoreScale);
-          ]]>
-        </body>
-      </method>
-
-      <method name="rectBrowserToClient">
-        <parameter name="aRect"/>
-        <parameter name="aIgnoreScroll"/>
-        <parameter name="aIgnoreScale"/>
-        <body>
-          <![CDATA[
-            let left = aRect.left;
-            let top = aRect.top;
-            let right = aRect.right;
-            let bottom = aRect.bottom;
-            let a = this.ptBrowserToClient(left, top, aIgnoreScroll, aIgnoreScale);
-            let b = this.ptBrowserToClient(right, bottom, aIgnoreScroll, aIgnoreScale);
-            return {
-              left: a.x,
-              top: a.y,
-              right: b.x,
-              bottom: b.y
-            };
-          ]]>
-        </body>
-      </method>
-
-      <method name="btocx">
-        <parameter name="aX"/>
-        <parameter name="aIgnoreScroll"/>
-        <parameter name="aIgnoreScale"/>
-        <body>
-          <![CDATA[
-            let y = 0;
-            let result = this.ptBrowserToClient(aX, y, aIgnoreScroll, aIgnoreScale);
-            return result.x;
-          ]]>
-        </body>
-      </method>
-
-      <method name="btocy">
-        <parameter name="aY"/>
-        <parameter name="aIgnoreScroll"/>
-        <parameter name="aIgnoreScale"/>
-        <body>
-          <![CDATA[
-            let x = 0;
-            let result = this.ptBrowserToClient(x, aY, aIgnoreScroll, aIgnoreScale);
-            return result.y;
-          ]]>
-        </body>
-      </method>
-
-      <property name="scale">
-        <getter><![CDATA[
-          let cwu = this.contentDocument
-                        .defaultView
-                        .QueryInterface(Components.interfaces.nsIInterfaceRequestor)
-                        .getInterface(Components.interfaces.nsIDOMWindowUtils);
-          let res = {};
-          cwu.getResolution(res);
-          return res.value;
-        ]]></getter>
-      </property>
-
-      <field name="_messageListenerLocal"><![CDATA[
-        ({
-          self: this,
-          receiveMessage: function receiveMessage(aMessage) {
-            let self = this.self;
-            let json = aMessage.json;
-
-            switch (aMessage.name) {
-              case "DOMPopupBlocked":
-                self.onPopupBlocked(aMessage);
-                break;
-
-              case "pageshow":
-                self.onPageShow(aMessage);
-
-                if (!self.mIconURL && self._documentURI) {
-                  let iconURL = null;
-                  if (self.shouldLoadFavicon()) {
-                    // Use documentURI in the favicon construction so that we
-                    // do the right thing with about:-style error pages.  Bug 515188
-                    iconURL = self.documentURI.prePath + "/favicon.ico";
-                  }
-                  self.loadFavicon(iconURL, null);
-                }
-                break;
-
-              case "pagehide":
-                self.onPageHide(aMessage);
-                break;
-
-              case "DOMTitleChanged":
-                self._contentTitle = json.title;
-                break;
-
-              case "DOMLinkAdded":
-                // ignore results from subdocuments
-                if (json.windowId != self.contentWindowId)
-                  return;
-
-                let linkType = self._getLinkType(json);
-                switch(linkType) {
-                  case "icon":
-                    self.loadFavicon(json.href, json.charset);
-                    break;
-                  case "search":
-                    self._searchEngines.push({ title: json.title, href: json.href });
-                    break;
-                }
-                break;
-
-              case "MozScrolledAreaChanged": {
-                self._contentDocumentWidth = json.width;
-                self._contentDocumentHeight = json.height;
-                self._contentDocumentLeft = (json.left < 0) ? json.left : 0;
-
-                // Recalculate whether the visible area is actually in bounds
-                let view = self.getRootView();
-                view.scrollBy(0, 0);
-                break;
-              }
-
-              case "Content:UpdateDisplayPort": {
-                // Recalculate whether the visible area is actually in bounds
-                let view = self.getRootView();
-                view.scrollBy(0, 0);
-                view._updateCacheViewport();
-                break;
-              }
-            }
-          }
-        })
-      ]]></field>
-
-      <method name="loadFavicon">
-        <parameter name="aURL"/>
-        <parameter name="aCharset"/>
-        <body><![CDATA[
-            try { // newURI call is throwing for chrome URI
-              let iconURI = this._ios.newURI(aURL, aCharset, null);
-              if (gFaviconService.isFailedFavicon(iconURI))
-                return;
-
-              gFaviconService.setAndFetchFaviconForPage(this.currentURI, iconURI, true,
-                                                        gFaviconService.FAVICON_LOAD_NON_PRIVATE);
-              this.mIconURL = iconURI.spec;
-            } catch (e) {
-              this.mIconURL = null;
-            }
-        ]]></body>
-      </method>
-
-      <method name="shouldLoadFavicon">
-        <body><![CDATA[
-          let docURI = this.documentURI;
-          return (docURI && ("schemeIs" in docURI) &&
-                  (docURI.schemeIs("http") || docURI.schemeIs("https")));
-        ]]></body>
-      </method>
-
-      <method name="_getLinkType">
-        <parameter name="aLink" />
-        <body><![CDATA[
-          let type = "";
-          if (/\bicon\b/i.test(aLink.rel)) {
-            type = "icon";
-          }
-          else if (/\bsearch\b/i.test(aLink.rel) && aLink.type && aLink.title) {
-            let linkType = aLink.type.replace(/^\s+|\s*(?:;.*)?$/g, "").toLowerCase();
-            if (linkType == "application/opensearchdescription+xml" && /^(?:https?|ftp):/i.test(aLink.href)) {
-              type = "search";
-            }
-          }
-
-          return type;
-        ]]></body>
-      </method>
-
-      <field name="_webProgress"><![CDATA[
-        ({
-          _browser: this,
-
-          _init: function() {
-            this._browser.messageManager.addMessageListener("Content:StateChange", this);
-            this._browser.messageManager.addMessageListener("Content:LocationChange", this);
-            this._browser.messageManager.addMessageListener("Content:SecurityChange", this);
-          },
-
-          receiveMessage: function(aMessage) {
-            let json = aMessage.json;
-            switch (aMessage.name) {
-              case "Content:StateChange":
-                this._browser.updateWindowId(json.contentWindowId);
-                break;
-
-              case "Content:LocationChange":
-                try {
-                  let locationURI = this._browser._ios.newURI(json.location, null, null);
-                  this._browser.webNavigation._currentURI = locationURI;
-                  this._browser.webNavigation.canGoBack = json.canGoBack;
-                  this._browser.webNavigation.canGoForward = json.canGoForward;
-                  this._browser._charset = json.charset;
-                } catch(e) {}
-
-                if (this._browser.updateWindowId(json.contentWindowId)) {
-                  this._browser._documentURI = json.documentURI;
-                  this._browser._searchEngines = [];
-                }
-                break;
-
-              case "Content:SecurityChange":
-                let serhelper = Components.classes["@mozilla.org/network/serialization-helper;1"]
-                                .getService(Components.interfaces.nsISerializationHelper);
-                let SSLStatus = json.SSLStatusAsString ? serhelper.deserializeObject(json.SSLStatusAsString) : null;
-                if (SSLStatus) {
-                  SSLStatus.QueryInterface(Components.interfaces.nsISSLStatus);
-                  // We must check the Extended Validation (EV) state here, on the chrome
-                  // process, because NSS is needed for that determination.
-                  if (SSLStatus && SSLStatus.isExtendedValidation) {
-                      json.state |= Components.interfaces.nsIWebProgressListener.STATE_IDENTITY_EV_TOPLEVEL;
-                  }
-                }
-
-                let data = this._getIdentityData(SSLStatus);
-                this._browser.updateWindowId(json.contentWindowId);
-                break;
-            }
-          },
-
-          /**
-           * Helper to parse out the important parts of the SSL cert for use in constructing
-           * identity UI strings
-           */
-          _getIdentityData: function(status) {
-            let result = {};
-
-            if (status) {
-              let cert = status.serverCert;
-
-              // Human readable name of Subject
-              result.subjectOrg = cert.organization;
-
-              // SubjectName fields, broken up for individual access
-              if (cert.subjectName) {
-                result.subjectNameFields = {};
-                cert.subjectName.split(",").forEach(function(v) {
-                  var field = v.split("=");
-                  if (field[1])
-                    this[field[0]] = field[1];
-                }, result.subjectNameFields);
-
-                // Call out city, state, and country specifically
-                result.city = result.subjectNameFields.L;
-                result.state = result.subjectNameFields.ST;
-                result.country = result.subjectNameFields.C;
-              }
-
-              // Human readable name of Certificate Authority
-              result.caOrg =  cert.issuerOrganization || cert.issuerCommonName;
-
-              if (!this._overrideService)
-                this._overrideService = Components.classes["@mozilla.org/security/certoverride;1"]
-                                        .getService(Components.interfaces.nsICertOverrideService);
-
-              // Check whether this site is a security exception.
-              let currentURI = this._browser.webNavigation._currentURI;
-	      if (currentURI) {
-                result.isException = this._overrideService.hasMatchingOverride(currentURI.asciiHost, currentURI.port, cert, {}, {});
-              } else {
-	        result.isException = false;
-	      }
-            }
-
-            return result;
-          }
-        })
-      ]]></field>
-
-      <property name="webProgress"
-                readonly="true"
-                onget="return null"/>
-
-      <method name="onPageShow">
-        <parameter name="aMessage"/>
-        <body>
-          <![CDATA[
-            this.attachFormFill();
-            if (this.pageReport) {
-              var json = aMessage.json;
-              var i = 0;
-              while (i < this.pageReport.length) {
-                // Filter out irrelevant reports.
-                if (this.pageReport[i].requestingWindowId == json.windowId)
-                  i++;
-                else
-                  this.pageReport.splice(i, 1);
-              }
-              if (this.pageReport.length == 0) {
-                this.pageReport = null;
-                this.updatePageReport();
-              }
-            }
-         ]]>
-        </body>
-      </method>
-
-      <method name="onPageHide">
-        <parameter name="aMessage"/>
-        <body>
-          <![CDATA[
-            if (this.pageReport) {
-              this.pageReport = null;
-              this.updatePageReport();
-            }
-            // Delete the feeds cache if we're hiding the topmost page
-            // (as opposed to one of its iframes).
-            if (this.feeds && aMessage.target == this)
-              this.feeds = null;
-
-            this._contentWindowWidth = aMessage.json.contentWindowWidth;
-            this._contentWindowHeight = aMessage.json.contentWindowHeight;
-         ]]>
-        </body>
-      </method>
-
-      <method name="onPopupBlocked">
-        <parameter name="aMessage"/>
-        <body>
-          <![CDATA[
-            if (!this.pageReport) {
-              this.pageReport = [];
-            }
-
-            let json = aMessage.json;
-            // XXX Replacing requestingWindow && requestingDocument affects
-            // http://mxr.mozilla.org/mozilla-central/source/browser/base/content/browser.js#500
-            var obj = {
-              requestingWindowId: json.windowId,
-              popupWindowURI: this._ios.newURI(json.popupWindowURI.spec, json.popupWindowURI.charset, null),
-              popupWindowFeatures: json.popupWindowFeatures,
-              popupWindowName: json.popupWindowName
-            };
-
-            this.pageReport.push(obj);
-            this.pageReport.reported = false;
-            this.updatePageReport();
-          ]]>
-        </body>
-      </method>
-
-      <field name="_frameLoader">null</field>
-      <field name="_contentViewManager">null</field>
-
-      <!--
-       * Returns the current content viewport bounds in browser coordinates
-       * taking into account zoom and scroll.
-       *
-       * @return Rect()
-      -->
-      <property name="contentViewportBounds">
-        <getter><![CDATA[
-          return this.rectClientToBrowser(this.getBoundingClientRect());
-        ]]></getter>
-      </property>
-
-      <!-- Dimensions of content window -->
-      <field name="_contentWindowWidth">0</field>
-      <field name="_contentWindowHeight">0</field>
-      <property name="contentWindowWidth"
-                onget="return this._contentWindowWidth;"
-                readonly="true"/>
-      <property name="contentWindowHeight"
-                onget="return this._contentWindowHeight;"
-                readonly="true"/>
-
-      <!-- Dimensions of content document -->
-      <field name="_contentDocumentWidth">0</field>
-      <field name="_contentDocumentHeight">0</field>
-      <property name="contentDocumentWidth"
-                onget="return this._contentDocumentWidth;"
-                readonly="true"/>
-      <property name="contentDocumentHeight"
-                onget="return this._contentDocumentHeight;"
-                readonly="true"/>
-
-      <!-- If this attribute is negative this indicate the document is rtl and
-           some operations like panning or calculating the cache area should
-           take it into account. This is useless for non-remote browser -->
-      <field name="_contentDocumentLeft">0</field>
-
-      <!-- These counters are used to update the cached viewport after they reach a certain
-           threshold when scrolling -->
-      <field name="_cacheRatioWidth">1</field>
-      <field name="_cacheRatioHeight">1</field>
-
-      <!-- Used in remote tabs only. -->
-      <method name="_updateCSSViewport">
-        <body/>
-      </method>
-
-      <!-- Sets size of CSS viewport, which affects how page is layout. -->
-      <method name="setWindowSize">
-        <parameter name="width"/>
-        <parameter name="height"/>
-        <body>
-          <![CDATA[
-            this._contentWindowWidth = width;
-            this._contentWindowHeight = height;
-            this.messageManager.sendAsyncMessage("Content:SetWindowSize", {
-              width: width,
-              height: height
-            });
-
-            // If the window size is changing, make sure the displayport is in sync
-            this.getRootView()._updateCacheViewport();
-          ]]>
-        </body>
-      </method>
-
-      <method name="getRootView">
-        <body>
-          <![CDATA[
-            return this._contentView;
-          ]]>
-        </body>
-      </method>
-
-      <field name="_contentViewPrototype"><![CDATA[
-        ({
-          _scrollbox: null,
-
-          init: function(aElement) {
-            this._scrollbox = aElement.scrollBoxObject;
-          },
-
-          isRoot: function() {
-            return false;
-          },
-
-          scrollBy: function(x, y) {
-            this._scrollbox.scrollBy(x,y);
-          },
-
-          scrollTo: function(x, y) {
-            this._scrollbox.scrollTo(x,y);
-          },
-
-          getPosition: function() {
-            let x = {}, y = {};
-            this._scrollbox.getPosition(x, y);
-            return { x: x.value, y: y.value };
-          }
-        })
-        ]]>
-      </field>
-
-      <method name="getViewAt">
-        <parameter name="x"/>
-        <parameter name="y"/>
-        <body>
-          <![CDATA[
-            let cwu = this.contentDocument.defaultView.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
-                                                      .getInterface(Components.interfaces.nsIDOMWindowUtils);
-            let elt = cwu.elementFromPoint(x, y, false, false);
-
-            while (elt && !elt.scrollBoxObject)
-              elt = elt.parentNode;
- 
-            if (!elt)
-              return this._contentView;
-
-            let cv = Object.create(this._contentViewPrototype);
-            cv.init(elt);
-            return cv;
-          ]]>
-        </body>
-      </method>
-
-      <field name="_contentView"><![CDATA[
-        ({
-          self: this,
-
-          _updateCacheViewport: function() {
-          },
-
-          isRoot: function() {
-            return true;
-          },
-
-          scrollBy: function(x, y) {
-            let self = this.self;
-            self.contentWindow.scrollBy(x, y);
-          },
-
-          scrollTo: function(x, y) {
-            let self = this.self;
-            x = Math.floor(Math.max(0, Math.min(self.contentDocumentWidth,  x)));
-            y = Math.floor(Math.max(0, Math.min(self.contentDocumentHeight, y)));
-            self.contentWindow.scrollTo(x, y);
-          },
-
-          getPosition: function() {
-            let self = this.self;
-            let scrollX = {}, scrollY = {};
-            let cwu = self.contentWindow.QueryInterface(Components.interfaces.nsIInterfaceRequestor).
-                      getInterface(Components.interfaces.nsIDOMWindowUtils);
-            cwu.getScrollXY(false, scrollX, scrollY);
-            return { x: scrollX.value, y: scrollY.value };
-          },
-
-          toString: function() {
-            return "[View Local]";
-          }
-        })
-        ]]>
-      </field>
-
-      <method name="updateWindowId">
-         <parameter name="aNewId"/>
-         <body><![CDATA[
-            if (this.contentWindowId != aNewId) {
-               this.contentWindowId = aNewId;
-               return true;
-            }
-            return false;
-         ]]></body>
-      </method>
-
-      <field name="_active">false</field>
-      <property name="active" onget="return this._active;">
-        <setter><![CDATA[
-          // Do not change displayport on local tabs!
-          this._active = val;
-          this.docShellIsActive = this._active;
-        ]]></setter>
-      </property>
-    </implementation>
-  </binding>
-
-  <binding id="remote-browser" extends="#local-browser">
-    <implementation type="application/javascript" implements="nsIObserver, nsIDOMEventListener, nsIMessageListener">
-      <property name="autoscrollEnabled">
-        <getter>
-          <![CDATA[
-            throw "autoscrollEnabled: Supports Remote?";
-          ]]>
-        </getter>
-      </property>
-
-      <property name="docShell"
-                readonly="true">
-         <getter><![CDATA[
-            return {
-               forcedCharset : this._charset,
-               parentCharset : "",
-               parentCharsetSource : 0
-            }
-         ]]></getter>
-      </property>
-
-      <field name="_contentTitle">null</field>
-
-      <property name="contentTitle"
-                onget="return this._contentTitle;"
-                readonly="true"/>
-
-      <field name="_remoteWebNavigation">null</field>
-      <property name="webNavigation" readonly="true">
-        <getter>
-          <![CDATA[
-            if (!this._remoteWebNavigation) {
-              let jsm = "resource://gre/modules/RemoteWebNavigation.jsm";
-              let RemoteWebNavigation = Components.utils.import(jsm, {}).RemoteWebNavigation;
-              this._remoteWebNavigation = new RemoteWebNavigation(this);
-            }
-            return this._remoteWebNavigation;
-          ]]>
-        </getter>
-      </property>
-
-      <property name="contentWindow"
-                readonly="true"
-                onget="return null"/>
-
-      <property name="sessionHistory"
-                onget="return null"
-                readonly="true"/>
-
-      <property name="markupDocumentViewer"
-                onget="return null"
-                readonly="true"/>
-
-      <property name="contentViewerEdit"
-                onget="return null"
-                readonly="true"/>
-
-      <property name="contentViewerFile"
-                onget="return null"
-                readonly="true"/>
-
-      <field name="_charset"></field>
-
-      <constructor>
-        <![CDATA[
-          this.messageManager.addMessageListener("scroll", this._messageListenerRemote);
-        ]]>
-      </constructor>
-
-      <field name="scrollSync">true</field>
-
-      <field name="_messageListenerRemote"><![CDATA[
-        ({
-          self: this,
-          receiveMessage: function receiveMessage(aMessage) {
-            let self = this.self;
-            let json = aMessage.json;
-
-            switch (aMessage.name) {
-              case "scroll":
-	        if (!json.isRoot)
-		  return;
-                if (!self.scrollSync)
-                  return;
-                this.doScroll(json.scrollOffset.x, json.scrollOffset.y, 0);
-                break;
-           }
-         },
-
-         doScroll: function doScroll(aX, aY, aCount) {
-            let self = this.self;
-
-            // Use floor so that we always guarantee top-left corner of content is visible.
-            let view = self.getRootView();
-            view.scrollTo(Math.floor(aX * self.scale), Math.floor(aY * self.scale));
-
-            let position = view.getPosition();
-            if ((position.x != aX * self.scale || position.y != aY * self.scale) && aCount < 3) {
-              setTimeout((function() {
-                 this.doScroll(aX, aY, ++aCount);
-              }).bind(this), 0);
-            }
-         }
-       })
-      ]]></field>
-
-      <!-- Keep a store of temporary content views. -->
-      <field name="_contentViews">({})</field>
-
-      <!-- There is a point before a page has loaded where a root content view
-           may not exist. We use this so that we don't have to worry about doing
-           an if check every time we want to scroll. -->
-      <field name="_contentNoop"><![CDATA[
-        ({
-          _updateCacheViewport: function() {},
-          _getViewportSize: function() {},
-
-          isRoot: function() {
-            return true;
-          },
-
-          _scale: 1,
-          _setScale: function(scale) {},
-          scrollBy: function(x, y) {},
-          scrollTo: function(x, y) {},
-          getPosition: function() {
-            return { x: 0, y: 0 };
-          }
-        })
-      ]]></field>
-
-      <field name="_contentViewPrototype"><![CDATA[
-        ({
-          self: this,
-          _id: null,
-          _contentView: null,
-          _timeout: null,
-          _pixelsPannedSinceRefresh: { x: 0, y: 0 },
-          _lastPanTime: 0,
-
-          kDieTime: 3000,
-
-          /** 
-           * Die if we haven't panned in a while.
-           *
-           * Since we keep a map of active content views, we need to regularly
-           * check if they are necessary so that every single thing the user
-           * pans is not kept in memory forever.
-           */
-          _dieIfOld: function() {
-            if (Date.now() - this._lastPanTime >= this.kDieTime)
-              this._die();
-            else
-              // This doesn't need to be exact, just be sure to clean up at some point.
-              this._timeout = setTimeout(this._dieIfOld.bind(this), this.kDieTime);
-          },
-
-          /** Cleanup after ourselves. */
-          _die: function() {
-            let timeout = this._timeout;
-            if (timeout) {
-              clearTimeout(timeout);
-              this._timeout = null;
-            }
-
-            if (this._contentView && Math.abs(this._pixelsPannedSinceRefresh) > 0)
-              this._updateCacheViewport();
-
-            // We expect contentViews to contain our ID. If not, something bad
-            // happened.
-            delete this.self._contentViews[this._id];
-          },
-
-          /**
-           * Given the cache size and the viewport size, this determines where the cache
-           * should start relative to the scroll position. This adjusts the position based
-           * on which direction the user is panning, so that we use our cache as
-           * effectively as possible.
-           *
-           * @param aDirection Negative means user is panning to the left or above
-           *                   Zero means user did not pan
-           *                   Positive means user is panning to the right or below
-           * @param aViewportSize The width or height of the viewport
-           * @param aCacheSize The width or height of the displayport
-           */
-          _getRelativeCacheStart: function(aDirection, aViewportSize, aCacheSize) {
-            // Remember that this is relative to the viewport scroll position.
-            // Let's assume we are thinking about the y-axis.
-            // The extreme cases:
-            // |0| would mean that there is no content available above
-            // |aViewportSize - aCacheSize| would mean no content available below
-            //
-            // Taking the average of the extremes puts equal amounts of cache on the
-            // top and bottom of the viewport. If we think of this like a weighted
-            // average, .5 is the sweet spot where equals amounts of content are
-            // above and below the visible area.
-            //
-            // This weight is therefore how much of the cache is above (or to the
-            // left) the visible area.
-            let cachedAbove = .5;
-
-            // If panning down, leave only 25% of the non-visible cache above.
-            if (aDirection > 0)
-              cachedAbove = .25;
-
-            // If panning up, Leave 75% of the non-visible cache above.
-            if (aDirection < 0)
-              cachedAbove = .75;
-
-            return (aViewportSize - aCacheSize) * cachedAbove;
-          },
-
-          /** Determine size of the pixel cache. */
-          _getCacheSize: function(viewportSize) {
-            let self = this.self;
-            let contentView = this._contentView;
-
-            let cacheWidth = self._cacheRatioWidth * viewportSize.width;
-            let cacheHeight = self._cacheRatioHeight * viewportSize.height;
-            let contentSize = this._getContentSize();
-            let contentWidth = contentSize.width;
-            let contentHeight = contentSize.height;
-
-            // There are common cases, such as long skinny pages, where our cache size is
-            // bigger than our content size. In those cases, we take that sliver of leftover
-            // space and apply it to the other dimension.
-            if (contentWidth < cacheWidth) {
-              cacheHeight += (cacheWidth - contentWidth) * cacheHeight / cacheWidth;
-              cacheWidth = contentWidth;
-            } else if (contentHeight < cacheHeight) {
-              cacheWidth += (cacheHeight - contentHeight) * cacheWidth / cacheHeight;
-              cacheHeight = contentHeight;
-            }
-
-            return { width: cacheWidth, height: cacheHeight };
-          },
-
-          _sendDisplayportUpdate: function(scrollX, scrollY) {
-            let self = this.self;
-            if (!self.active)
-               return;
-
-            let contentView = this._contentView;
-            let viewportSize = this._getViewportSize();
-            let cacheSize = this._getCacheSize(viewportSize);
-            let cacheX = this._getRelativeCacheStart(this._pixelsPannedSinceRefresh.x, viewportSize.width, cacheSize.width) + contentView.scrollX;
-            let cacheY = this._getRelativeCacheStart(this._pixelsPannedSinceRefresh.y, viewportSize.height, cacheSize.height) + contentView.scrollY;
-            let contentSize = this._getContentSize();
-
-            // Use our pixels efficiently and don't try to cache things outside of content
-            // boundaries (The left bound can be negative because of RTL).
-
-            let rootScale = self.scale;
-            let leftBound = self._contentDocumentLeft * rootScale;
-            let bounds = new Rect(leftBound, 0, contentSize.width, contentSize.height);
-            let displayport = new Rect(cacheX, cacheY, cacheSize.width, cacheSize.height);
-            displayport.translateInside(bounds);
-
-            self.messageManager.sendAsyncMessage("Content:SetCacheViewport", {
-              scrollX: Math.round(scrollX) / rootScale,
-              scrollY: Math.round(scrollY) / rootScale,
-              x: Math.round(displayport.x) / rootScale,
-              y: Math.round(displayport.y) / rootScale,
-              w: Math.round(displayport.width) / rootScale,
-              h: Math.round(displayport.height) / rootScale,
-              scale: rootScale,
-              id: contentView.id
-            });
-
-            this._pixelsPannedSinceRefresh.x = 0;
-            this._pixelsPannedSinceRefresh.y = 0;
-          },
-
-          _updateCSSViewport: function() {
-            let contentView = this._contentView;
-            this._sendDisplayportUpdate(contentView.scrollX,
-                                        contentView.scrollY);
-          },
-
-          /**
-           * The cache viewport is what parts of content is cached in the parent process for
-           * fast scrolling. This syncs that up with the current projection viewport.
-           */
-          _updateCacheViewport: function() {
-            // Do not update scroll values for content.
-            if (this.isRoot())
-              this._sendDisplayportUpdate(-1, -1);
-            else {
-              let contentView = this._contentView;
-              this._sendDisplayportUpdate(contentView.scrollX,
-                                          contentView.scrollY);
-            }
-          },
-
-          _getContentSize: function() {
-            let self = this.self;
-            return { width: this._contentView.contentWidth,
-                     height: this._contentView.contentHeight };
-          },
-
-          _getViewportSize: function() {
-            let self = this.self;
-            if (this.isRoot()) {
-              let bcr = self.getBoundingClientRect();
-              return { width: bcr.width, height: bcr.height };
-            } else {
-              return { width: this._contentView.viewportWidth,
-                       height: this._contentView.viewportHeight };
-            }
-          },
-
-          init: function(contentView) {
-            let self = this.self;
-
-            this._contentView = contentView;
-            this._id = contentView.id;
-            this._scale = 1;
-            self._contentViews[this._id] = this;
-
-            if (!this.isRoot()) {
-              // Non-root content views are short lived.
-              this._timeout = setTimeout(this._dieIfOld.bind(this), this.kDieTime);
-              // This iframe may not have a display port yet, so build up a cache
-              // immediately.
-              this._updateCacheViewport();
-            }
-          },
-
-          isRoot: function() {
-            return this.self._contentViewManager.rootContentView == this._contentView;
-          },
-
-          scrollBy: function(x, y) {
-            let self = this.self;
-
-            // Bounding content rectangle is in device pixels
-            let contentView = this._contentView;
-            let viewportSize = this._getViewportSize();
-            let contentSize = this._getContentSize();
-            // Calculate document dimensions in device pixels
-            let scrollRangeX = contentSize.width - viewportSize.width;
-            let scrollRangeY = contentSize.height - viewportSize.height;
-
-            let leftOffset = self._contentDocumentLeft * this._scale;
-            x = Math.floor(Math.max(leftOffset, Math.min(scrollRangeX + leftOffset, contentView.scrollX + x))) - contentView.scrollX;
-            y = Math.floor(Math.max(0, Math.min(scrollRangeY, contentView.scrollY + y))) - contentView.scrollY;
-
-            if (x == 0 && y == 0)
-              return;
-
-            contentView.scrollBy(x, y);
-
-            this._lastPanTime = Date.now();
-
-            this._pixelsPannedSinceRefresh.x += x;
-            this._pixelsPannedSinceRefresh.y += y;
-            if (Math.abs(this._pixelsPannedSinceRefresh.x) > 20 ||
-                Math.abs(this._pixelsPannedSinceRefresh.y) > 20)
-              this._updateCacheViewport();
-          },
-
-          scrollTo: function(x, y) {
-            let contentView = this._contentView;
-            this.scrollBy(x - contentView.scrollX, y - contentView.scrollY);
-          },
-
-          _setScale: function _setScale(scale) {
-            this._scale = scale;
-            this._contentView.setScale(scale, scale);
-          },
-
-          getPosition: function() {
-            let contentView = this._contentView;
-            return { x: contentView.scrollX, y: contentView.scrollY };
-          }
-        })
-        ]]>
-      </field>
-
-      <!-- The ratio of CSS pixels to device pixels. -->
-      <property name="scale">
-        <getter><![CDATA[
-          return this.getRootView()._scale;
-        ]]></getter>
-        <setter><![CDATA[
-          if (val <= 0 || val == this.scale)
-            return;
-
-          let rootView = this.getRootView();
-          rootView._setScale(val);
-
-          return val;
-        ]]></setter>
-      </property>
-
-      <method name="_getView">
-        <parameter name="contentView"/>
-        <body>
-          <![CDATA[
-            if (!contentView) return null;
-
-            // See if we have cached it.
-            let id = contentView.id;
-            let jsContentView = this._contentViews[id];
-            if (jsContentView) {
-              // Content view may have changed if it became inactive for a
-              // little while.
-              jsContentView._contentView = contentView;
-              return jsContentView;
-            }
-
-            // Not cached. Create it.
-            jsContentView = Object.create(this._contentViewPrototype);
-            jsContentView.init(contentView);
-            return jsContentView;
-          ]]>
-        </body>
-      </method>
-
-      <!-- Get root content view. -->
-      <method name="getRootView">
-        <body>
-          <![CDATA[
-            let contentView = this._contentViewManager.rootContentView;
-            return this._getView(contentView) || this._contentNoop;
-          ]]>
-        </body>
-      </method>
-
-      <!-- Get contentView for position (x, y) relative to the browser element -->
-      <method name="getViewAt">
-        <parameter name="x"/>
-        <parameter name="y"/>
-        <body>
-          <![CDATA[
-            let manager = this._contentViewManager;
-            let contentView = manager.getContentViewsIn(x, y, 0, 0, 0, 0)[0] ||
-                              manager.rootContentView;
-            return this._getView(contentView);
-          ]]>
-        </body>
-      </method>
-
-      <!-- Synchronize the CSS viewport with the projection viewport. -->
-      <method name="_updateCSSViewport">
-        <body>
-          <![CDATA[
-            let rootView = this.getRootView();
-            rootView._updateCSSViewport();
-          ]]>
-        </body>
-      </method>
-
-      <property name="active" onget="return this._active;">
-        <setter><![CDATA[
-            this._active = val;
-            let keepVisible = false;
-            this.messageManager.sendAsyncMessage((val ? "Content:Activate" : "Content:Deactivate"), { keepviewport: keepVisible });
-            if (val)
-              this.getRootView()._updateCacheViewport();
-         ]]></setter>
-      </property>
-
-      <field name="_remoteFinder">null</field>
-      <property name="finder" readonly="true">
-        <getter><![CDATA[
-          if (!this._remoteFinder) {
-            let jsm = "resource://gre/modules/RemoteFinder.jsm";
-            let RemoteFinder = Cu.import(jsm, {}).RemoteFinder;
-            this._remoteFinder = new RemoteFinder(this);
-          }
-          return this._remoteFinder;
-        ]]></getter>
-      </property>
-    </implementation>
-
-  </binding>
-
-</bindings>
deleted file mode 100644
--- a/browser/metro/base/content/bindings/circularprogress.xml
+++ /dev/null
@@ -1,134 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
-   - License, v. 2.0. If a copy of the MPL was not distributed with this
-   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<bindings xmlns="http://www.mozilla.org/xbl"
-          xmlns:xbl="http://www.mozilla.org/xbl"
-          xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
-          xmlns:html="http://www.w3.org/1999/xhtml">
-  <binding id="circular-progress-indicator">
-    <resources>
-      <stylesheet src="chrome://browser/skin/circularprogress.css"/>
-    </resources>
-
-    <content>
-      <xul:stack>
-        <xul:toolbarbutton anonid="progressButton"
-                           class="circularprogressindicator-progressButton"/>
-        <html:div anonid="progressTrack"
-                  xbl:inherits="progress"
-                  class="circularprogressindicator-progressTrack">
-        </html:div>
-        <html:canvas anonid="progressRing"
-                     xbl:inherits="progress"
-                     class="circularprogressindicator-progressRing"
-                     width="40"
-                     height="40">
-        </html:canvas>
-        <html:div anonid="progressNotification"
-                  xbl:inherits="progress"
-                  class="circularprogressindicator-progressNotification">
-        </html:div>
-      </xul:stack>
-    </content>
-
-    <implementation>
-      <field name="_progressCanvas">
-        document.getAnonymousElementByAttribute(this, "anonid", "progressRing");
-      </field>
-      <field name="_progressNotification">
-        document.getAnonymousElementByAttribute(this, "anonid",
-            "progressNotification");
-      </field>
-      <field name="_progressCircleCtx">null</field>
-      <field name="_img">null</field>
-      <constructor>
-        <![CDATA[
-          this._progressCircleCtx = this._progressCanvas.getContext('2d');
-        ]]>
-      </constructor>
-      <method name="updateProgress">
-        <parameter name="percentComplete"/>
-        <body>
-          <![CDATA[
-            const PROGRESS_RING_IMG = "chrome://browser/skin/images/progresscircle.png";
-
-            // show ring background even if % is 0.
-            this.setAttribute("progress", percentComplete);
-
-            let startAngle = 1.5 * Math.PI;
-            let endAngle = startAngle + (2 * Math.PI * (percentComplete / 100));
-
-            if (!this._img) {
-              this._img = new Image();
-              this._img.onload = () => {
-                this.updateProgress(this.getAttribute("progress"))
-              }
-              this._img.src = PROGRESS_RING_IMG;
-            }
-            else if (this._img.complete) {
-              let ctx = this._progressCircleCtx;
-              ctx.clearRect(0, 0,
-                this._progressCanvas.width, this._progressCanvas.height);
-
-              // Save the state, so we can undo the clipping
-              ctx.save();
-
-              ctx.beginPath();
-              let center = this._progressCanvas.width / 2;
-              ctx.arc(center, center, center, startAngle, endAngle, false);
-              ctx.lineTo(center, center);
-              ctx.closePath();
-              ctx.clip();
-
-              // Draw circle image.
-              ctx.translate(center, center);
-              ctx.rotate(endAngle);
-              ctx.drawImage(this._img, -center, -center);
-
-              ctx.restore();
-            } else {
-              //  Image is still loading
-            }
-            return [startAngle, endAngle];
-          ]]>
-        </body>
-      </method>
-      <method name="reset">
-        <body>
-          <![CDATA[
-            if(this._img && !this._img.complete) {
-              // cancel any pending updateProgress
-              this._img.onload = () => {};
-            }
-            this._progressCircleCtx.clearRect(0, 0,
-              this._progressCanvas.width, this._progressCanvas.height);
-            this.removeAttribute("progress");
-          ]]>
-        </body>
-      </method>
-      <method name="notify">
-        <body>
-          <![CDATA[
-            this.addEventListener("transitionend", this._onNotificationEnd);
-
-            this._progressNotification.classList.add(
-                "progressNotification-active");
-          ]]>
-        </body>
-      </method>
-      <method name="_onNotificationEnd">
-        <body>
-          <![CDATA[
-            this.removeEventListener("transitionend", this._onNotificationEnd);
-
-            this._progressNotification.classList.remove(
-                "progressNotification-active");
-          ]]>
-        </body>
-      </method>
-    </implementation>
-  </binding>
-</bindings>
deleted file mode 100644
--- a/browser/metro/base/content/bindings/console.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0"?>
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
-   - License, v. 2.0. If a copy of the MPL was not distributed with this
-   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<!DOCTYPE bindings [
-<!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd">
-%browserDTD;
-]>
-
-<bindings
-    xmlns="http://www.mozilla.org/xbl"
-    xmlns:xbl="http://www.mozilla.org/xbl"
-    xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-  <binding id="error" extends="chrome://browser/content/bindings/bindings.xml#richlistitem">
-    <content orient="vertical">
-      <xul:hbox class="console-row-internal-box" flex="1">
-        <xul:vbox class="console-row-content" flex="1">
-          <xul:hbox class="console-row-msg" align="start">
-            <xul:label class="label title" xbl:inherits="value=typetext"/>
-            <xul:description class="console-error-msg title" xbl:inherits="xbl:text=msg" flex="1"/>
-          </xul:hbox>
-          <xul:hbox class="console-row-file" xbl:inherits="hidden=hideSource">
-            <xul:label class="label title" value="&consoleErrFile.label;"/>
-            <xul:label class="title" xbl:inherits="value=href" crop="right"/>
-            <xul:spacer flex="1"/>
-            <xul:hbox class="lineNumberRow" xbl:inherits="line">
-              <xul:label class="label title" value="&consoleErrLine.label;"/>
-              <xul:label class="label title" xbl:inherits="value=line"/>
-            </xul:hbox>
-          </xul:hbox>
-          <xul:vbox class="console-row-code" xbl:inherits="hidden=hideCode">
-            <xul:label class="monospace console-code" xbl:inherits="value=code" crop="end"/>
-          </xul:vbox>
-        </xul:vbox>
-      </xul:hbox>
-    </content>
-  </binding>
-  <binding id="message" extends="chrome://browser/content/bindings/bindings.xml#richlistitem">
-    <content>
-      <xul:hbox class="console-internal-box" flex="1">
-        <xul:vbox class="console-row-content" flex="1">
-          <xul:vbox class="console-row-msg" flex="1">
-            <xul:description class="console-msg-text title" xbl:inherits="xbl:text=msg"/>
-          </xul:vbox>
-        </xul:vbox>
-      </xul:hbox>
-    </content>
-  </binding>
-</bindings>
deleted file mode 100644
--- a/browser/metro/base/content/bindings/cssthrobber.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
-   - License, v. 2.0. If a copy of the MPL was not distributed with this
-   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<!-- When not in use, make sure you disable this or it will run continuously
-     in the background sucking up cpu. -->
-<bindings
-    xmlns="http://www.mozilla.org/xbl"
-    xmlns:xbl="http://www.mozilla.org/xbl"
-    xmlns:html="http://www.w3.org/1999/xhtml"
-    xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-  <binding id="cssthrobberBinding" extends="xul:box">
-    <content>
-      <html:div anonid="container" id="container" class="progressContainer">
-        <html:div class="progressBall" />
-        <html:div class="progressBall" />
-        <html:div class="progressBall" />
-        <html:div class="progressBall" />
-        <html:div class="progressBall" />
-      </html:div>
-    </content>
-    <implementation>
-      <field name="container" readonly="true">document.getAnonymousElementByAttribute(this, "anonid", "container");</field>
-      <property name="enabled">
-        <setter>
-          <![CDATA[
-            if (val) {
-              this.container.setAttribute("enabled", true);
-            } else {
-              this.container.removeAttribute("enabled");
-            }
-            return val;
-          ]]>
-        </setter>
-      </property>
-    </implementation>
-  </binding>
-</bindings>
deleted file mode 100644
--- a/browser/metro/base/content/bindings/dialog.xml
+++ /dev/null
@@ -1,109 +0,0 @@
-<?xml version="1.0"?>
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
-   - License, v. 2.0. If a copy of the MPL was not distributed with this
-   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<bindings
-    xmlns="http://www.mozilla.org/xbl"
-    xmlns:xbl="http://www.mozilla.org/xbl"
-    xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
-  <binding id="dialog">
-    <content xbl:inherits="orient, closebutton" flex="1">
-      <children/>
-    </content>
-
-    <implementation implements="nsIDOMEventListener">
-      <field name="arguments"/>
-      <field name="parent"/>
-      <property name="_scrollbox" readonly="true" onget="return this.getElementsByTagName('scrollbox')[0];"/>
-
-      <constructor><![CDATA[
-        this._closed = false;
-        if (this.hasAttribute("script")) {
-          try {
-            Services.scriptloader.loadSubScript(this.getAttribute("script"), this);
-          } catch(e) {
-            throw("Dialog : Unable to load script : " + this.getAttribute("script") + "\n");
-          }
-        }
-        window.addEventListener("unload", this, true);
-
-        let scrollbox = this._scrollbox;
-        if (scrollbox) {
-          window.addEventListener("resize", this, true);
-          scrollbox.addEventListener("overflow", this, true);
-        }
-        setTimeout(this.load.bind(this), 0);
-      ]]></constructor>
-
-      <method name="handleEvent">
-        <parameter name="aEvent"/>
-        <body><![CDATA[
-          switch(aEvent.type) {
-            case "unload":
-              if (aEvent.originalTarget == document)
-                this._removeDialog();
-              break;
-
-            case "resize":
-            case "overflow":
-              let scrollbox = this._scrollbox;
-              let style = document.defaultView.getComputedStyle(scrollbox, null);
-              let newHeight =  Math.ceil(scrollbox.firstChild.getBoundingClientRect().height) + 
-                               parseInt(style.marginTop) +
-                               parseInt(style.marginBottom);
-              scrollbox.style.minHeight = Math.min(window.innerHeight / 2, newHeight) + "px";
-              break;
-          }
-        ]]></body>
-      </method>
-
-      <method name="load">
-        <body><![CDATA[
-          if (this.hasAttribute("onload")) {
-            let func = new Function(this.getAttribute("onload"));
-            func.call(this);
-          }
-        ]]></body>
-      </method>
-
-      <method name="close">
-        <body><![CDATA[
-          if (this.hasAttribute("onclose")) {
-            let func = new Function(this.getAttribute("onclose"));
-            func.call(this);
-          }
-          this._removeDialog();
-        ]]></body>
-      </method>
-
-      <method name="_removeDialog">
-        <body><![CDATA[
-          window.removeEventListener("unload", this, true);
-          let scrollbox = this._scrollbox;
-          if (scrollbox) {
-            window.removeEventListener("resize", this, true);
-            scrollbox.removeEventListener("overflow", this, true);
-          }
-
-          this.parentNode.parentNode.removeChild(this.parentNode);
-          this._closed = true;
-
-          // emit DOMModalDialogClosed event
-          let event = document.createEvent("Events");
-          event.initEvent("DOMModalDialogClosed", true, false);
-          let dispatcher = this.parent || getBrowser();
-          dispatcher.dispatchEvent(event);
-        ]]></body>
-      </method>
-      
-      <method name="waitForClose">
-        <body><![CDATA[
-          while (!this._closed)
-            Services.tm.currentThread.processNextEvent(true);
-        ]]></body>
-      </method>
-    </implementation>
-  </binding>
-</bindings>
deleted file mode 100644
--- a/browser/metro/base/content/bindings/flyoutpanel.xml
+++ /dev/null
@@ -1,107 +0,0 @@
-<?xml version="1.0"?>
-
-<bindings xmlns="http://www.mozilla.org/xbl"
-          xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
-          xmlns:xbl="http://www.mozilla.org/xbl">
-
-  <binding id="flyoutpanelBinding" extends="xul:box">
-    <resources>
-      <stylesheet src="chrome://browser/skin/flyoutpanel.css"/>
-    </resources>
-
-    <content>
-      <xul:vbox class="flyoutpanel-wrapper">
-        <xul:hbox class="flyoutpanel-header" align="top">
-          <xul:toolbarbutton class="flyout-close-button"
-                             command="cmd_flyout_back"
-                             xbl:inherits="command"/>
-          <xul:label class="flyout-header-label" xbl:inherits="value=headertext"/>
-        </xul:hbox>
-        <xul:scrollbox class="flyoutpanel-contents" observes="bcast_preciseInput" flex="1" orient="vertical">
-          <children/>
-        </xul:scrollbox>
-      </xul:vbox>
-    </content>
-
-    <implementation>
-      <constructor>
-        <![CDATA[
-            this.setAttribute("isSlidOut", true);
-        ]]>
-      </constructor>
-      <method name="_onAfterSlideOut">
-        <body>
-          <![CDATA[
-            this.removeAttribute("isSlidingOut");
-            this.setAttribute("isSlidOut", true);
-            this.removeAttribute("visible");
-            this.removeEventListener("transitionend", this._onAfterSlideOut);
-          ]]>
-        </body>
-      </method>
-
-      <method name="_onAfterSlideIn">
-        <body>
-          <![CDATA[
-            this.removeAttribute("isSlidingIn");
-            this.setAttribute("isSlidIn", true);
-            this.removeEventListener("transitionend", this._onAfterSlideIn);
-          ]]>
-        </body>
-      </method>
-
-      <method name="hide">
-        <body>
-          <![CDATA[
-            if (this.hasAttribute("isSlidingOut")
-             || this.hasAttribute("isSlidOut")) {
-              return;
-            }
-
-            if (this.hasAttribute("isSlidingIn")) {
-              this._onAfterSlideIn();
-            }
-
-            this.addEventListener("transitionend", this._onAfterSlideOut);
-            this.classList.remove("flyoutpanel-slide-in");
-            this.setAttribute("isSlidingOut", true);
-            this.removeAttribute("isSlidIn");
-
-            let event = document.createEvent("Events");
-            event.initEvent("MozFlyoutPanelHiding", true, false);
-            this.dispatchEvent(event);
-          ]]>
-        </body>
-      </method>
-
-      <method name="show">
-        <body>
-          <![CDATA[
-            if (this.hasAttribute("isSlidingIn")
-             || this.hasAttribute("isSlidIn")) {
-              return;
-            }
-
-            if (this.hasAttribute("isSlidingOut")) {
-              this._onAfterSlideOut();
-            }
-
-            let event = document.createEvent("Events");
-            event.initEvent("MozFlyoutPanelShowing", true, false);
-            this.dispatchEvent(event);
-            this.classList.add("flyoutpanel-slide-in");
-
-            this.setAttribute("isSlidingIn", true);
-            this.setAttribute("visible", true);
-            this.removeAttribute("isSlidOut");
-          ]]>
-        </body>
-      </method>
-
-      <field name="anonScrollBox" readonly="true"><![CDATA[
-        // Expose the anyonymous scrollbox so ScrollUtils.getScrollboxFromElement can find it.
-        document.getAnonymousElementByAttribute(this, "class", "flyoutpanel-contents");
-      ]]></field>
-    </implementation>
-  </binding>
-</bindings>
deleted file mode 100644
--- a/browser/metro/base/content/bindings/grid.xml
+++ /dev/null
@@ -1,1125 +0,0 @@
-<?xml version="1.0"?>
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
-   - License, v. 2.0. If a copy of the MPL was not distributed with this
-   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-
-<bindings
-    xmlns="http://www.mozilla.org/xbl"
-    xmlns:xbl="http://www.mozilla.org/xbl"
-    xmlns:html="http://www.w3.org/1999/xhtml"
-    xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
-  <binding id="richgrid"
-           extends="chrome://global/content/bindings/general.xml#basecontrol">
-
-    <content>
-      <html:div id="grid-div" anonid="grid" class="richgrid-grid" xbl:inherits="compact">
-        <children/>
-      </html:div>
-    </content>
-
-    <implementation implements="nsIDOMXULSelectControlElement">
-      <property name="_grid" readonly="true" onget="return document.getAnonymousElementByAttribute(this, 'anonid', 'grid');"/>
-
-      <property name="isBound" readonly="true" onget="return !!this._grid"/>
-      <property name="isArranging" readonly="true" onget="return !!this._scheduledArrangeItemsTimerId"/>
-
-      <field name="controller">null</field>
-
-      <!-- collection of child items excluding empty tiles -->
-      <property name="items" readonly="true" onget="return this.querySelectorAll('richgriditem[value]');"/>
-      <property name="itemCount" readonly="true" onget="return this.items.length;"/>
-
-      <method name="isItem">
-        <parameter name="anItem"/>
-        <body>
-          <![CDATA[
-            // only non-empty child nodes are considered items
-            return anItem && anItem.hasAttribute("value") &&
-                   anItem.parentNode == this;
-          ]]>
-        </body>
-      </method>
-
-      <!-- nsIDOMXULMultiSelectControlElement (not fully implemented) -->
-
-      <method name="clearSelection">
-        <body>
-          <![CDATA[
-            // 'selection' and 'selected' are confusingly overloaded here
-            // as richgrid is adopting multi-select behavior, but select/selected are already being
-            // used to describe triggering the default action of a tile
-            if (this._selectedItem){
-              this._selectedItem.removeAttribute("selected");
-              this._selectedItem = null;
-            }
-
-            for (let childItem of this.selectedItems) {
-              childItem.removeAttribute("selected");
-            }
-          ]]>
-        </body>
-      </method>
-
-      <method name="toggleItemSelection">
-        <parameter name="anItem"/>
-        <body>
-          <![CDATA[
-            if (!this.isItem(anItem))
-              return;
-
-            let wasSelected = anItem.selected;
-            if ("single" == this.getAttribute("seltype")) {
-              this.clearSelection();
-            }
-            this._selectedItem = wasSelected ? null : anItem;
-            if (wasSelected)
-              anItem.removeAttribute("selected");
-            else
-              anItem.setAttribute("selected", true);
-            this._fireEvent("selectionchange");
-          ]]>
-        </body>
-      </method>
-
-      <method name="selectItem">
-        <parameter name="anItem"/>
-        <body>
-          <![CDATA[
-            if (!this.isItem(anItem))
-              return;
-            let wasSelected = anItem.selected,
-                isSingleMode = ("single" == this.getAttribute("seltype"));
-            if (isSingleMode) {
-              this.clearSelection();
-            }
-            this._selectedItem = anItem;
-            if (wasSelected) {
-              return;
-            }
-            anItem.setAttribute("selected", true);
-            if (isSingleMode) {
-              this._fireEvent("select");
-            } else {
-              this._fireEvent("selectionchange");
-            }
-          ]]>
-        </body>
-      </method>
-
-      <method name="selectNone">
-        <body>
-          <![CDATA[
-            let selectedCount = this.selectedItems.length;
-            this.clearSelection();
-            if (selectedCount && "single" != this.getAttribute("seltype")) {
-              this._fireEvent("selectionchange");
-            }
-          ]]>
-        </body>
-      </method>
-
-      <method name="handleItemClick">
-        <parameter name="aItem"/>
-        <parameter name="aEvent"/>
-        <body>
-          <![CDATA[
-            if (!(this.isBound && this.isItem(aItem)))
-              return;
-
-            if ("single" == this.getAttribute("seltype")) {
-              // we'll republish this as a selectionchange event on the grid
-              aEvent.stopPropagation();
-              this.selectItem(aItem);
-            }
-
-            if (this.controller && this.controller.handleItemClick)
-              this.controller.handleItemClick(aItem, aEvent);
-          ]]>
-        </body>
-      </method>
-
-      <method name="handleItemContextMenu">
-        <parameter name="aItem"/>
-        <parameter name="aEvent"/>
-        <body>
-          <![CDATA[
-            if (!this.isBound || this.noContext || !this.isItem(aItem))
-              return;
-            // we'll republish this as a selectionchange event on the grid
-            aEvent.stopPropagation();
-            this.toggleItemSelection(aItem);
-          ]]>
-        </body>
-      </method>
-
-      <property name="contextSetName" readonly="true"
-                onget="return this.getAttribute('set-name');"/>
-
-      <property name="contextActions">
-        <getter>
-          <![CDATA[
-            // return the subset of verbs that apply to all selected tiles
-            let tileNodes = this.selectedItems;
-            if (!tileNodes.length) {
-              return new Set();
-            }
-
-            // given one or more sets of values,
-            // return a set with only those values present in each
-            let initialItem = tileNodes[0];
-
-            let verbSet = new Set(initialItem.contextActions);
-            for (let i=1; i<tileNodes.length; i++){
-              let set = tileNodes[i].contextActions;
-              for (let item of verbSet) {
-                if (!set.has(item)){
-                  verbSet.delete(item);
-                }
-              }
-            }
-            // add the clear-selection button if more than one tiles are selected
-            if (tileNodes.length > 1) {
-              verbSet.add('clear');
-            }
-            // returns Set
-            return verbSet;
-          ]]>
-        </getter>
-      </property>
-
-    <!-- nsIDOMXULSelectControlElement -->
-
-      <field name="_selectedItem">null</field>
-      <property name="selectedItem" onget="return this._selectedItem;">
-        <setter>
-          <![CDATA[
-            this.selectItem(val);
-          ]]>
-        </setter>
-      </property>
-
-      <!-- partial implementation of multiple selection interface -->
-      <property name="selectedItems">
-        <getter>
-          <![CDATA[
-            return this.querySelectorAll("richgriditem[value][selected]");
-          ]]>
-        </getter>
-      </property>
-
-      <property name="selectedIndex">
-        <getter>
-          <![CDATA[
-            return this.getIndexOfItem(this._selectedItem);
-          ]]>
-        </getter>
-        <setter>
-          <![CDATA[
-            if (val >= 0) {
-              let selected = this.getItemAtIndex(val);
-              this.selectItem(selected);
-            } else {
-              this.selectNone();
-            }
-          ]]>
-        </setter>
-      </property>
-
-      <method name="appendItem">
-        <parameter name="aLabel"/>
-        <parameter name="aValue"/>
-        <parameter name="aSkipArrange"/>
-        <body>
-          <![CDATA[
-            let item = this.nextSlot();
-            item.setAttribute("value", aValue);
-            item.setAttribute("label", aLabel);
-
-            if (!aSkipArrange)
-              this.arrangeItems();
-            return item;
-          ]]>
-        </body>
-      </method>
-
-      <method name="_slotValues">
-        <body><![CDATA[
-          return Array.map(this.children, (cnode) => cnode.getAttribute("value"));
-        ]]></body>
-      </method>
-
-      <property name="minSlots" readonly="true"
-                onget="return this.getAttribute('minSlots') || 3;"/>
-
-      <method name="clearAll">
-        <parameter name="aSkipArrange"/>
-        <body>
-          <![CDATA[
-            const ELEMENT_NODE_TYPE = Components.interfaces.nsIDOMNode.ELEMENT_NODE;
-            let slotCount = this.minSlots;
-            let childIndex = 0;
-            let child = this.firstChild;
-            while (child) {
-              // remove excess elements and non-element nodes
-              if (child.nodeType !== ELEMENT_NODE_TYPE || childIndex+1 > slotCount) {
-                let orphanNode = child;
-                child = orphanNode.nextSibling;
-                this.removeChild(orphanNode);
-                continue;
-              }
-              if (child.hasAttribute("value")) {
-                this._releaseSlot(child);
-              }
-              child = child.nextSibling;
-              childIndex++;
-            }
-            // create our quota of item slots
-            for (let count = this.childElementCount; count < slotCount; count++) {
-              this.appendChild( this._createItemElement() );
-            }
-
-            if (!aSkipArrange)
-              this.arrangeItems();
-          ]]>
-        </body>
-      </method>
-
-      <method name="_slotAt">
-        <parameter name="anIndex"/>
-        <body>
-          <![CDATA[
-            // backfill with new slots as necessary
-            let count = Math.max(1+anIndex, this.minSlots) - this.childElementCount;
-            for (; count > 0; count--) {
-              this.appendChild( this._createItemElement() );
-            }
-            return this.children[anIndex];
-          ]]>
-        </body>
-      </method>
-
-      <method name="nextSlot">
-        <body>
-          <![CDATA[
-            if (!this.itemCount) {
-              return this._slotAt(0);
-            }
-            let lastItem = this.items[this.itemCount-1];
-            let nextIndex = 1 + Array.indexOf(this.children, lastItem);
-            return this._slotAt(nextIndex);
-          ]]>
-        </body>
-      </method>
-
-      <method name="_releaseSlot">
-        <parameter name="anItem"/>
-        <body>
-          <![CDATA[
-            // Flush out data and state attributes so we can recycle this slot/element
-            let exclude = { value: 1, tiletype: 1 };
-            let attrNames = [attr.name for (attr of anItem.attributes)];
-            for (let attrName of attrNames) {
-              if (!(attrName in exclude))
-                anItem.removeAttribute(attrName);
-            }
-            // clear out inline styles
-            anItem.removeAttribute("style");
-            // finally clear the value, which should apply the richgrid-empty-item binding
-            anItem.removeAttribute("value");
-          ]]>
-        </body>
-      </method>
-
-      <method name="insertItemAt">
-        <parameter name="anIndex"/>
-        <parameter name="aLabel"/>
-        <parameter name="aValue"/>
-        <parameter name="aSkipArrange"/>
-        <body>
-          <![CDATA[
-            anIndex = Math.min(this.itemCount, anIndex);
-            let insertedItem;
-            let existing = this.getItemAtIndex(anIndex);
-            if (existing) {
-              // use an empty slot if we have one, otherwise insert it
-              let childIndex = Array.indexOf(this.children, existing);
-              if (childIndex > 0 && !this.children[childIndex-1].hasAttribute("value")) {
-                insertedItem = this.children[childIndex-1];
-              } else {
-                insertedItem = this.insertBefore(this._createItemElement(),existing);
-              }
-            }
-            if (!insertedItem) {
-              insertedItem = this._slotAt(anIndex);
-            }
-            insertedItem.setAttribute("value", aValue);
-            insertedItem.setAttribute("label", aLabel);
-            if (!aSkipArrange)
-              this.arrangeItems();
-            return insertedItem;
-          ]]>
-        </body>
-      </method>
-
-      <method name="removeItemAt">
-        <parameter name="anIndex"/>
-        <parameter name="aSkipArrange"/>
-        <body>
-          <![CDATA[
-            let item = this.getItemAtIndex(anIndex);
-            if (!item)
-              return null;
-            return this.removeItem(item, aSkipArrange);
-          ]]>
-        </body>
-      </method>
-
-      <method name="removeItem">
-        <parameter name="aItem"/>
-        <parameter name="aSkipArrange"/>
-        <body>
-          <![CDATA[
-            if (!this.isItem(aItem))
-              return null;
-
-            let removal = this.removeChild(aItem);
-            // replace the slot if necessary
-            if (this.childElementCount < this.minSlots) {
-              this.nextSlot();
-            }
-
-            if (removal && !aSkipArrange)
-                this.arrangeItems();
-
-            // note that after removal the node is unbound
-            // so none of the richgriditem binding methods & properties are available
-            return removal;
-          ]]>
-        </body>
-      </method>
-
-      <method name="getIndexOfItem">
-        <parameter name="anItem"/>
-        <body>
-          <![CDATA[
-            if (!this.isItem(anItem))
-              return -1;
-
-            return Array.indexOf(this.items, anItem);
-          ]]>
-        </body>
-      </method>
-
-      <method name="getItemAtIndex">
-        <parameter name="anIndex"/>
-        <body>
-          <![CDATA[
-            if (!this._isIndexInBounds(anIndex))
-              return null;
-            return this.items.item(anIndex);
-          ]]>
-        </body>
-      </method>
-
-      <method name="getItemsByUrl">
-        <parameter name="aUrl"/>
-        <body>
-          <![CDATA[
-            return this.querySelectorAll('richgriditem[value="'+aUrl+'"]');
-          ]]>
-        </body>
-      </method>
-
-    <!-- Interface for offsetting selection and checking bounds -->
-
-      <property name="isSelectionAtStart" readonly="true"
-                onget="return this.selectedIndex == 0;"/>
-
-      <property name="isSelectionAtEnd" readonly="true"
-                onget="return this.selectedIndex == (this.itemCount - 1);"/>
-
-      <property name="isSelectionInStartRow" readonly="true">
-        <getter>
-          <![CDATA[
-            return this.selectedIndex < this.columnCount;
-          ]]>
-        </getter>
-      </property>
-
-      <property name="isSelectionInEndRow" readonly="true">
-        <getter>
-          <![CDATA[
-            let lowerBound = (this.rowCount - 1) * this.columnCount;
-            let higherBound = this.rowCount * this.columnCount;
-
-            return this.selectedIndex >= lowerBound &&
-                   this.selectedIndex < higherBound;
-          ]]>
-        </getter>
-      </property>
-
-      <method name="offsetSelection">
-        <parameter name="aOffset"/>
-        <body>
-          <![CDATA[
-            let newIndex = this.selectedIndex + aOffset;
-            if (this._isIndexInBounds(newIndex))
-              this.selectedIndex = newIndex;
-          ]]>
-        </body>
-      </method>
-
-      <method name="offsetSelectionByRow">
-        <parameter name="aRowOffset"/>
-        <body>
-          <![CDATA[
-            let newIndex = this.selectedIndex + (this.columnCount * aRowOffset);
-            if (this._isIndexInBounds(newIndex))
-              this.selectedIndex -= this.columnCount;
-          ]]>
-        </body>
-      </method>
-
-      <!-- Interface for grid layout management -->
-
-      <field name="_rowCount">0</field>
-      <property name="rowCount" readonly="true" onget="return this._rowCount;"/>
-      <field name="_columnCount">0</field>
-      <property name="columnCount" readonly="true" onget="return this._columnCount;"/>
-      <property name="_containerSize">
-        <getter><![CDATA[
-            // return the rect that represents our bounding box
-            let containerNode = this.hasAttribute("flex") ? this : this.parentNode;
-            let rect = containerNode.getBoundingClientRect();
-            // return falsy if the container has no height
-            return rect.height ? {
-              width: rect.width,
-              height: rect.height
-            } : null;
-        ]]></getter>
-      </property>
-
-      <property name="_itemSize">
-        <getter><![CDATA[
-            // return the dimensions that represent an item in the grid
-
-            // grab tile/item dimensions
-            this._tileSizes = this._getTileSizes();
-
-            let type = this.getAttribute("tiletype") || "default";
-            let dims = this._tileSizes && this._tileSizes[type];
-            if (!dims) {
-              throw new Error("Missing tile sizes for '" + type + "' type");
-            }
-            return dims;
-        ]]></getter>
-      </property>
-
-      <!-- do conditions allow layout/arrange of the grid? -->
-      <property name="_canLayout" readonly="true">
-        <getter>
-          <![CDATA[
-            if (!(this._grid && this._grid.style)) {
-               return false;
-            }
-
-            let gridItemSize = this._itemSize;
-
-            // If we don't have valid item dimensions we can't arrange yet
-            if (!(gridItemSize && gridItemSize.height)) {
-              return false;
-            }
-
-            let container = this._containerSize;
-            // If we don't have valid container dimensions we can't arrange yet
-            if (!(container && container.height)) {
-              return false;
-            }
-            return true;
-          ]]>
-        </getter>
-      </property>
-
-      <field name="_scheduledArrangeItemsTimerId">null</field>
-      <field name="_scheduledArrangeItemsTries">0</field>
-      <field name="_maxArrangeItemsRetries">5</field>
-
-      <method name="_scheduleArrangeItems">
-        <parameter name="aTime"/>
-        <body>
-          <![CDATA[
-              // cap the number of times we reschedule calling arrangeItems
-              if (
-                  !this._scheduledArrangeItemsTimerId &&
-                  this._maxArrangeItemsRetries > this._scheduledArrangeItemsTries
-              ) {
-                this._scheduledArrangeItemsTimerId = setTimeout(this.arrangeItems.bind(this), aTime || 0);
-                // track how many times we've attempted arrangeItems
-                this._scheduledArrangeItemsTries++;
-              }
-          ]]>
-        </body>
-      </method>
-
-      <method name="arrangeItems">
-        <body>
-          <![CDATA[
-            if (this.hasAttribute("deferlayout")) {
-              return;
-            }
-            if (!this._canLayout) {
-              // try again later
-              this._scheduleArrangeItems();
-              return;
-            }
-
-            let itemDims = this._itemSize;
-            let containerDims = this._containerSize;
-            let slotsCount = this.childElementCount;
-
-            // reset the flags
-            if (this._scheduledArrangeItemsTimerId) {
-              clearTimeout(this._scheduledArrangeItemsTimerId);
-              delete this._scheduledArrangeItemsTimerId;
-            }
-            this._scheduledArrangeItemsTries = 0;
-
-            // clear explicit width and columns before calculating from avail. height again
-            let gridStyle = this._grid.style;
-            gridStyle.removeProperty("min-width");
-            gridStyle.removeProperty("-moz-column-count");
-
-            if (this.hasAttribute("vertical")) {
-              this._columnCount = Math.floor(containerDims.width / itemDims.width) || 1;
-              this._rowCount = Math.floor(slotsCount / this._columnCount);
-            } else {
-              // rows attribute is fixed number of rows
-              let maxRows = Math.floor(containerDims.height / itemDims.height);
-              this._rowCount = this.getAttribute("rows") ?
-                                  // fit indicated rows when possible
-                                  Math.min(maxRows, this.getAttribute("rows")) :
-                                  // at least 1 row
-                                  Math.min(maxRows, slotsCount) || 1;
-
-              // columns attribute is min number of cols
-              this._columnCount = Math.ceil(slotsCount / this._rowCount) || 1;
-              if (this.getAttribute("columns")) {
-                this._columnCount = Math.max(this._columnCount, this.getAttribute("columns"));
-              }
-            }
-
-            // width is typically auto, cap max columns by truncating items collection
-            // or, setting max-width style property with overflow hidden
-            if (this._columnCount) {
-              gridStyle.MozColumnCount = this._columnCount;
-            }
-            this._fireEvent("arranged");
-          ]]>
-        </body>
-      </method>
-      <method name="arrangeItemsNow">
-        <body>
-          <![CDATA[
-            this.removeAttribute("deferlayout");
-            // cancel any scheduled arrangeItems and reset flags
-            if (this._scheduledArrangeItemsTimerId) {
-              clearTimeout(this._scheduledArrangeItemsTimerId);
-              delete this._scheduledArrangeItemsTimerId;
-            }
-            this._scheduledArrangeItemsTries = 0;
-            // pass over any params
-            return this.arrangeItems.apply(this, arguments);
-          ]]>
-        </body>
-      </method>
-
-      <!-- Inteface to suppress selection events -->
-      <property name="suppressOnSelect"
-                  onget="return this.getAttribute('suppressonselect') == 'true';"
-                  onset="this.setAttribute('suppressonselect', val);"/>
-      <property name="noContext"
-                  onget="return this.hasAttribute('nocontext');"
-                  onset="if (val) this.setAttribute('nocontext', true); else this.removeAttribute('nocontext');"/>
-      <property name="crossSlideBoundary"
-          onget="return this.hasAttribute('crossslideboundary')? this.getAttribute('crossslideboundary') : Infinity;"/>
-
-    <!-- Internal methods -->