| Index: Source/web/WebLocalFrameImpl.cpp
|
| diff --git a/Source/web/WebLocalFrameImpl.cpp b/Source/web/WebLocalFrameImpl.cpp
|
| index 4b316952f8c3cfc64754fdbec9b4b7ef04991323..103824ef92747621b5cab518dd2e280a835e3503 100644
|
| --- a/Source/web/WebLocalFrameImpl.cpp
|
| +++ b/Source/web/WebLocalFrameImpl.cpp
|
| @@ -200,6 +200,7 @@
|
| #include "public/web/WebFindOptions.h"
|
| #include "public/web/WebFormElement.h"
|
| #include "public/web/WebFrameClient.h"
|
| +#include "public/web/WebFrameOwnerProperties.h"
|
| #include "public/web/WebHistoryItem.h"
|
| #include "public/web/WebIconURL.h"
|
| #include "public/web/WebInputElement.h"
|
| @@ -1754,7 +1755,28 @@ PassRefPtrWillBeRawPtr<LocalFrame> WebLocalFrameImpl::createChildFrame(const Fra
|
| WebTreeScopeType scope = frame()->document() == ownerElement->treeScope()
|
| ? WebTreeScopeType::Document
|
| : WebTreeScopeType::Shadow;
|
| - WebLocalFrameImpl* webframeChild = toWebLocalFrameImpl(m_client->createChildFrame(this, scope, name, static_cast<WebSandboxFlags>(ownerElement->sandboxFlags())));
|
| + int marginWidth = -1;
|
| + int marginHeight = -1;
|
| + if (isHTMLFrameElementBase(ownerElement)) {
|
| + marginWidth = toHTMLFrameElementBase(ownerElement)->marginWidth();
|
| + marginHeight = toHTMLFrameElementBase(ownerElement)->marginHeight();
|
| + }
|
| +
|
| + WebFrameOwnerProperties::ScrollingMode scrollingMode = WebFrameOwnerProperties::ScrollingModeAuto;
|
| + switch (ownerElement->scrollingMode()) {
|
| + case ScrollbarAuto:
|
| + scrollingMode = WebFrameOwnerProperties::ScrollingModeAuto;
|
| + break;
|
| + case ScrollbarAlwaysOff:
|
| + scrollingMode = WebFrameOwnerProperties::ScrollingModeAlwaysOff;
|
| + break;
|
| + case ScrollbarAlwaysOn:
|
| + scrollingMode = WebFrameOwnerProperties::ScrollingModeAlwaysOn;
|
| + break;
|
| + }
|
| +
|
| + WebFrameOwnerProperties ownerProperties(scrollingMode, marginWidth, marginHeight);
|
| + WebLocalFrameImpl* webframeChild = toWebLocalFrameImpl(m_client->createChildFrame(this, scope, name, static_cast<WebSandboxFlags>(ownerElement->sandboxFlags()), ownerProperties));
|
| if (!webframeChild)
|
| return nullptr;
|
|
|
|
|