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

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: nit addressed Created 3 years, 6 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 852 matching lines...) Expand 10 before | Expand all | Expand 10 after
863 if (RuntimeEnabledFeatures::InertAttributeEnabled()) { 863 if (RuntimeEnabledFeatures::InertAttributeEnabled()) {
864 const Element* element = this->IsElementNode() 864 const Element* element = this->IsElementNode()
865 ? ToElement(this) 865 ? ToElement(this)
866 : FlatTreeTraversal::ParentElement(*this); 866 : FlatTreeTraversal::ParentElement(*this);
867 while (element) { 867 while (element) {
868 if (element->hasAttribute(HTMLNames::inertAttr)) 868 if (element->hasAttribute(HTMLNames::inertAttr))
869 return true; 869 return true;
870 element = FlatTreeTraversal::ParentElement(*element); 870 element = FlatTreeTraversal::ParentElement(*element);
871 } 871 }
872 } 872 }
873 return GetDocument().LocalOwner() && GetDocument().LocalOwner()->IsInert(); 873 return GetDocument().GetFrame() && GetDocument().GetFrame()->IsInert();
874 } 874 }
875 875
876 unsigned Node::NodeIndex() const { 876 unsigned Node::NodeIndex() const {
877 const Node* temp_node = previousSibling(); 877 const Node* temp_node = previousSibling();
878 unsigned count = 0; 878 unsigned count = 0;
879 for (count = 0; temp_node; count++) 879 for (count = 0; temp_node; count++)
880 temp_node = temp_node->previousSibling(); 880 temp_node = temp_node->previousSibling();
881 return count; 881 return count;
882 } 882 }
883 883
(...skipping 1779 matching lines...) Expand 10 before | Expand all | Expand 10 after
2663 if (node) { 2663 if (node) {
2664 std::stringstream stream; 2664 std::stringstream stream;
2665 node->PrintNodePathTo(stream); 2665 node->PrintNodePathTo(stream);
2666 LOG(INFO) << stream.str(); 2666 LOG(INFO) << stream.str();
2667 } else { 2667 } else {
2668 LOG(INFO) << "Cannot showNodePath for <null>"; 2668 LOG(INFO) << "Cannot showNodePath for <null>";
2669 } 2669 }
2670 } 2670 }
2671 2671
2672 #endif 2672 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698