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

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

Issue 2011763006: Add an iframe permissions= attribute for implementing permission delegation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@permission-delegation-1-flag
Patch Set: Blink-side Created 4 years, 6 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 1490 matching lines...) Expand 10 before | Expand all | Expand 10 after
1501 } 1501 }
1502 1502
1503 LocalFrame* WebLocalFrameImpl::createChildFrame(const FrameLoadRequest& request, 1503 LocalFrame* WebLocalFrameImpl::createChildFrame(const FrameLoadRequest& request,
1504 const AtomicString& name, HTMLFrameOwnerElement* ownerElement) 1504 const AtomicString& name, HTMLFrameOwnerElement* ownerElement)
1505 { 1505 {
1506 DCHECK(m_client); 1506 DCHECK(m_client);
1507 TRACE_EVENT0("blink", "WebLocalFrameImpl::createChildframe"); 1507 TRACE_EVENT0("blink", "WebLocalFrameImpl::createChildframe");
1508 WebTreeScopeType scope = frame()->document() == ownerElement->treeScope() 1508 WebTreeScopeType scope = frame()->document() == ownerElement->treeScope()
1509 ? WebTreeScopeType::Document 1509 ? WebTreeScopeType::Document
1510 : WebTreeScopeType::Shadow; 1510 : WebTreeScopeType::Shadow;
1511 WebFrameOwnerProperties ownerProperties(ownerElement->scrollingMode(), owner Element->marginWidth(), ownerElement->marginHeight(), ownerElement->allowFullscr een()); 1511 WebFrameOwnerProperties ownerProperties(ownerElement->scrollingMode(), owner Element->marginWidth(), ownerElement->marginHeight(), ownerElement->allowFullscr een(), *ownerElement->delegatedPermissions());
tkent 2016/06/23 04:57:28 Can ownerElement->delegatePermission() be nullptr?
raymes 2016/06/27 08:09:50 Same here.
1512 // FIXME: Using subResourceAttributeName as fallback is not a perfect 1512 // FIXME: Using subResourceAttributeName as fallback is not a perfect
1513 // solution. subResourceAttributeName returns just one attribute name. The 1513 // solution. subResourceAttributeName returns just one attribute name. The
1514 // element might not have the attribute, and there might be other attributes 1514 // element might not have the attribute, and there might be other attributes
1515 // which can identify the element. 1515 // which can identify the element.
1516 AtomicString uniqueName = frame()->tree().calculateUniqueNameForNewChildFram e( 1516 AtomicString uniqueName = frame()->tree().calculateUniqueNameForNewChildFram e(
1517 name, ownerElement->getAttribute(ownerElement->subResourceAttributeName( ))); 1517 name, ownerElement->getAttribute(ownerElement->subResourceAttributeName( )));
1518 WebLocalFrameImpl* webframeChild = toWebLocalFrameImpl(m_client->createChild Frame(this, scope, name, uniqueName, static_cast<WebSandboxFlags>(ownerElement-> getSandboxFlags()), ownerProperties)); 1518 WebLocalFrameImpl* webframeChild = toWebLocalFrameImpl(m_client->createChild Frame(this, scope, name, uniqueName, static_cast<WebSandboxFlags>(ownerElement-> getSandboxFlags()), ownerProperties));
1519 if (!webframeChild) 1519 if (!webframeChild)
1520 return nullptr; 1520 return nullptr;
1521 1521
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after
2114 { 2114 {
2115 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags)); 2115 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags));
2116 } 2116 }
2117 2117
2118 void WebLocalFrameImpl::clearActiveFindMatch() 2118 void WebLocalFrameImpl::clearActiveFindMatch()
2119 { 2119 {
2120 ensureTextFinder().clearActiveFindMatch(); 2120 ensureTextFinder().clearActiveFindMatch();
2121 } 2121 }
2122 2122
2123 } // namespace blink 2123 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698