Commit a534b0b0 authored by Neil Deakin's avatar Neil Deakin
Browse files

Bug 743975 - remove unused NS_CREATE and NS_TABCHANGE events, r=smaug

parent 2ed511fe
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -821,7 +821,6 @@ NS_IMETHODIMP nsViewManager::DispatchEvent(nsGUIEvent *aEvent,
      break;
    }

    case NS_CREATE:
    case NS_DESTROY:
    case NS_SETZLEVEL:
      /* Don't pass these events through. Passing them through
+0 −5
Original line number Diff line number Diff line
@@ -150,8 +150,6 @@ class nsHashKey;

#define NS_WINDOW_START                 100

// Widget is being created
#define NS_CREATE                       (NS_WINDOW_START)
// Widget may be destroyed
#define NS_XUL_CLOSE                    (NS_WINDOW_START + 1)
// Widget is being destroyed
@@ -183,9 +181,6 @@ class nsHashKey;
// The events point contains the x, y location in screen coordinates
#define NS_MOVE                         (NS_WINDOW_START + 34) 

// Tab control's selected tab has changed
#define NS_TABCHANGE                    (NS_WINDOW_START + 35)

#define NS_OS_TOOLBAR                   (NS_WINDOW_START + 36)

// Indicates that the ui state such as whether to show focus or
+1 −3
Original line number Diff line number Diff line
@@ -2948,10 +2948,8 @@ NS_IMETHODIMP nsWindow::DispatchEvent(nsGUIEvent* event, nsEventStatus& aStatus)
    return NS_OK;
  }

  // if state is eInCreate, only send out NS_CREATE
  // if state is eDoingDelete, don't send out anything
  if ((mWindowState & nsWindowState_eLive) ||
      (mWindowState == nsWindowState_eInCreate && event->message == NS_CREATE)) {
  if (mWindowState & nsWindowState_eLive) {
    aStatus = (*mEventCallback)(event);
  }
  return NS_OK;
+0 −19
Original line number Diff line number Diff line
@@ -586,9 +586,6 @@ nsWindow::Create(nsIWidget *aParent,
    ::SetWindowLongPtrW(scrollableWnd, GWLP_USERDATA, (LONG_PTR)oldWndProc);
  }

  // call the event callback to notify about creation

  DispatchStandardEvent(NS_CREATE);
  SubclassWindow(TRUE);

  // If the internal variable set by the config.trim_on_minimize pref has not
@@ -4523,22 +4520,6 @@ bool nsWindow::ProcessMessage(UINT msg, WPARAM &wParam, LPARAM &lParam,
      OnSysColorChanged();
      break;

    case WM_NOTIFY:
      // TAB change
    {
      LPNMHDR pnmh = (LPNMHDR) lParam;

        switch (pnmh->code) {
          case TCN_SELCHANGE:
          {
            DispatchStandardEvent(NS_TABCHANGE);
            result = true;
          }
          break;
        }
    }
    break;

    case WM_THEMECHANGED:
    {
      // Update non-client margin offsets 
+0 −1
Original line number Diff line number Diff line
@@ -1396,7 +1396,6 @@ case _value: eventName.AssignLiteral(_name) ; break
  switch(aGuiEvent->message)
  {
    _ASSIGN_eventName(NS_BLUR_CONTENT,"NS_BLUR_CONTENT");
    _ASSIGN_eventName(NS_CREATE,"NS_CREATE");
    _ASSIGN_eventName(NS_DESTROY,"NS_DESTROY");
    _ASSIGN_eventName(NS_DRAGDROP_GESTURE,"NS_DND_GESTURE");
    _ASSIGN_eventName(NS_DRAGDROP_DROP,"NS_DND_DROP");