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

Side by Side Diff: sky/engine/core/dom/Node.h

Issue 732203004: Clean up child checks in ContainerNode. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Add back secondary hierarchy checks. Created 6 years, 1 month 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
« no previous file with comments | « sky/engine/core/dom/Element.cpp ('k') | sky/engine/core/dom/Range.cpp » ('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-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 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 369
370 // Returns true if this node is associated with a document and is in its ass ociated document's 370 // Returns true if this node is associated with a document and is in its ass ociated document's
371 // node tree, false otherwise. 371 // node tree, false otherwise.
372 bool inDocument() const 372 bool inDocument() const
373 { 373 {
374 return getFlag(InDocumentFlag); 374 return getFlag(InDocumentFlag);
375 } 375 }
376 bool isInShadowTree() const { return getFlag(IsInShadowTreeFlag); } 376 bool isInShadowTree() const { return getFlag(IsInShadowTreeFlag); }
377 bool isInTreeScope() const { return getFlag(static_cast<NodeFlags>(InDocumen tFlag | IsInShadowTreeFlag)); } 377 bool isInTreeScope() const { return getFlag(static_cast<NodeFlags>(InDocumen tFlag | IsInShadowTreeFlag)); }
378 378
379 virtual bool childTypeAllowed(NodeType) const { return false; }
380 unsigned countChildren() const; 379 unsigned countChildren() const;
381 380
382 bool isDescendantOf(const Node*) const; 381 bool isDescendantOf(const Node*) const;
383 bool contains(const Node*) const; 382 bool contains(const Node*) const;
384 bool containsIncludingShadowDOM(const Node*) const; 383 bool containsIncludingShadowDOM(const Node*) const;
385 bool containsIncludingHostElements(const Node&) const; 384 bool containsIncludingHostElements(const Node&) const;
386 385
387 // Used to determine whether range offsets use characters or node indices. 386 // Used to determine whether range offsets use characters or node indices.
388 virtual bool offsetInCharacters() const; 387 virtual bool offsetInCharacters() const;
389 // Number of DOM 16-bit units contained in node. Note that rendered text len gth can be different - e.g. because of 388 // Number of DOM 16-bit units contained in node. Note that rendered text len gth can be different - e.g. because of
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 } // namespace blink 752 } // namespace blink
754 753
755 #ifndef NDEBUG 754 #ifndef NDEBUG
756 // Outside the WebCore namespace for ease of invocation from gdb. 755 // Outside the WebCore namespace for ease of invocation from gdb.
757 void showNode(const blink::Node*); 756 void showNode(const blink::Node*);
758 void showTree(const blink::Node*); 757 void showTree(const blink::Node*);
759 void showNodePath(const blink::Node*); 758 void showNodePath(const blink::Node*);
760 #endif 759 #endif
761 760
762 #endif // Node_h 761 #endif // Node_h
OLDNEW
« no previous file with comments | « sky/engine/core/dom/Element.cpp ('k') | sky/engine/core/dom/Range.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698