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

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

Issue 2883033003: Propagate inert state to OOPIFs when a modal dialog is active (Closed)
Patch Set: Rebase only Created 3 years, 7 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 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 return LayoutViewItem(ContentLayoutObject()); 564 return LayoutViewItem(ContentLayoutObject());
565 } 565 }
566 566
567 void LocalFrame::DidChangeVisibilityState() { 567 void LocalFrame::DidChangeVisibilityState() {
568 if (GetDocument()) 568 if (GetDocument())
569 GetDocument()->DidChangeVisibilityState(); 569 GetDocument()->DidChangeVisibilityState();
570 570
571 Frame::DidChangeVisibilityState(); 571 Frame::DidChangeVisibilityState();
572 } 572 }
573 573
574 void LocalFrame::SetIsInert(bool inert) {
dmazzoni 2017/05/19 18:58:19 Do you think it would be more clear to separate th
kenrb 2017/05/31 18:32:00 Done.
575 is_inert_ = inert;
576 for (Frame* child = Tree().FirstChild(); child;
577 child = child->Tree().NextSibling()) {
578 if (child->Owner()) {
579 DCHECK(child->Owner()->IsLocal());
580 child->SetIsInert(inert ||
581 ToHTMLFrameOwnerElement(child->Owner())->IsInert());
582 }
583 }
584 }
585
574 LocalFrame& LocalFrame::LocalFrameRoot() const { 586 LocalFrame& LocalFrame::LocalFrameRoot() const {
575 const LocalFrame* cur_frame = this; 587 const LocalFrame* cur_frame = this;
576 while (cur_frame && cur_frame->Tree().Parent() && 588 while (cur_frame && cur_frame->Tree().Parent() &&
577 cur_frame->Tree().Parent()->IsLocalFrame()) 589 cur_frame->Tree().Parent()->IsLocalFrame())
578 cur_frame = ToLocalFrame(cur_frame->Tree().Parent()); 590 cur_frame = ToLocalFrame(cur_frame->Tree().Parent());
579 591
580 return const_cast<LocalFrame&>(*cur_frame); 592 return const_cast<LocalFrame&>(*cur_frame);
581 } 593 }
582 594
583 bool LocalFrame::IsCrossOriginSubframe() const { 595 bool LocalFrame::IsCrossOriginSubframe() const {
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
892 editor_(Editor::Create(*this)), 904 editor_(Editor::Create(*this)),
893 spell_checker_(SpellChecker::Create(*this)), 905 spell_checker_(SpellChecker::Create(*this)),
894 selection_(FrameSelection::Create(*this)), 906 selection_(FrameSelection::Create(*this)),
895 event_handler_(new EventHandler(*this)), 907 event_handler_(new EventHandler(*this)),
896 console_(FrameConsole::Create(*this)), 908 console_(FrameConsole::Create(*this)),
897 input_method_controller_(InputMethodController::Create(*this)), 909 input_method_controller_(InputMethodController::Create(*this)),
898 navigation_disable_count_(0), 910 navigation_disable_count_(0),
899 page_zoom_factor_(ParentPageZoomFactor(this)), 911 page_zoom_factor_(ParentPageZoomFactor(this)),
900 text_zoom_factor_(ParentTextZoomFactor(this)), 912 text_zoom_factor_(ParentTextZoomFactor(this)),
901 in_view_source_mode_(false), 913 in_view_source_mode_(false),
914 is_inert_(false),
902 interface_provider_(interface_provider), 915 interface_provider_(interface_provider),
903 interface_registry_(interface_registry) { 916 interface_registry_(interface_registry) {
904 if (IsLocalRoot()) { 917 if (IsLocalRoot()) {
905 probe_sink_ = new CoreProbeSink(); 918 probe_sink_ = new CoreProbeSink();
906 performance_monitor_ = new PerformanceMonitor(this); 919 performance_monitor_ = new PerformanceMonitor(this);
907 } else { 920 } else {
908 probe_sink_ = LocalFrameRoot().probe_sink_; 921 probe_sink_ = LocalFrameRoot().probe_sink_;
909 performance_monitor_ = LocalFrameRoot().performance_monitor_; 922 performance_monitor_ = LocalFrameRoot().performance_monitor_;
910 } 923 }
911 } 924 }
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
969 WebURLRequest::kClientLoFiOn); 982 WebURLRequest::kClientLoFiOn);
970 params.SetAllowImagePlaceholder(); 983 params.SetAllowImagePlaceholder();
971 } 984 }
972 } 985 }
973 986
974 std::unique_ptr<WebURLLoader> LocalFrame::CreateURLLoader() { 987 std::unique_ptr<WebURLLoader> LocalFrame::CreateURLLoader() {
975 return Client()->CreateURLLoader(); 988 return Client()->CreateURLLoader();
976 } 989 }
977 990
978 } // namespace blink 991 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698