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

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

Issue 1942623002: Rename Document::ownerElement to localOwner and fix main frame checks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed const changes and some gratuitous checks Created 4 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 r ights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 { 770 {
771 DCHECK(focused()); 771 DCHECK(focused());
772 return true; 772 return true;
773 } 773 }
774 774
775 bool Node::isInert() const 775 bool Node::isInert() const
776 { 776 {
777 const HTMLDialogElement* dialog = document().activeModalDialog(); 777 const HTMLDialogElement* dialog = document().activeModalDialog();
778 if (dialog && this != document() && (!canParticipateInFlatTree() || !FlatTre eTraversal::containsIncludingPseudoElement(*dialog, *this))) 778 if (dialog && this != document() && (!canParticipateInFlatTree() || !FlatTre eTraversal::containsIncludingPseudoElement(*dialog, *this)))
779 return true; 779 return true;
780 return document().ownerElement() && document().ownerElement()->isInert(); 780 return document().localOwner() && document().localOwner()->isInert();
781 } 781 }
782 782
783 unsigned Node::nodeIndex() const 783 unsigned Node::nodeIndex() const
784 { 784 {
785 const Node* tempNode = previousSibling(); 785 const Node* tempNode = previousSibling();
786 unsigned count = 0; 786 unsigned count = 0;
787 for (count = 0; tempNode; count++) 787 for (count = 0; tempNode; count++)
788 tempNode = tempNode->previousSibling(); 788 tempNode = tempNode->previousSibling();
789 return count; 789 return count;
790 } 790 }
(...skipping 1623 matching lines...) Expand 10 before | Expand all | Expand 10 after
2414 2414
2415 void showNodePath(const blink::Node* node) 2415 void showNodePath(const blink::Node* node)
2416 { 2416 {
2417 if (node) 2417 if (node)
2418 node->showNodePathForThis(); 2418 node->showNodePathForThis();
2419 else 2419 else
2420 fprintf(stderr, "Cannot showNodePath for (nil)\n"); 2420 fprintf(stderr, "Cannot showNodePath for (nil)\n");
2421 } 2421 }
2422 2422
2423 #endif 2423 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Fullscreen.cpp ('k') | third_party/WebKit/Source/core/frame/EventHandlerRegistry.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698