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

Side by Side Diff: third_party/WebKit/Source/core/dom/Element.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 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 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 // exposes only those properties that are requested at the time the proxy is 544 // exposes only those properties that are requested at the time the proxy is
545 // created. In order to know which properties are actually proxied, we 545 // created. In order to know which properties are actually proxied, we
546 // maintain a count of the number of compositor proxies associated with each 546 // maintain a count of the number of compositor proxies associated with each
547 // property. 547 // property.
548 bool hasCompositorProxy() const; 548 bool hasCompositorProxy() const;
549 void incrementCompositorProxiedProperties(uint32_t mutableProperties); 549 void incrementCompositorProxiedProperties(uint32_t mutableProperties);
550 void decrementCompositorProxiedProperties(uint32_t mutableProperties); 550 void decrementCompositorProxiedProperties(uint32_t mutableProperties);
551 uint32_t compositorMutableProperties() const; 551 uint32_t compositorMutableProperties() const;
552 552
553 // Helpers for V8DOMActivityLogger::logEvent. They call logEvent only if 553 // Helpers for V8DOMActivityLogger::logEvent. They call logEvent only if
554 // the element is inDocument() and the context is an isolated world. 554 // the element is inShadowIncludingDocument() and the context is an isolated world.
555 void logAddElementIfIsolatedWorldAndInDocument(const char element[], const Q ualifiedName& attr1); 555 void logAddElementIfIsolatedWorldAndInDocument(const char element[], const Q ualifiedName& attr1);
556 void logAddElementIfIsolatedWorldAndInDocument(const char element[], const Q ualifiedName& attr1, const QualifiedName& attr2); 556 void logAddElementIfIsolatedWorldAndInDocument(const char element[], const Q ualifiedName& attr1, const QualifiedName& attr2);
557 void logAddElementIfIsolatedWorldAndInDocument(const char element[], const Q ualifiedName& attr1, const QualifiedName& attr2, const QualifiedName& attr3); 557 void logAddElementIfIsolatedWorldAndInDocument(const char element[], const Q ualifiedName& attr1, const QualifiedName& attr2, const QualifiedName& attr3);
558 void logUpdateAttributeIfIsolatedWorldAndInDocument(const char element[], co nst QualifiedName& attributeName, const AtomicString& oldValue, const AtomicStri ng& newValue); 558 void logUpdateAttributeIfIsolatedWorldAndInDocument(const char element[], co nst QualifiedName& attributeName, const AtomicString& oldValue, const AtomicStri ng& newValue);
559 559
560 DECLARE_VIRTUAL_TRACE(); 560 DECLARE_VIRTUAL_TRACE();
561 561
562 SpellcheckAttributeState spellcheckAttributeState() const; 562 SpellcheckAttributeState spellcheckAttributeState() const;
563 563
564 NodeIntersectionObserverData* intersectionObserverData() const; 564 NodeIntersectionObserverData* intersectionObserverData() const;
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
842 { 842 {
843 if (!elementData() || !elementData()->isUnique()) 843 if (!elementData() || !elementData()->isUnique())
844 createUniqueElementData(); 844 createUniqueElementData();
845 return toUniqueElementData(*m_elementData); 845 return toUniqueElementData(*m_elementData);
846 } 846 }
847 847
848 inline Node::InsertionNotificationRequest Node::insertedInto(ContainerNode* inse rtionPoint) 848 inline Node::InsertionNotificationRequest Node::insertedInto(ContainerNode* inse rtionPoint)
849 { 849 {
850 ASSERT(!childNeedsStyleInvalidation()); 850 ASSERT(!childNeedsStyleInvalidation());
851 ASSERT(!needsStyleInvalidation()); 851 ASSERT(!needsStyleInvalidation());
852 ASSERT(insertionPoint->inDocument() || insertionPoint->isInShadowTree() || i sContainerNode()); 852 ASSERT(insertionPoint->inShadowIncludingDocument() || insertionPoint->isInSh adowTree() || isContainerNode());
853 if (insertionPoint->inDocument()) { 853 if (insertionPoint->inShadowIncludingDocument()) {
854 setFlag(InDocumentFlag); 854 setFlag(InDocumentFlag);
855 insertionPoint->document().incrementNodeCount(); 855 insertionPoint->document().incrementNodeCount();
856 } 856 }
857 if (parentOrShadowHostNode()->isInShadowTree()) 857 if (parentOrShadowHostNode()->isInShadowTree())
858 setFlag(IsInShadowTreeFlag); 858 setFlag(IsInShadowTreeFlag);
859 if (childNeedsDistributionRecalc() && !insertionPoint->childNeedsDistributio nRecalc()) 859 if (childNeedsDistributionRecalc() && !insertionPoint->childNeedsDistributio nRecalc())
860 insertionPoint->markAncestorsWithChildNeedsDistributionRecalc(); 860 insertionPoint->markAncestorsWithChildNeedsDistributionRecalc();
861 return InsertionDone; 861 return InsertionDone;
862 } 862 }
863 863
864 inline void Node::removedFrom(ContainerNode* insertionPoint) 864 inline void Node::removedFrom(ContainerNode* insertionPoint)
865 { 865 {
866 ASSERT(insertionPoint->inDocument() || isContainerNode() || isInShadowTree() ); 866 ASSERT(insertionPoint->inShadowIncludingDocument() || isContainerNode() || i sInShadowTree());
867 if (insertionPoint->inDocument()) { 867 if (insertionPoint->inShadowIncludingDocument()) {
868 clearFlag(InDocumentFlag); 868 clearFlag(InDocumentFlag);
869 insertionPoint->document().decrementNodeCount(); 869 insertionPoint->document().decrementNodeCount();
870 } 870 }
871 if (isInShadowTree() && !treeScope().rootNode().isShadowRoot()) 871 if (isInShadowTree() && !treeScope().rootNode().isShadowRoot())
872 clearFlag(IsInShadowTreeFlag); 872 clearFlag(IsInShadowTreeFlag);
873 if (AXObjectCache* cache = document().existingAXObjectCache()) 873 if (AXObjectCache* cache = document().existingAXObjectCache())
874 cache->remove(this); 874 cache->remove(this);
875 } 875 }
876 876
877 inline void Element::invalidateStyleAttribute() 877 inline void Element::invalidateStyleAttribute()
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
948 static RawPtr<T> create(const QualifiedName&, Document&) 948 static RawPtr<T> create(const QualifiedName&, Document&)
949 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ 949 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \
950 RawPtr<T> T::create(const QualifiedName& tagName, Document& document) \ 950 RawPtr<T> T::create(const QualifiedName& tagName, Document& document) \
951 { \ 951 { \
952 return new T(tagName, document); \ 952 return new T(tagName, document); \
953 } 953 }
954 954
955 } // namespace blink 955 } // namespace blink
956 956
957 #endif // Element_h 957 #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