RenderFrameBase::layoutWithFlattening doesn't currently handle padding placed on the IFrame element. This is similar to the issues covered in https://bugs.webkit.org/show_bug.cgi?id=106167 and https://bugs.webkit.org/show_bug.cgi?id=90827 for seamless IFrames.
I don't know enough about flattened frames to know whether they _should_ respect padding, but it seems reasonable. WDYT, Eric?
I believe they should. I dont remember who the original author of flattening was maybe Antti?
Unassigning myself; let's be realistic about what I'm actually working on. :/