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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp

Issue 2737243003: Remove FrameHost::subFrameCount() (Closed)
Patch Set: Rebase Created 3 years, 9 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) 2006, 2007, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 } 300 }
301 301
302 if (!document().getSecurityOrigin()->canDisplay(url)) { 302 if (!document().getSecurityOrigin()->canDisplay(url)) {
303 FrameLoader::reportLocalLoadFailed(parentFrame, url.getString()); 303 FrameLoader::reportLocalLoadFailed(parentFrame, url.getString());
304 return false; 304 return false;
305 } 305 }
306 306
307 if (!SubframeLoadingDisabler::canLoadFrame(*this)) 307 if (!SubframeLoadingDisabler::canLoadFrame(*this))
308 return false; 308 return false;
309 309
310 if (document().frame()->host()->subframeCount() >= Page::maxNumberOfFrames) 310 if (document().frame()->page()->subframeCount() >= Page::maxNumberOfFrames)
311 return false; 311 return false;
312 312
313 FrameLoadRequest frameLoadRequest(&document(), url, "_self", 313 FrameLoadRequest frameLoadRequest(&document(), url, "_self",
314 CheckContentSecurityPolicy); 314 CheckContentSecurityPolicy);
315 315
316 ReferrerPolicy policy = referrerPolicyAttribute(); 316 ReferrerPolicy policy = referrerPolicyAttribute();
317 if (policy != ReferrerPolicyDefault) 317 if (policy != ReferrerPolicyDefault)
318 frameLoadRequest.resourceRequest().setHTTPReferrer( 318 frameLoadRequest.resourceRequest().setHTTPReferrer(
319 SecurityPolicy::generateReferrer(policy, url, 319 SecurityPolicy::generateReferrer(policy, url,
320 document().outgoingReferrer())); 320 document().outgoingReferrer()));
321 321
322 return parentFrame->loader().client()->createFrame(frameLoadRequest, 322 return parentFrame->loader().client()->createFrame(frameLoadRequest,
323 frameName, this); 323 frameName, this);
324 } 324 }
325 325
326 DEFINE_TRACE(HTMLFrameOwnerElement) { 326 DEFINE_TRACE(HTMLFrameOwnerElement) {
327 visitor->trace(m_contentFrame); 327 visitor->trace(m_contentFrame);
328 visitor->trace(m_widget); 328 visitor->trace(m_widget);
329 HTMLElement::trace(visitor); 329 HTMLElement::trace(visitor);
330 FrameOwner::trace(visitor); 330 FrameOwner::trace(visitor);
331 } 331 }
332 332
333 } // namespace blink 333 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameHost.cpp ('k') | third_party/WebKit/Source/web/WebFrame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698