Diff for /chimera/NSBrowserView.mm between versions 1.18 and 1.19

version 1.18, 2002/02/10 01:12:05 version 1.19, 2002/02/12 00:18:34
Line 1293  nsHeaderSniffer::OnSecurityChange(nsIWeb Line 1293  nsHeaderSniffer::OnSecurityChange(nsIWeb
     clipboard->SelectAll();      clipboard->SelectAll();
 }  }
   
   -(NSString*)getCurrentURLSpec
   {
       NSString* empty = @"";
       nsCOMPtr<nsIDOMWindow> domWindow;
       _webBrowser->GetContentDOMWindow(getter_AddRefs(domWindow));
       if (!domWindow)
           return empty;
       
       nsCOMPtr<nsIDOMDocument> domDocument;
       domWindow->GetDocument(getter_AddRefs(domDocument));
       if (!domDocument)
           return empty;
       nsCOMPtr<nsIDOMNSDocument> nsDoc(do_QueryInterface(domDocument));
       if (!nsDoc)
           return empty;
       nsCOMPtr<nsIDOMLocation> location;
       nsDoc->GetLocation(getter_AddRefs(location));
       if (!location)
           return empty;
       nsAutoString urlStr;
       location->GetHref(urlStr);
       nsCAutoString urlCStr; urlCStr.AssignWithConversion(urlStr);
       
       return [NSString stringWithCString: urlCStr.get()];
   }
 @end  @end
   

Removed from v.1.18  
changed lines
  Added in v.1.19


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