Diff for /chimera/ContentClickListener.mm between versions 1.6 and 1.7

version 1.6, 2002/03/09 03:34:51 version 1.7, 2002/03/09 23:14:00
Line 150  ContentClickListener::MouseClick(nsIDOME Line 150  ContentClickListener::MouseClick(nsIDOME
   PRUint16 button;    PRUint16 button;
   nsCOMPtr<nsIDOMMouseEvent> mouseEvent(do_QueryInterface(aEvent));    nsCOMPtr<nsIDOMMouseEvent> mouseEvent(do_QueryInterface(aEvent));
   mouseEvent->GetButton(&button);    mouseEvent->GetButton(&button);
  switch (button) {
    case 0: {  PRBool metaKey, shiftKey, altKey;
      PRBool metaKey, shiftKey, altKey;  mouseEvent->GetMetaKey(&metaKey);
      mouseEvent->GetMetaKey(&metaKey);  mouseEvent->GetShiftKey(&shiftKey);
      mouseEvent->GetShiftKey(&shiftKey);  mouseEvent->GetAltKey(&altKey);
      mouseEvent->GetAltKey(&altKey);  if ((metaKey && button == 0) || button == 1) {
      if (metaKey) {    // The command key is down or we got a middle click.  Open the link in a new window or tab.
        // The command key is down.  Open the link in a new window or tab.    PRBool useTab;
        PRBool useTab;    pref->GetBoolPref("browser.tabs.opentabfor.middleclick", &useTab);
        pref->GetBoolPref("browser.tabs.opentabfor.middleclick", &useTab);    PRBool loadInBackground;
        PRBool loadInBackground;    pref->GetBoolPref("browser.tabs.loadInBackground", &loadInBackground);
        pref->GetBoolPref("browser.tabs.loadInBackground", &loadInBackground);    if (shiftKey)
        if (shiftKey)      loadInBackground = !loadInBackground;
          loadInBackground = !loadInBackground;    if (useTab)
        if (useTab)      [mBrowserController openNewTabWithURL: urlToLoad loadInBackground: loadInBackground];
          [mBrowserController openNewTabWithURL: urlToLoad loadInBackground: loadInBackground];    else
        else      [mBrowserController openNewWindowWithURL: urlToLoad loadInBackground: loadInBackground];
          [mBrowserController openNewWindowWithURL: urlToLoad loadInBackground: loadInBackground]; 
      } 
      else if (altKey) { 
        // The user wants to save this link. 
        nsAutoString text; 
        GeckoUtils::GatherTextUnder(content, text); 
         
      } 
    } 
   }    }
      else if (altKey) {
     // The user wants to save this link.
     nsAutoString text;
     GeckoUtils::GatherTextUnder(content, text);
   }
 
   return NS_OK;    return NS_OK;
 }  }

Removed from v.1.6  
changed lines
  Added in v.1.7


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>