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

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

Issue 2378643002: Propagating csp attribute changes on frameOwnerPropertiesChanged() (Closed)
Patch Set: Separating CSP test, addressing co commnets Created 4 years, 2 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 1508 matching lines...) Expand 10 before | Expand all | Expand 10 after
1519 } 1519 }
1520 1520
1521 LocalFrame* WebLocalFrameImpl::createChildFrame(const FrameLoadRequest& request, 1521 LocalFrame* WebLocalFrameImpl::createChildFrame(const FrameLoadRequest& request,
1522 const AtomicString& name, HTMLFrameOwnerElement* ownerElement) 1522 const AtomicString& name, HTMLFrameOwnerElement* ownerElement)
1523 { 1523 {
1524 DCHECK(m_client); 1524 DCHECK(m_client);
1525 TRACE_EVENT0("blink", "WebLocalFrameImpl::createChildframe"); 1525 TRACE_EVENT0("blink", "WebLocalFrameImpl::createChildframe");
1526 WebTreeScopeType scope = frame()->document() == ownerElement->treeScope() 1526 WebTreeScopeType scope = frame()->document() == ownerElement->treeScope()
1527 ? WebTreeScopeType::Document 1527 ? WebTreeScopeType::Document
1528 : WebTreeScopeType::Shadow; 1528 : WebTreeScopeType::Shadow;
1529 WebFrameOwnerProperties ownerProperties(ownerElement->scrollingMode(), owner Element->marginWidth(), ownerElement->marginHeight(), ownerElement->allowFullscr een(), ownerElement->delegatedPermissions()); 1529 WebFrameOwnerProperties ownerProperties(ownerElement->scrollingMode(), owner Element->marginWidth(), ownerElement->marginHeight(), ownerElement->allowFullscr een(), ownerElement->csp(), ownerElement->delegatedPermissions());
1530 // FIXME: Using subResourceAttributeName as fallback is not a perfect 1530 // FIXME: Using subResourceAttributeName as fallback is not a perfect
1531 // solution. subResourceAttributeName returns just one attribute name. The 1531 // solution. subResourceAttributeName returns just one attribute name. The
1532 // element might not have the attribute, and there might be other attributes 1532 // element might not have the attribute, and there might be other attributes
1533 // which can identify the element. 1533 // which can identify the element.
1534 AtomicString uniqueName = frame()->tree().calculateUniqueNameForNewChildFram e( 1534 AtomicString uniqueName = frame()->tree().calculateUniqueNameForNewChildFram e(
1535 name, ownerElement->getAttribute(ownerElement->subResourceAttributeName( ))); 1535 name, ownerElement->getAttribute(ownerElement->subResourceAttributeName( )));
1536 WebLocalFrameImpl* webframeChild = toWebLocalFrameImpl(m_client->createChild Frame(this, scope, name, uniqueName, static_cast<WebSandboxFlags>(ownerElement-> getSandboxFlags()), ownerProperties)); 1536 WebLocalFrameImpl* webframeChild = toWebLocalFrameImpl(m_client->createChild Frame(this, scope, name, uniqueName, static_cast<WebSandboxFlags>(ownerElement-> getSandboxFlags()), ownerProperties));
1537 if (!webframeChild) 1537 if (!webframeChild)
1538 return nullptr; 1538 return nullptr;
1539 1539
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after
2240 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol; 2240 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol;
2241 } else if (metric == "wasAlternateProtocolAvailable") { 2241 } else if (metric == "wasAlternateProtocolAvailable") {
2242 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable; 2242 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable;
2243 } else if (metric == "connectionInfo") { 2243 } else if (metric == "connectionInfo") {
2244 feature = UseCounter::ChromeLoadTimesConnectionInfo; 2244 feature = UseCounter::ChromeLoadTimesConnectionInfo;
2245 } 2245 }
2246 UseCounter::count(frame(), feature); 2246 UseCounter::count(frame(), feature);
2247 } 2247 }
2248 2248
2249 } // namespace blink 2249 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698