The code was originally taken from mozilla's gtkmozembed
code.