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

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

Issue 182053002: Have Node::highestAncestor() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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
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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 ShadowRoot* containingShadowRoot() const; 276 ShadowRoot* containingShadowRoot() const;
277 ShadowRoot* youngestShadowRoot() const; 277 ShadowRoot* youngestShadowRoot() const;
278 278
279 // Returns 0, a child of ShadowRoot, or a legacy shadow root. 279 // Returns 0, a child of ShadowRoot, or a legacy shadow root.
280 Node* nonBoundaryShadowTreeRootNode(); 280 Node* nonBoundaryShadowTreeRootNode();
281 281
282 // Node's parent, shadow tree host. 282 // Node's parent, shadow tree host.
283 ContainerNode* parentOrShadowHostNode() const; 283 ContainerNode* parentOrShadowHostNode() const;
284 Element* parentOrShadowHostElement() const; 284 Element* parentOrShadowHostElement() const;
285 void setParentOrShadowHostNode(ContainerNode*); 285 void setParentOrShadowHostNode(ContainerNode*);
286 Node* highestAncestor() const; 286 Node& highestAncestor() const;
287 287
288 // Knows about all kinds of hosts. 288 // Knows about all kinds of hosts.
289 ContainerNode* parentOrShadowHostOrTemplateHostNode() const; 289 ContainerNode* parentOrShadowHostOrTemplateHostNode() const;
290 290
291 // Returns the parent node, but 0 if the parent node is a ShadowRoot. 291 // Returns the parent node, but 0 if the parent node is a ShadowRoot.
292 ContainerNode* nonShadowBoundaryParentNode() const; 292 ContainerNode* nonShadowBoundaryParentNode() const;
293 293
294 bool selfOrAncestorHasDirAutoAttribute() const { return getFlag(SelfOrAncest orHasDirAutoFlag); } 294 bool selfOrAncestorHasDirAutoAttribute() const { return getFlag(SelfOrAncest orHasDirAutoFlag); }
295 void setSelfOrAncestorHasDirAutoAttribute(bool flag) { setFlag(flag, SelfOrA ncestorHasDirAutoFlag); } 295 void setSelfOrAncestorHasDirAutoAttribute(bool flag) { setFlag(flag, SelfOrA ncestorHasDirAutoFlag); }
296 296
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after
907 907
908 } // namespace WebCore 908 } // namespace WebCore
909 909
910 #ifndef NDEBUG 910 #ifndef NDEBUG
911 // Outside the WebCore namespace for ease of invocation from gdb. 911 // Outside the WebCore namespace for ease of invocation from gdb.
912 void showTree(const WebCore::Node*); 912 void showTree(const WebCore::Node*);
913 void showNodePath(const WebCore::Node*); 913 void showNodePath(const WebCore::Node*);
914 #endif 914 #endif
915 915
916 #endif 916 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698