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

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: Rebase 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 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 } 469 }
470 470
471 TreeScope& treeScope() const 471 TreeScope& treeScope() const
472 { 472 {
473 ASSERT(m_treeScope); 473 ASSERT(m_treeScope);
474 return *m_treeScope; 474 return *m_treeScope;
475 } 475 }
476 476
477 bool inActiveDocument() const; 477 bool inActiveDocument() const;
478 478
479 // Returns true if this node is associated with a document and is in its ass ociated document's 479 // Returns true if this node is associated with a shadow-including document and is in its associated document's
480 // node tree, false otherwise. 480 // node tree, false otherwise.
481 bool inDocument() const 481 bool inShadowIncludingDocument() const
482 { 482 {
483 return getFlag(InDocumentFlag); 483 return getFlag(InDocumentFlag);
484 } 484 }
485 bool isInShadowTree() const { return getFlag(IsInShadowTreeFlag); } 485 bool isInShadowTree() const { return getFlag(IsInShadowTreeFlag); }
486 bool isInTreeScope() const { return getFlag(static_cast<NodeFlags>(InDocumen tFlag | IsInShadowTreeFlag)); } 486 bool isInTreeScope() const { return getFlag(static_cast<NodeFlags>(InDocumen tFlag | IsInShadowTreeFlag)); }
487 487
488 ElementShadow* parentElementShadow() const; 488 ElementShadow* parentElementShadow() const;
489 bool isInV1ShadowTree() const; 489 bool isInV1ShadowTree() const;
490 bool isInV0ShadowTree() const; 490 bool isInV0ShadowTree() const;
491 bool isChildOfV1ShadowHost() const; 491 bool isChildOfV1ShadowHost() const;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 564
565 // ------------------------------------------------------------------------- ---- 565 // ------------------------------------------------------------------------- ----
566 // Notification of document structure changes (see ContainerNode.h for more notification methods) 566 // Notification of document structure changes (see ContainerNode.h for more notification methods)
567 // 567 //
568 // At first, WebKit notifies the node that it has been inserted into the doc ument. This is called during document parsing, and also 568 // At first, WebKit notifies the node that it has been inserted into the doc ument. This is called during document parsing, and also
569 // 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 // 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.
570 // This is similar to the DOMNodeInsertedIntoDocument DOM event, but does no t require the overhead of event 570 // This is similar to the DOMNodeInsertedIntoDocument DOM event, but does no t require the overhead of event
571 // dispatching. 571 // dispatching.
572 // 572 //
573 // WebKit notifies this callback regardless if the subtree of the node is a document tree or a floating subtree. 573 // WebKit notifies this callback regardless if the subtree of the node is a document tree or a floating subtree.
574 // Implementation can determine the type of subtree by seeing insertionPoint ->inDocument(). 574 // Implementation can determine the type of subtree by seeing insertionPoint ->inShadowIncludingDocument().
575 // For a performance reason, notifications are delivered only to ContainerNo de subclasses if the insertionPoint is out of document. 575 // For a performance reason, notifications are delivered only to ContainerNo de subclasses if the insertionPoint is out of document.
576 // 576 //
577 // There are another callback named didNotifySubtreeInsertionsToDocument(), which is called after all the descendant is notified, 577 // There are another callback named didNotifySubtreeInsertionsToDocument(), which is called after all the descendant is notified,
578 // if this node was inserted into the document tree. Only a few subclasses a ctually need this. To utilize this, the node should 578 // if this node was inserted into the document tree. Only a few subclasses a ctually need this. To utilize this, the node should
579 // return InsertionShouldCallDidNotifySubtreeInsertions from insertedInto(). 579 // return InsertionShouldCallDidNotifySubtreeInsertions from insertedInto().
580 // 580 //
581 enum InsertionNotificationRequest { 581 enum InsertionNotificationRequest {
582 InsertionDone, 582 InsertionDone,
583 InsertionShouldCallDidNotifySubtreeInsertions 583 InsertionShouldCallDidNotifySubtreeInsertions
584 }; 584 };
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
925 } // namespace blink 925 } // namespace blink
926 926
927 #ifndef NDEBUG 927 #ifndef NDEBUG
928 // Outside the WebCore namespace for ease of invocation from gdb. 928 // Outside the WebCore namespace for ease of invocation from gdb.
929 void showNode(const blink::Node*); 929 void showNode(const blink::Node*);
930 void showTree(const blink::Node*); 930 void showTree(const blink::Node*);
931 void showNodePath(const blink::Node*); 931 void showNodePath(const blink::Node*);
932 #endif 932 #endif
933 933
934 #endif // Node_h 934 #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