Snippets code from my daily experience

December 27, 2007

Richscrollbar released

Filed under: extension,firefox,nsIStyleSheetService,richscrollbar — dafi @ 11:56 am

After ten months I’ve released a new Richscrollbar (RSB) version, starting from FF3 compatibility issues I’ve done some other work.

Finally standard OS themes aren’t offended by old ugly RSB scrollbars, now RSB integrates better with the native OS look&feel.

Now RSB simplifies integration with themes, a model based on supported themes repository allow me to quickly add css styles.

Finally users can decide to remove RSB scrollbars from listbox, tree and so on and have them only on main browser window.

Very strange is the reason RSB doesn’t work on FF3; The nsIStyleSheetService.USER_SHEET must be changed to nsIStyleSheetService.AGENT_SHEET

It’s always present the problem with disabled javascript due to bug 236839 that limits RSB usage for example with Thunderbird or when NoScript is installed

Initially I would make RSB compatible with Seamonkey but the current number of users is so little that this compatibility isn’t necessary

December 20, 2007

Firefox 3 and broken extensions

When I started Richscrollbar (RSB for friends) development I could not figure out a so difficult programming life cycle.

After all its task is simple, add extra buttons to browser scrollbars to speedup movements inside web page.

Gecko is affect by a bug that reduces RSB productivity dramatically but I’ve created it anyway.

Now I discover RSB totally doesn’t work with Firefox 3 beta 2, Mozilla guys changed API and I suspect introduced some regression.

Obviously it is impossibile to explain the problem to Mozilla, they are so busy to fight against the world.

After some frustrating debug I found the problems and fixed them.

Problem nr 1.

The nsIStyleSheetService.USER_AGENT has changed behaviour without documenting it (at least at this date)

I used USER_SHEET in Firefox 2 but under FF3 the same code simply doesn’t work.

I’ve replaced it with the other flag AGENT_SHEET and magically RSB started to work.

Where can I read the new behaviour? Damned Mozilla 😛

Problem nr 2.

An horizontal useless scrollbar is always visible only on tab window open at browser startup, if user opens new tab and/or windows this dumb doesn’t appear, sigh!

I found a reasonable workaround hiding the scrollbar inside the notificationbox component.

I hope to publish the fixed RSB on this weekend.

Blog at WordPress.com.