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

Side by Side Diff: third_party/WebKit/Source/core/frame/LocalFrame.cpp

Issue 2389023002: Deferred frame loading stats v2 (Closed)
Patch Set: address comments round 2 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) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Simon Hausmann <hausmann@kde.org> 5 * 2000 Simon Hausmann <hausmann@kde.org>
6 * 2000 Stefan Schimanski <1Stein@gmx.de> 6 * 2000 Stefan Schimanski <1Stein@gmx.de>
7 * 2001 George Staikos <staikos@kde.org> 7 * 2001 George Staikos <staikos@kde.org>
8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
9 * rights reserved. 9 * rights reserved.
10 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> 10 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com>
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 LocalFrame* LocalFrame::localFrameRoot() { 531 LocalFrame* LocalFrame::localFrameRoot() {
532 LocalFrame* curFrame = this; 532 LocalFrame* curFrame = this;
533 while (curFrame && curFrame->tree().parent() && 533 while (curFrame && curFrame->tree().parent() &&
534 curFrame->tree().parent()->isLocalFrame()) 534 curFrame->tree().parent()->isLocalFrame())
535 curFrame = toLocalFrame(curFrame->tree().parent()); 535 curFrame = toLocalFrame(curFrame->tree().parent());
536 536
537 return curFrame; 537 return curFrame;
538 } 538 }
539 539
540 bool LocalFrame::isCrossOriginSubframe() const { 540 bool LocalFrame::isCrossOriginSubframe() const {
541 if (isMainFrame())
542 return false;
543 DCHECK(securityContext());
dcheng 2016/10/14 23:40:30 Let's revert these 3 lines.
dgrogan 2016/10/18 22:11:45 Done.
541 const SecurityOrigin* securityOrigin = securityContext()->getSecurityOrigin(); 544 const SecurityOrigin* securityOrigin = securityContext()->getSecurityOrigin();
542 Frame* top = tree().top(); 545 Frame* top = tree().top();
543 return top && 546 return top &&
544 !securityOrigin->canAccess( 547 !securityOrigin->canAccess(
545 top->securityContext()->getSecurityOrigin()); 548 top->securityContext()->getSecurityOrigin());
546 } 549 }
547 550
548 void LocalFrame::setPrinting(bool printing, 551 void LocalFrame::setPrinting(bool printing,
549 const FloatSize& pageSize, 552 const FloatSize& pageSize,
550 const FloatSize& originalPageSize, 553 const FloatSize& originalPageSize,
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
900 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) 903 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext())
901 m_frame->client()->frameBlameContext()->Enter(); 904 m_frame->client()->frameBlameContext()->Enter();
902 } 905 }
903 906
904 ScopedFrameBlamer::~ScopedFrameBlamer() { 907 ScopedFrameBlamer::~ScopedFrameBlamer() {
905 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) 908 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext())
906 m_frame->client()->frameBlameContext()->Leave(); 909 m_frame->client()->frameBlameContext()->Leave();
907 } 910 }
908 911
909 } // namespace blink 912 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698