Commit be36ebc4 authored by Mounir Lamouri's avatar Mounir Lamouri
Browse files

Merge mozilla-central into mozilla-inbound.

parents 8f5539d3 64d4bdb2
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -1100,12 +1100,9 @@ pref("devtools.editor.expandtab", true);
// Tells which component you want to use for source editing in developer tools.
//
// Available components:
//   "textarea" - this is a basic text editor, like an HTML <textarea>.
//
//   "orion" - this is the Orion source code editor from the Eclipse project. It
//   provides programmer-specific editor features such as syntax highlighting,
//   indenting and bracket recognition. It may not be appropriate for all
//   locales (esp. RTL) or a11y situations.
//   indenting and bracket recognition.
pref("devtools.editor.component", "orion");

// Whether the character encoding menu is under the main Firefox button. This
+17 −5
Original line number Diff line number Diff line
@@ -86,7 +86,8 @@ var gLastValidURLStr = "";
var gInPrintPreviewMode = false;
var gDownloadMgr = null;
var gContextMenu = null; // nsContextMenu instance
var gDelayedStartupTimeoutId;
var gDelayedStartupTimeoutId; // used for non-browser-windows
var gFirstPaintListener = null;
var gStartupRan = false;

#ifndef XP_MACOSX
@@ -1383,7 +1384,18 @@ function BrowserStartup() {

  retrieveToolbarIconsizesFromTheme();

  gDelayedStartupTimeoutId = setTimeout(delayedStartup, 0, isLoadingBlank, mustLoadSidebar);
  // Listen for the first paint event for this window, and only do non-critical
  // work then, so that things like session restore don't block the window from
  // being visible.
  gFirstPaintListener = function(e) {
    if (e.target == window) {
      window.removeEventListener("MozAfterPaint", gFirstPaintListener, false);
      gFirstPaintListener = null;
      delayedStartup(isLoadingBlank, mustLoadSidebar);
    }
  };
  window.addEventListener("MozAfterPaint", gFirstPaintListener, false);

  gStartupRan = true;
}

@@ -1514,7 +1526,6 @@ function delayedStartup(isLoadingBlank, mustLoadSidebar) {
  Cu.import("resource:///modules/TelemetryTimestamps.jsm", tmp);
  let TelemetryTimestamps = tmp.TelemetryTimestamps;
  TelemetryTimestamps.add("delayedStartupStarted");
  gDelayedStartupTimeoutId = null;

  Services.obs.addObserver(gSessionHistoryObserver, "browser:purge-session-history", false);
  Services.obs.addObserver(gXPInstallObserver, "addon-install-disabled", false);
@@ -1867,8 +1878,9 @@ function BrowserShutdown() {

  // Now either cancel delayedStartup, or clean up the services initialized from
  // it.
  if (gDelayedStartupTimeoutId) {
    clearTimeout(gDelayedStartupTimeoutId);
  if (gFirstPaintListener) {
    window.removeEventListener("MozAfterPaint", gFirstPaintListener, false);
    gFirstPaintListener = null;
  } else {
    if (Win7Features)
      Win7Features.onCloseWindow();
+6 −5
Original line number Diff line number Diff line
@@ -87,10 +87,11 @@ let gPage = {
      // Initialize the drop target shim.
      gDropTargetShim.init();

#ifdef XP_MACOSX
      // Workaround to prevent a delay on MacOSX due to a slow drop animation.
      let doc = document.documentElement;
      doc.addEventListener("dragover", this.onDragOver, false);
      doc.addEventListener("drop", this.onDrop, false);
      document.addEventListener("dragover", this.onDragOver, false);
      document.addEventListener("drop", this.onDrop, false);
#endif
    }.bind(this));
  },

@@ -155,7 +156,7 @@ let gPage = {
   * @param aEvent The 'dragover' event.
   */
  onDragOver: function Page_onDragOver(aEvent) {
    if (gDrag.isValid(aEvent))
    if (gDrag.isValid(aEvent) && gDrag.draggedSite)
      aEvent.preventDefault();
  },

@@ -165,7 +166,7 @@ let gPage = {
   * @param aEvent The 'drop' event.
   */
  onDrop: function Page_onDrop(aEvent) {
    if (gDrag.isValid(aEvent)) {
    if (gDrag.isValid(aEvent) && gDrag.draggedSite) {
      aEvent.preventDefault();
      aEvent.stopPropagation();
    }
+10 −6
Original line number Diff line number Diff line
@@ -322,15 +322,19 @@ function newWindowWithState(state, callback) {
      callback(win);
  };

  whenDelayedStartupFinished(win, function () {
    ss.setWindowState(win, JSON.stringify(state), true);
    win.close();
    win = ss.undoCloseWindow(0);

    whenWindowLoaded(win, function () {
      whenWindowStateReady(win, function () {
        afterAllTabsLoaded(check, win);
      });

    ss.setWindowState(win, JSON.stringify(state), true);
    });

    whenDelayedStartupFinished(win, check);
  });
}

// ----------
+0 −1
Original line number Diff line number Diff line
@@ -49,7 +49,6 @@ TEST_DIRS += test
EXTRA_JS_MODULES = \
	source-editor.jsm \
	source-editor-orion.jsm \
	source-editor-textarea.jsm \
	source-editor-ui.jsm \
	$(NULL)

Loading