Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(218)

Side by Side Diff: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp

Issue 1816983002: Add a setting to allow window object reuse across a top-level initial navigation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1538 matching lines...) Expand 10 before | Expand all | Expand 10 after
1549 } 1549 }
1550 1550
1551 void WebLocalFrameImpl::initializeCoreFrame(FrameHost* host, FrameOwner* owner, const AtomicString& name, const AtomicString& uniqueName) 1551 void WebLocalFrameImpl::initializeCoreFrame(FrameHost* host, FrameOwner* owner, const AtomicString& name, const AtomicString& uniqueName)
1552 { 1552 {
1553 setCoreFrame(LocalFrame::create(m_frameLoaderClientImpl.get(), host, owner)) ; 1553 setCoreFrame(LocalFrame::create(m_frameLoaderClientImpl.get(), host, owner)) ;
1554 frame()->tree().setPrecalculatedName(name, uniqueName); 1554 frame()->tree().setPrecalculatedName(name, uniqueName);
1555 // We must call init() after m_frame is assigned because it is referenced 1555 // We must call init() after m_frame is assigned because it is referenced
1556 // during init(). Note that this may dispatch JS events; the frame may be 1556 // during init(). Note that this may dispatch JS events; the frame may be
1557 // detached after init() returns. 1557 // detached after init() returns.
1558 frame()->init(); 1558 frame()->init();
1559 if (frame() && frame()->loader().stateMachine()->isDisplayingInitialEmptyDoc ument() && !parent() && !opener() && frame()->settings()->shouldReuseGlobalForUn ownedMainFrame())
1560 frame()->document()->getSecurityOrigin()->grantUniversalAccess();
1559 } 1561 }
1560 1562
1561 RawPtr<LocalFrame> WebLocalFrameImpl::createChildFrame(const FrameLoadRequest& r equest, 1563 RawPtr<LocalFrame> WebLocalFrameImpl::createChildFrame(const FrameLoadRequest& r equest,
1562 const AtomicString& name, HTMLFrameOwnerElement* ownerElement) 1564 const AtomicString& name, HTMLFrameOwnerElement* ownerElement)
1563 { 1565 {
1564 ASSERT(m_client); 1566 ASSERT(m_client);
1565 TRACE_EVENT0("blink", "WebLocalFrameImpl::createChildframe"); 1567 TRACE_EVENT0("blink", "WebLocalFrameImpl::createChildframe");
1566 WebTreeScopeType scope = frame()->document() == ownerElement->treeScope() 1568 WebTreeScopeType scope = frame()->document() == ownerElement->treeScope()
1567 ? WebTreeScopeType::Document 1569 ? WebTreeScopeType::Document
1568 : WebTreeScopeType::Shadow; 1570 : WebTreeScopeType::Shadow;
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after
2170 return WebSandboxFlags::None; 2172 return WebSandboxFlags::None;
2171 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags( )); 2173 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags( ));
2172 } 2174 }
2173 2175
2174 void WebLocalFrameImpl::forceSandboxFlags(WebSandboxFlags flags) 2176 void WebLocalFrameImpl::forceSandboxFlags(WebSandboxFlags flags)
2175 { 2177 {
2176 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags)); 2178 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags));
2177 } 2179 }
2178 2180
2179 } // namespace blink 2181 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/Settings.in ('k') | third_party/WebKit/Source/web/WebSettingsImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698