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

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

Issue 2668753006: Special-case LocalDOMWindow for same-origin access in bindings. (Closed)
Patch Set: Just special case DOMWindow Created 3 years, 10 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 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 void LocalFrame::setDOMWindow(LocalDOMWindow* domWindow) { 524 void LocalFrame::setDOMWindow(LocalDOMWindow* domWindow) {
525 if (domWindow) 525 if (domWindow)
526 script().clearWindowProxy(); 526 script().clearWindowProxy();
527 527
528 if (this->domWindow()) 528 if (this->domWindow())
529 this->domWindow()->reset(); 529 this->domWindow()->reset();
530 m_domWindow = domWindow; 530 m_domWindow = domWindow;
531 } 531 }
532 532
533 Document* LocalFrame::document() const { 533 Document* LocalFrame::document() const {
534 return m_domWindow ? m_domWindow->document() : nullptr; 534 return domWindow() ? domWindow()->document() : nullptr;
535 } 535 }
536 536
537 void LocalFrame::setPagePopupOwner(Element& owner) { 537 void LocalFrame::setPagePopupOwner(Element& owner) {
538 m_pagePopupOwner = &owner; 538 m_pagePopupOwner = &owner;
539 } 539 }
540 540
541 LayoutView* LocalFrame::contentLayoutObject() const { 541 LayoutView* LocalFrame::contentLayoutObject() const {
542 return document() ? document()->layoutView() : nullptr; 542 return document() ? document()->layoutView() : nullptr;
543 } 543 }
544 544
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
938 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) 938 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext())
939 m_frame->client()->frameBlameContext()->Enter(); 939 m_frame->client()->frameBlameContext()->Enter();
940 } 940 }
941 941
942 ScopedFrameBlamer::~ScopedFrameBlamer() { 942 ScopedFrameBlamer::~ScopedFrameBlamer() {
943 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) 943 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext())
944 m_frame->client()->frameBlameContext()->Leave(); 944 m_frame->client()->frameBlameContext()->Leave();
945 } 945 }
946 946
947 } // namespace blink 947 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698