| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 1423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1434 WebLocalFrameImpl* WebLocalFrameImpl::createProvisional(WebFrameClient* client,
WebRemoteFrame* oldWebFrame, WebSandboxFlags flags, const WebFrameOwnerPropertie
s& frameOwnerProperties) | 1434 WebLocalFrameImpl* WebLocalFrameImpl::createProvisional(WebFrameClient* client,
WebRemoteFrame* oldWebFrame, WebSandboxFlags flags, const WebFrameOwnerPropertie
s& frameOwnerProperties) |
| 1435 { | 1435 { |
| 1436 RefPtrWillBeRawPtr<WebLocalFrameImpl> webFrame = adoptRefWillBeNoop(new WebL
ocalFrameImpl(oldWebFrame, client)); | 1436 RefPtrWillBeRawPtr<WebLocalFrameImpl> webFrame = adoptRefWillBeNoop(new WebL
ocalFrameImpl(oldWebFrame, client)); |
| 1437 Frame* oldFrame = oldWebFrame->toImplBase()->frame(); | 1437 Frame* oldFrame = oldWebFrame->toImplBase()->frame(); |
| 1438 webFrame->setParent(oldWebFrame->parent()); | 1438 webFrame->setParent(oldWebFrame->parent()); |
| 1439 webFrame->setOpener(oldWebFrame->opener()); | 1439 webFrame->setOpener(oldWebFrame->opener()); |
| 1440 // Note: this *always* temporarily sets a frame owner, even for main frames! | 1440 // Note: this *always* temporarily sets a frame owner, even for main frames! |
| 1441 // When a core Frame is created with no owner, it attempts to set itself as | 1441 // When a core Frame is created with no owner, it attempts to set itself as |
| 1442 // the main frame of the Page. However, this is a provisional frame, and may | 1442 // the main frame of the Page. However, this is a provisional frame, and may |
| 1443 // disappear, so Page::m_mainFrame can't be updated just yet. | 1443 // disappear, so Page::m_mainFrame can't be updated just yet. |
| 1444 OwnPtrWillBeRawPtr<FrameOwner> tempOwner = RemoteBridgeFrameOwner::create(nu
llptr, SandboxNone, WebFrameOwnerProperties()); | 1444 OwnPtrWillBeRawPtr<FrameOwner> tempOwner = StubFrameOwner::create(); |
| 1445 // TODO(dcheng): This block is very similar to initializeCoreFrame. Try to r
euse it here. | 1445 // TODO(dcheng): This block is very similar to initializeCoreFrame. Try to r
euse it here. |
| 1446 RefPtrWillBeRawPtr<LocalFrame> frame = LocalFrame::create(webFrame->m_frameL
oaderClientImpl.get(), oldFrame->host(), tempOwner.get()); | 1446 RefPtrWillBeRawPtr<LocalFrame> frame = LocalFrame::create(webFrame->m_frameL
oaderClientImpl.get(), oldFrame->host(), tempOwner.get()); |
| 1447 // Set the name and unique name directly, bypassing any of the normal logic | 1447 // Set the name and unique name directly, bypassing any of the normal logic |
| 1448 // to calculate unique name. | 1448 // to calculate unique name. |
| 1449 frame->tree().setPrecalculatedName(toWebRemoteFrameImpl(oldWebFrame)->frame(
)->tree().name(), toWebRemoteFrameImpl(oldWebFrame)->frame()->tree().uniqueName(
)); | 1449 frame->tree().setPrecalculatedName(toWebRemoteFrameImpl(oldWebFrame)->frame(
)->tree().name(), toWebRemoteFrameImpl(oldWebFrame)->frame()->tree().uniqueName(
)); |
| 1450 webFrame->setCoreFrame(frame); | 1450 webFrame->setCoreFrame(frame); |
| 1451 | 1451 |
| 1452 frame->setOwner(oldFrame->owner()); | 1452 frame->setOwner(oldFrame->owner()); |
| 1453 | 1453 |
| 1454 if (frame->owner() && !frame->owner()->isLocal()) { | 1454 if (frame->owner() && !frame->owner()->isLocal()) { |
| (...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2188 return WebSandboxFlags::None; | 2188 return WebSandboxFlags::None; |
| 2189 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags(
)); | 2189 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags(
)); |
| 2190 } | 2190 } |
| 2191 | 2191 |
| 2192 void WebLocalFrameImpl::forceSandboxFlags(WebSandboxFlags flags) | 2192 void WebLocalFrameImpl::forceSandboxFlags(WebSandboxFlags flags) |
| 2193 { | 2193 { |
| 2194 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags)); | 2194 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags)); |
| 2195 } | 2195 } |
| 2196 | 2196 |
| 2197 } // namespace blink | 2197 } // namespace blink |
| OLD | NEW |