MDL-22446, MDL-22736, MDL-29624, MDL-29987...
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.
- has a clone
MDL-40892 Embedded HTML resources don't make full use of available space or are not big enough for the content
- has been marked as being related by
MDL-29987 Embedded PDF files cause problems in some configurations
- is blocked by
MDL-29624 Media embedding should be consistent and customisable