Tuesday, February 16, 2010

Looking FireFox code

While looking FireFox code in the file

tabbrowser.xml

line 1727
i found the function "SwapBrowserAndCloseOther".

From what I can see these lines
1742 var ourIndex = aOurTab._tPos;
1743 const filter = this.mTabFilters[ourIndex];
1744 var tabListener = this.mTabListeners[ourIndex];
1745 var ourBrowser = this.getBrowserForTab(aOurTab);
1746 ourBrowser.webProgress.removeProgressListener(filter);
1747 filter.removeProgressListener(tabListener);
1748 var tabListenerBlank = tabListener.mBlank;

stop the tab a browser processes

while this line hooks the tabs processes to the new browser

ourBrowser.swapDocShells(aOtherTab.linkedBrowser);

Now for the long process of figuring out how these functions work

Looking at SeaMonkey Code

As you may know my project for OSD600 is moving tabs from one SeaMonkey browers to another SeaMonkey browser.

The Bug
https://bugzilla.mozilla.org/show_bug.cgi?id=449728

This is a standard in FireFox so this project is copying a pasting code and making it work. The problem is SeaMonkey and FireFox is millions of lines of code. I was told a good place to start is the comm-central tree in the file tabbrowser.xml. There i found the following functions addtab, removetab, movetabto.

TabBrowser.xml
http://mxr.mozilla.org/comm-central/source/suite/browser/tabbrowser.xml

Now i need to find where FireFox handles tabs

Monday, February 8, 2010

Building SeaMonkey


Building SeaMonkey was a task I kept putting off but really didn't take that long considering the previous courses I have taken has me install the prerequisites for this task.

The first thing i had to do was install Mercurial
http://mercurial.selenic.com/wiki/

And download the SeaMonkey code off comm-central
http://hg.mozilla.org/releases/comm-1.9.1/

I used the command to download and send the code to a the folder called src
hg clone http://hg.mozilla.org/releases/comm-1.9.1/file/c5c64590370a src
python client.py checkout

After downloading it i created the .mozconfig file.

ac_add_options --enable-application=suite
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/objdir-sm-release
mk_add_options MOZ_MAKE_FLAGS="-j4"


And tried to compile the source code. The problem i ran into was that i could not compile the code if the path to the code had spaces. What took me awhile to realize was the code downloaded from comm-central to my documents and setttings, and i couldn't rename that. I cut and paste the code else where which took 20 mintues, a lot files.

After figure that out i used the command
make -f client.mk

After and hour of compiling i was rewarded with no errors and a clean launch of SeaMonkey