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

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

Issue 1883083002: Introduce Node::containingTreeScope(), which asserts that the node's root is a tree scope (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased 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 863 matching lines...) Expand 10 before | Expand all | Expand 10 after
874 return InsertionDone; 874 return InsertionDone;
875 } 875 }
876 876
877 inline void Node::removedFrom(ContainerNode* insertionPoint) 877 inline void Node::removedFrom(ContainerNode* insertionPoint)
878 { 878 {
879 DCHECK(insertionPoint->inShadowIncludingDocument() || isContainerNode() || i sInShadowTree()); 879 DCHECK(insertionPoint->inShadowIncludingDocument() || isContainerNode() || i sInShadowTree());
880 if (insertionPoint->inShadowIncludingDocument()) { 880 if (insertionPoint->inShadowIncludingDocument()) {
881 clearFlag(InDocumentFlag); 881 clearFlag(InDocumentFlag);
882 insertionPoint->document().decrementNodeCount(); 882 insertionPoint->document().decrementNodeCount();
883 } 883 }
884 if (isInShadowTree() && !treeScope().rootNode().isShadowRoot()) 884 if (isInShadowTree() && !rootTreeScope().rootNode().isShadowRoot())
885 clearFlag(IsInShadowTreeFlag); 885 clearFlag(IsInShadowTreeFlag);
886 if (AXObjectCache* cache = document().existingAXObjectCache()) 886 if (AXObjectCache* cache = document().existingAXObjectCache())
887 cache->remove(this); 887 cache->remove(this);
888 } 888 }
889 889
890 inline void Element::invalidateStyleAttribute() 890 inline void Element::invalidateStyleAttribute()
891 { 891 {
892 DCHECK(elementData()); 892 DCHECK(elementData());
893 elementData()->m_styleAttributeIsDirty = true; 893 elementData()->m_styleAttributeIsDirty = true;
894 } 894 }
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
961 static T* create(const QualifiedName&, Document&) 961 static T* create(const QualifiedName&, Document&)
962 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ 962 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \
963 T* T::create(const QualifiedName& tagName, Document& document) \ 963 T* T::create(const QualifiedName& tagName, Document& document) \
964 { \ 964 { \
965 return new T(tagName, document); \ 965 return new T(tagName, document); \
966 } 966 }
967 967
968 } // namespace blink 968 } // namespace blink
969 969
970 #endif // Element_h 970 #endif // Element_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698