https://html.spec.whatwg.org/multipage/rendering.html#the-page
For each property in the table below, given a body element, the first attribute that exists maps to the pixel length property on the body element.
The precedence order given here is marginheight > parent iframe's marginheight> topmargin (same deal for the other four).
I think it makes more sense for the body attributes to both have precedence over the parent iframe. This is what Gecko does. Webkit copies the marginwidth/height off the parent iframe and thus follows spec.
Should we change the spec here?