When using the "Embed" display option for a HTML file in mod_resource, space is wasted around the embedding object element, and an extra scrollbar appears if the embedded HTML is bigger than the object element (see attached embed-html-dist.png).
The attached embedheight.patch changes M.util.init_maximised_embed() to find the height of the embedded HTML via DOM getContentDocument, and resizes the object to not need scrollbars (see attached embed-html-patched.png).
Unfortunately this isn't ready for release as:
1. IE < 8 don't like it (although it seems to be no worse than without the patch for those browsers), and
2. The embedded HTML height changes depending on how it's queried:
automatically from M.util.init_maximised_embed(), or
manually from JS console.
For Firefox and Chromium it's not too bad, but IE is out by an order of magnitude!
So - not production ready, but I wanted to post what I've done so far in case someone else can figure out how to fix those issues.