@Kovid,
Okay I took a shot at doing this in gumbo directly just before the Preview is loaded. Seems to work but the code is a bit messy.
One question:
I think I followed your general logic although I am not sure after checking for a single div child of body why you would ever see ("svg", "image") and not always ("div", "svg", "image") when building the path from the body. I built my path backwards from the image tag itself back to the body tag but I think it amounts to the same thing.
Am I missing something?
https://github.com/Sigil-Ebook/Sigil...2e178bb226bc5f
Quote:
Originally Posted by kovidgoyal
See fs_images.pyj in the calibre source code for the logic I use to detect when to convert 100% too 100vh
|