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

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

Issue 1204933006: Elements moved from a shadow root to a detached tree should clear their IsInShadowTree Flag (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated Created 5 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/ContainerNode.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 778 matching lines...) Expand 10 before | Expand all | Expand 10 after
789 setFlag(InDocumentFlag); 789 setFlag(InDocumentFlag);
790 if (parentOrShadowHostNode()->isInShadowTree()) 790 if (parentOrShadowHostNode()->isInShadowTree())
791 setFlag(IsInShadowTreeFlag); 791 setFlag(IsInShadowTreeFlag);
792 if (childNeedsDistributionRecalc() && !insertionPoint->childNeedsDistributio nRecalc()) 792 if (childNeedsDistributionRecalc() && !insertionPoint->childNeedsDistributio nRecalc())
793 insertionPoint->markAncestorsWithChildNeedsDistributionRecalc(); 793 insertionPoint->markAncestorsWithChildNeedsDistributionRecalc();
794 return InsertionDone; 794 return InsertionDone;
795 } 795 }
796 796
797 inline void Node::removedFrom(ContainerNode* insertionPoint) 797 inline void Node::removedFrom(ContainerNode* insertionPoint)
798 { 798 {
799 ASSERT(insertionPoint->inDocument() || isContainerNode()); 799 ASSERT(insertionPoint->inDocument() || isContainerNode() || isInShadowTree() );
rhogan 2015/06/24 20:34:41 I didn't use isInTreeScope() here as it would expa
800 if (insertionPoint->inDocument()) 800 if (insertionPoint->inDocument())
801 clearFlag(InDocumentFlag); 801 clearFlag(InDocumentFlag);
802 if (isInShadowTree() && !treeScope().rootNode().isShadowRoot()) 802 if (isInShadowTree() && !treeScope().rootNode().isShadowRoot())
803 clearFlag(IsInShadowTreeFlag); 803 clearFlag(IsInShadowTreeFlag);
804 } 804 }
805 805
806 inline void Element::invalidateStyleAttribute() 806 inline void Element::invalidateStyleAttribute()
807 { 807 {
808 ASSERT(elementData()); 808 ASSERT(elementData());
809 elementData()->m_styleAttributeIsDirty = true; 809 elementData()->m_styleAttributeIsDirty = true;
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 static PassRefPtrWillBeRawPtr<T> create(const QualifiedName&, Document&) 877 static PassRefPtrWillBeRawPtr<T> create(const QualifiedName&, Document&)
878 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ 878 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \
879 PassRefPtrWillBeRawPtr<T> T::create(const QualifiedName& tagName, Document& document) \ 879 PassRefPtrWillBeRawPtr<T> T::create(const QualifiedName& tagName, Document& document) \
880 { \ 880 { \
881 return adoptRefWillBeNoop(new T(tagName, document)); \ 881 return adoptRefWillBeNoop(new T(tagName, document)); \
882 } 882 }
883 883
884 } // namespace 884 } // namespace
885 885
886 #endif // Element_h 886 #endif // Element_h
OLDNEW
« no previous file with comments | « Source/core/dom/ContainerNode.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698