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

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

Issue 112953007: Make TreeScope::documentScope() return a reference and ensure m_documentScope is never NULL (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Added FIXMEs Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/dom/NodeRareData.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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, 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 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 449
450 unsigned nodeIndex() const; 450 unsigned nodeIndex() const;
451 451
452 // Returns the DOM ownerDocument attribute. This method never returns NULL, except in the case 452 // Returns the DOM ownerDocument attribute. This method never returns NULL, except in the case
453 // of a Document node. 453 // of a Document node.
454 Document* ownerDocument() const; 454 Document* ownerDocument() const;
455 455
456 // Returns the document associated with this node. A Document node returns i tself. 456 // Returns the document associated with this node. A Document node returns i tself.
457 Document& document() const 457 Document& document() const
458 { 458 {
459 ASSERT(treeScope().documentScope()); 459 return treeScope().documentScope();
460 return *treeScope().documentScope();
461 } 460 }
462 461
463 TreeScope& treeScope() const 462 TreeScope& treeScope() const
464 { 463 {
465 ASSERT(m_treeScope); 464 ASSERT(m_treeScope);
466 return *m_treeScope; 465 return *m_treeScope;
467 } 466 }
468 467
469 bool inActiveDocument() const; 468 bool inActiveDocument() const;
470 469
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
919 918
920 } // namespace WebCore 919 } // namespace WebCore
921 920
922 #ifndef NDEBUG 921 #ifndef NDEBUG
923 // Outside the WebCore namespace for ease of invocation from gdb. 922 // Outside the WebCore namespace for ease of invocation from gdb.
924 void showTree(const WebCore::Node*); 923 void showTree(const WebCore::Node*);
925 void showNodePath(const WebCore::Node*); 924 void showNodePath(const WebCore::Node*);
926 #endif 925 #endif
927 926
928 #endif 927 #endif
OLDNEW
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/dom/NodeRareData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698