SeaMonkey is a different code base in the sense that the point of divergence was long, long ago. Waterfox on the other hand is very close of recent Firefox versions. SeaMonkey is descended from the Mozilla Suite, from which also Firefox descends, but SeaMonkey retains components that Firefox didn't like email, Composer, IRC chat etc.
BTW, I hope SeaMonkey gets a few more devs and love... from what I can see it's struggling badly. I hope to be wrong on this...
When the decision was made to make a browser-only version of the Mozilla suite, a separate front-end was built on Gecko eventually called Firefox. The legacy suite was renamed SeaMonkey, and it still uses the same repository. The trunk version of SeaMonkey uses the trunk version of Gecko, and it doesn't fork or modify the stock Gecko in anyway.