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

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

Issue 2149893003: Rename Node::inShadowIncludingDocument() to Node::isConnected() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed Created 4 years, 5 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 Peter Kelly (pmk@post.com) 4 * (C) 2001 Peter Kelly (pmk@post.com)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * Copyright (C) 2003-2011, 2013, 2014 Apple Inc. All rights reserved. 6 * Copyright (C) 2003-2011, 2013, 2014 Apple Inc. All rights reserved.
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 545 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 // created. In order to know which properties are actually proxied, we 556 // created. In order to know which properties are actually proxied, we
557 // maintain a count of the number of compositor proxies associated with each 557 // maintain a count of the number of compositor proxies associated with each
558 // property. 558 // property.
559 bool hasCompositorProxy() const; 559 bool hasCompositorProxy() const;
560 void incrementCompositorProxiedProperties(uint32_t mutableProperties); 560 void incrementCompositorProxiedProperties(uint32_t mutableProperties);
561 void decrementCompositorProxiedProperties(uint32_t mutableProperties); 561 void decrementCompositorProxiedProperties(uint32_t mutableProperties);
562 uint32_t compositorMutableProperties() const; 562 uint32_t compositorMutableProperties() const;
563 void updateFromCompositorMutation(const CompositorMutation&); 563 void updateFromCompositorMutation(const CompositorMutation&);
564 564
565 // Helpers for V8DOMActivityLogger::logEvent. They call logEvent only if 565 // Helpers for V8DOMActivityLogger::logEvent. They call logEvent only if
566 // the element is inShadowIncludingDocument() and the context is an isolated world. 566 // the element is isConnected() and the context is an isolated world.
567 void logAddElementIfIsolatedWorldAndInDocument(const char element[], const Q ualifiedName& attr1); 567 void logAddElementIfIsolatedWorldAndInDocument(const char element[], const Q ualifiedName& attr1);
568 void logAddElementIfIsolatedWorldAndInDocument(const char element[], const Q ualifiedName& attr1, const QualifiedName& attr2); 568 void logAddElementIfIsolatedWorldAndInDocument(const char element[], const Q ualifiedName& attr1, const QualifiedName& attr2);
569 void logAddElementIfIsolatedWorldAndInDocument(const char element[], const Q ualifiedName& attr1, const QualifiedName& attr2, const QualifiedName& attr3); 569 void logAddElementIfIsolatedWorldAndInDocument(const char element[], const Q ualifiedName& attr1, const QualifiedName& attr2, const QualifiedName& attr3);
570 void logUpdateAttributeIfIsolatedWorldAndInDocument(const char element[], co nst QualifiedName& attributeName, const AtomicString& oldValue, const AtomicStri ng& newValue); 570 void logUpdateAttributeIfIsolatedWorldAndInDocument(const char element[], co nst QualifiedName& attributeName, const AtomicString& oldValue, const AtomicStri ng& newValue);
571 571
572 DECLARE_VIRTUAL_TRACE(); 572 DECLARE_VIRTUAL_TRACE();
573 573
574 DECLARE_VIRTUAL_TRACE_WRAPPERS(); 574 DECLARE_VIRTUAL_TRACE_WRAPPERS();
575 575
576 SpellcheckAttributeState spellcheckAttributeState() const; 576 SpellcheckAttributeState spellcheckAttributeState() const;
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 { 862 {
863 if (!elementData() || !elementData()->isUnique()) 863 if (!elementData() || !elementData()->isUnique())
864 createUniqueElementData(); 864 createUniqueElementData();
865 return toUniqueElementData(*m_elementData); 865 return toUniqueElementData(*m_elementData);
866 } 866 }
867 867
868 inline Node::InsertionNotificationRequest Node::insertedInto(ContainerNode* inse rtionPoint) 868 inline Node::InsertionNotificationRequest Node::insertedInto(ContainerNode* inse rtionPoint)
869 { 869 {
870 DCHECK(!childNeedsStyleInvalidation()); 870 DCHECK(!childNeedsStyleInvalidation());
871 DCHECK(!needsStyleInvalidation()); 871 DCHECK(!needsStyleInvalidation());
872 DCHECK(insertionPoint->inShadowIncludingDocument() || insertionPoint->isInSh adowTree() || isContainerNode()); 872 DCHECK(insertionPoint->isConnected() || insertionPoint->isInShadowTree() || isContainerNode());
873 if (insertionPoint->inShadowIncludingDocument()) { 873 if (insertionPoint->isConnected()) {
874 setFlag(InDocumentFlag); 874 setFlag(IsConnectedFlag);
875 insertionPoint->document().incrementNodeCount(); 875 insertionPoint->document().incrementNodeCount();
876 } 876 }
877 if (parentOrShadowHostNode()->isInShadowTree()) 877 if (parentOrShadowHostNode()->isInShadowTree())
878 setFlag(IsInShadowTreeFlag); 878 setFlag(IsInShadowTreeFlag);
879 if (childNeedsDistributionRecalc() && !insertionPoint->childNeedsDistributio nRecalc()) 879 if (childNeedsDistributionRecalc() && !insertionPoint->childNeedsDistributio nRecalc())
880 insertionPoint->markAncestorsWithChildNeedsDistributionRecalc(); 880 insertionPoint->markAncestorsWithChildNeedsDistributionRecalc();
881 return InsertionDone; 881 return InsertionDone;
882 } 882 }
883 883
884 inline void Node::removedFrom(ContainerNode* insertionPoint) 884 inline void Node::removedFrom(ContainerNode* insertionPoint)
885 { 885 {
886 DCHECK(insertionPoint->inShadowIncludingDocument() || isContainerNode() || i sInShadowTree()); 886 DCHECK(insertionPoint->isConnected() || isContainerNode() || isInShadowTree( ));
887 if (insertionPoint->inShadowIncludingDocument()) { 887 if (insertionPoint->isConnected()) {
888 clearFlag(InDocumentFlag); 888 clearFlag(IsConnectedFlag);
889 insertionPoint->document().decrementNodeCount(); 889 insertionPoint->document().decrementNodeCount();
890 } 890 }
891 if (isInShadowTree() && !containingTreeScope().rootNode().isShadowRoot()) 891 if (isInShadowTree() && !containingTreeScope().rootNode().isShadowRoot())
892 clearFlag(IsInShadowTreeFlag); 892 clearFlag(IsInShadowTreeFlag);
893 if (AXObjectCache* cache = document().existingAXObjectCache()) 893 if (AXObjectCache* cache = document().existingAXObjectCache())
894 cache->remove(this); 894 cache->remove(this);
895 } 895 }
896 896
897 inline void Element::invalidateStyleAttribute() 897 inline void Element::invalidateStyleAttribute()
898 { 898 {
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
968 static T* create(const QualifiedName&, Document&) 968 static T* create(const QualifiedName&, Document&)
969 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ 969 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \
970 T* T::create(const QualifiedName& tagName, Document& document) \ 970 T* T::create(const QualifiedName& tagName, Document& document) \
971 { \ 971 { \
972 return new T(tagName, document); \ 972 return new T(tagName, document); \
973 } 973 }
974 974
975 } // namespace blink 975 } // namespace blink
976 976
977 #endif // Element_h 977 #endif // Element_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | third_party/WebKit/Source/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698