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

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

Issue 1885453002: Rename Node::treeScope() to Node::treeScopeOrDocument() Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 8 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-2011, 2014 Apple Inc. All rights reserved. 5 * Copyright (C) 2004-2011, 2014 Apple Inc. All rights reserved.
6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 463
464 unsigned nodeIndex() const; 464 unsigned nodeIndex() const;
465 465
466 // Returns the DOM ownerDocument attribute. This method never returns null, except in the case 466 // Returns the DOM ownerDocument attribute. This method never returns null, except in the case
467 // of a Document node. 467 // of a Document node.
468 Document* ownerDocument() const; 468 Document* ownerDocument() const;
469 469
470 // Returns the document associated with this node. A Document node returns i tself. 470 // Returns the document associated with this node. A Document node returns i tself.
471 Document& document() const 471 Document& document() const
472 { 472 {
473 return treeScope().document(); 473 return treeScopeOrDocument().document();
474 } 474 }
475 475
476 TreeScope& treeScope() const 476 TreeScope& treeScopeOrDocument() const
477 { 477 {
478 DCHECK(m_treeScope); 478 DCHECK(m_treeScope);
479 return *m_treeScope; 479 return *m_treeScope;
480 } 480 }
481 481
482 bool inActiveDocument() const; 482 bool inActiveDocument() const;
483 483
484 // Returns true if this node is associated with a shadow-including document and is in its associated document's 484 // Returns true if this node is associated with a shadow-including document and is in its associated document's
485 // node tree, false otherwise. 485 // node tree, false otherwise.
486 bool inShadowIncludingDocument() const 486 bool inShadowIncludingDocument() const
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
930 } // namespace blink 930 } // namespace blink
931 931
932 #ifndef NDEBUG 932 #ifndef NDEBUG
933 // Outside the WebCore namespace for ease of invocation from gdb. 933 // Outside the WebCore namespace for ease of invocation from gdb.
934 void showNode(const blink::Node*); 934 void showNode(const blink::Node*);
935 void showTree(const blink::Node*); 935 void showTree(const blink::Node*);
936 void showNodePath(const blink::Node*); 936 void showNodePath(const blink::Node*);
937 #endif 937 #endif
938 938
939 #endif // Node_h 939 #endif // Node_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/LiveNodeListBase.cpp ('k') | third_party/WebKit/Source/core/dom/Node.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698