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

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

Issue 1858163002: Rename inDocument() to inShadowIncludingDocument() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 } 468 }
469 469
470 TreeScope& treeScope() const 470 TreeScope& treeScope() const
471 { 471 {
472 ASSERT(m_treeScope); 472 ASSERT(m_treeScope);
473 return *m_treeScope; 473 return *m_treeScope;
474 } 474 }
475 475
476 bool inActiveDocument() const; 476 bool inActiveDocument() const;
477 477
478 // Returns true if this node is associated with a document and is in its ass ociated document's 478 // Returns true if this node is associated with a document and is in its ass ociated document's
hayato 2016/04/05 09:22:50 Please update the comment. // Returns true if thi
yuzuchan 2016/04/06 06:45:10 Done.
479 // node tree, false otherwise. 479 // node tree, false otherwise.
480 bool inDocument() const 480 bool inShadowIncludingDocument() const
481 { 481 {
482 return getFlag(InDocumentFlag); 482 return getFlag(InDocumentFlag);
483 } 483 }
484 bool isInShadowTree() const { return getFlag(IsInShadowTreeFlag); } 484 bool isInShadowTree() const { return getFlag(IsInShadowTreeFlag); }
485 bool isInTreeScope() const { return getFlag(static_cast<NodeFlags>(InDocumen tFlag | IsInShadowTreeFlag)); } 485 bool isInTreeScope() const { return getFlag(static_cast<NodeFlags>(InDocumen tFlag | IsInShadowTreeFlag)); }
486 486
487 ElementShadow* parentElementShadow() const; 487 ElementShadow* parentElementShadow() const;
488 bool isInV1ShadowTree() const; 488 bool isInV1ShadowTree() const;
489 bool isInV0ShadowTree() const; 489 bool isInV0ShadowTree() const;
490 bool isChildOfV1ShadowHost() const; 490 bool isChildOfV1ShadowHost() const;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 563
564 // ------------------------------------------------------------------------- ---- 564 // ------------------------------------------------------------------------- ----
565 // Notification of document structure changes (see ContainerNode.h for more notification methods) 565 // Notification of document structure changes (see ContainerNode.h for more notification methods)
566 // 566 //
567 // At first, WebKit notifies the node that it has been inserted into the doc ument. This is called during document parsing, and also 567 // At first, WebKit notifies the node that it has been inserted into the doc ument. This is called during document parsing, and also
568 // when a node is added through the DOM methods insertBefore(), appendChild( ) or replaceChild(). The call happens _after_ the node has been added to the tre e. 568 // when a node is added through the DOM methods insertBefore(), appendChild( ) or replaceChild(). The call happens _after_ the node has been added to the tre e.
569 // This is similar to the DOMNodeInsertedIntoDocument DOM event, but does no t require the overhead of event 569 // This is similar to the DOMNodeInsertedIntoDocument DOM event, but does no t require the overhead of event
570 // dispatching. 570 // dispatching.
571 // 571 //
572 // WebKit notifies this callback regardless if the subtree of the node is a document tree or a floating subtree. 572 // WebKit notifies this callback regardless if the subtree of the node is a document tree or a floating subtree.
573 // Implementation can determine the type of subtree by seeing insertionPoint ->inDocument(). 573 // Implementation can determine the type of subtree by seeing insertionPoint ->inShadowIncludingDocument().
574 // For a performance reason, notifications are delivered only to ContainerNo de subclasses if the insertionPoint is out of document. 574 // For a performance reason, notifications are delivered only to ContainerNo de subclasses if the insertionPoint is out of document.
575 // 575 //
576 // There are another callback named didNotifySubtreeInsertionsToDocument(), which is called after all the descendant is notified, 576 // There are another callback named didNotifySubtreeInsertionsToDocument(), which is called after all the descendant is notified,
577 // if this node was inserted into the document tree. Only a few subclasses a ctually need this. To utilize this, the node should 577 // if this node was inserted into the document tree. Only a few subclasses a ctually need this. To utilize this, the node should
578 // return InsertionShouldCallDidNotifySubtreeInsertions from insertedInto(). 578 // return InsertionShouldCallDidNotifySubtreeInsertions from insertedInto().
579 // 579 //
580 enum InsertionNotificationRequest { 580 enum InsertionNotificationRequest {
581 InsertionDone, 581 InsertionDone,
582 InsertionShouldCallDidNotifySubtreeInsertions 582 InsertionShouldCallDidNotifySubtreeInsertions
583 }; 583 };
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
924 } // namespace blink 924 } // namespace blink
925 925
926 #ifndef NDEBUG 926 #ifndef NDEBUG
927 // Outside the WebCore namespace for ease of invocation from gdb. 927 // Outside the WebCore namespace for ease of invocation from gdb.
928 void showNode(const blink::Node*); 928 void showNode(const blink::Node*);
929 void showTree(const blink::Node*); 929 void showTree(const blink::Node*);
930 void showNodePath(const blink::Node*); 930 void showNodePath(const blink::Node*);
931 #endif 931 #endif
932 932
933 #endif // Node_h 933 #endif // Node_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/LayoutTreeBuilderTraversal.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