| Index: Source/core/html/HTMLBodyElement.cpp
|
| diff --git a/Source/core/html/HTMLBodyElement.cpp b/Source/core/html/HTMLBodyElement.cpp
|
| index add8f16a6bb66d79e151ba983d2a664a053642a0..7118e76cf0f55b353ff7a1e0b7788e259e2d8aee 100644
|
| --- a/Source/core/html/HTMLBodyElement.cpp
|
| +++ b/Source/core/html/HTMLBodyElement.cpp
|
| @@ -159,12 +159,20 @@ void HTMLBodyElement::didNotifySubtreeInsertionsToDocument()
|
| // FIXME: It's surprising this is web compatible since it means a
|
| // marginwidth and marginheight attribute can magically appear on the <body>
|
| // of all documents embedded through <iframe> or <frame>.
|
| + int marginWidth = -1;
|
| + int marginHeight = -1;
|
| +
|
| HTMLFrameOwnerElement* ownerElement = document().ownerElement();
|
| - if (!isHTMLFrameElementBase(ownerElement))
|
| - return;
|
| - HTMLFrameElementBase& ownerFrameElement = toHTMLFrameElementBase(*ownerElement);
|
| - int marginWidth = ownerFrameElement.marginWidth();
|
| - int marginHeight = ownerFrameElement.marginHeight();
|
| + if (isHTMLFrameElementBase(ownerElement)) {
|
| + HTMLFrameElementBase& ownerFrameElement = toHTMLFrameElementBase(*ownerElement);
|
| + marginWidth = ownerFrameElement.marginWidth();
|
| + marginHeight = ownerFrameElement.marginHeight();
|
| + } else if (!ownerElement && document().frame()->owner()) {
|
| + // Our owner is a RemoteBridgeFrameOwner, not a FrameOwnerElement.
|
| + marginWidth = document().frame()->owner()->marginWidth();
|
| + marginHeight = document().frame()->owner()->marginHeight();
|
| + }
|
| +
|
| if (marginWidth != -1)
|
| setIntegralAttribute(marginwidthAttr, marginWidth);
|
| if (marginHeight != -1)
|
|
|