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

Side by Side Diff: third_party/WebKit/Source/core/dom/Node.cpp

Issue 2883033003: Propagate inert state to OOPIFs when a modal dialog is active (Closed)
Patch Set: Trying to fix patch application problem 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
6 * rights reserved. 6 * rights reserved.
7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved.
9 * (http://www.torchmobile.com/) 9 * (http://www.torchmobile.com/)
10 * 10 *
(...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after
844 DCHECK(IsFocused()); 844 DCHECK(IsFocused());
845 return true; 845 return true;
846 } 846 }
847 847
848 bool Node::IsInert() const { 848 bool Node::IsInert() const {
849 const HTMLDialogElement* dialog = GetDocument().ActiveModalDialog(); 849 const HTMLDialogElement* dialog = GetDocument().ActiveModalDialog();
850 if (dialog && this != GetDocument() && 850 if (dialog && this != GetDocument() &&
851 (!CanParticipateInFlatTree() || 851 (!CanParticipateInFlatTree() ||
852 !FlatTreeTraversal::ContainsIncludingPseudoElement(*dialog, *this))) 852 !FlatTreeTraversal::ContainsIncludingPseudoElement(*dialog, *this)))
853 return true; 853 return true;
854 return GetDocument().LocalOwner() && GetDocument().LocalOwner()->IsInert(); 854 return GetDocument().GetFrame() && GetDocument().GetFrame()->IsInert();
dmazzoni 2017/05/18 15:47:05 I don't think this changes the logic, but I'm just
kenrb 2017/05/19 17:46:28 It should be fine to remove that condition, on the
855 } 855 }
856 856
857 unsigned Node::NodeIndex() const { 857 unsigned Node::NodeIndex() const {
858 const Node* temp_node = previousSibling(); 858 const Node* temp_node = previousSibling();
859 unsigned count = 0; 859 unsigned count = 0;
860 for (count = 0; temp_node; count++) 860 for (count = 0; temp_node; count++)
861 temp_node = temp_node->previousSibling(); 861 temp_node = temp_node->previousSibling();
862 return count; 862 return count;
863 } 863 }
864 864
(...skipping 1757 matching lines...) Expand 10 before | Expand all | Expand 10 after
2622 if (node) { 2622 if (node) {
2623 std::stringstream stream; 2623 std::stringstream stream;
2624 node->PrintNodePathTo(stream); 2624 node->PrintNodePathTo(stream);
2625 LOG(INFO) << stream.str(); 2625 LOG(INFO) << stream.str();
2626 } else { 2626 } else {
2627 LOG(INFO) << "Cannot showNodePath for <null>"; 2627 LOG(INFO) << "Cannot showNodePath for <null>";
2628 } 2628 }
2629 } 2629 }
2630 2630
2631 #endif 2631 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698