Tuesday, September 23, 2008

Dredging through The Source

The lab today is to pick a feature of Firefox's UI, and find the source code snippet that controls its behaviour. We were given a list of features to choose from, or we could pick our own.

The feature that bugs me most is that the back button in FF3 no longer has a dropdown option, like it did in FF2. The forward button has the drop-down, so I suspect the functionality is buried in there somewhere. I start my search by looking for the string "back button"...

I ended up finding several entries, listed here. NS_THEME_TOOLBAR_DUAL_BUTTON is defined as a macro for buttons that trigger drop-downs, like the back button used to.

At this point, I recall that Firefox offers theme customization. Within minutes of searching, I've found themes for FF3 that offer drop-down support for the back button. From this, I would assume that the back button must be called by the theme in order to appear...


From this, I learned that the back button's drop-down menu should be configured by editing the UI theme. It had nothing to do with the source code directly. However, I've definitely learned how to find out where such features of Firefox might be configured, and future searches will be much faster.

It was an awesome lab that quickly introduced a wide range of skills which are essential for working with Firefox, or any other large project.

No comments: