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

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: Rebase and address comments. 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 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 void LocalFrame::setDOMWindow(LocalDOMWindow* domWindow) { 525 void LocalFrame::setDOMWindow(LocalDOMWindow* domWindow) {
526 if (domWindow) 526 if (domWindow)
527 script().clearWindowProxy(); 527 script().clearWindowProxy();
528 528
529 if (this->domWindow()) 529 if (this->domWindow())
530 this->domWindow()->reset(); 530 this->domWindow()->reset();
531 m_domWindow = domWindow; 531 m_domWindow = domWindow;
532 } 532 }
533 533
534 Document* LocalFrame::document() const { 534 Document* LocalFrame::document() const {
535 return m_domWindow ? m_domWindow->document() : nullptr; 535 return domWindow() ? domWindow()->document() : nullptr;
536 } 536 }
537 537
538 void LocalFrame::setPagePopupOwner(Element& owner) { 538 void LocalFrame::setPagePopupOwner(Element& owner) {
539 m_pagePopupOwner = &owner; 539 m_pagePopupOwner = &owner;
540 } 540 }
541 541
542 LayoutView* LocalFrame::contentLayoutObject() const { 542 LayoutView* LocalFrame::contentLayoutObject() const {
543 return document() ? document()->layoutView() : nullptr; 543 return document() ? document()->layoutView() : nullptr;
544 } 544 }
545 545
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
939 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) 939 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext())
940 m_frame->client()->frameBlameContext()->Enter(); 940 m_frame->client()->frameBlameContext()->Enter();
941 } 941 }
942 942
943 ScopedFrameBlamer::~ScopedFrameBlamer() { 943 ScopedFrameBlamer::~ScopedFrameBlamer() {
944 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) 944 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext())
945 m_frame->client()->frameBlameContext()->Leave(); 945 m_frame->client()->frameBlameContext()->Leave();
946 } 946 }
947 947
948 } // namespace blink 948 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp ('k') | third_party/WebKit/Source/core/frame/RemoteDOMWindow.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698