Chromium Code Reviews| Index: Source/web/WebLocalFrameImpl.cpp |
| diff --git a/Source/web/WebLocalFrameImpl.cpp b/Source/web/WebLocalFrameImpl.cpp |
| index 4b316952f8c3cfc64754fdbec9b4b7ef04991323..fa53858c09cec68819b6b397d1bd8228ed75c0f4 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,15 @@ 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(); |
|
alexmos
2015/09/02 21:37:06
Is the cast necessary here? marginWidth() and mar
lazyboy
2015/09/15 01:40:33
Removed cast.
Also see my earlier question about w
alexmos
2015/09/16 00:36:47
I think you're right, we shouldn't get here for pl
alexmos
2015/09/21 16:58:07
Latest PS still has isHTMLFrameElementBase check -
lazyboy
2015/09/21 18:04:51
Removed.
|
| + marginHeight = toHTMLFrameElementBase(ownerElement)->marginHeight(); |
| + } |
| + |
| + WebFrameOwnerProperties ownerProperties(static_cast<WebFrameOwnerProperties::ScrollingMode>(ownerElement->scrollingMode()), marginWidth, marginHeight); |
| + WebLocalFrameImpl* webframeChild = toWebLocalFrameImpl(m_client->createChildFrame(this, scope, name, static_cast<WebSandboxFlags>(ownerElement->sandboxFlags()), ownerProperties)); |
| if (!webframeChild) |
| return nullptr; |