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

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

Issue 1420653003: Fix an optimisation in ContainerNode::notifyNodeInsertedInternal (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix assertion Created 5 years, 2 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
« no previous file with comments | « third_party/WebKit/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 786 matching lines...) Expand 10 before | Expand all | Expand 10 after
797 { 797 {
798 if (!elementData() || !elementData()->isUnique()) 798 if (!elementData() || !elementData()->isUnique())
799 createUniqueElementData(); 799 createUniqueElementData();
800 return toUniqueElementData(*m_elementData); 800 return toUniqueElementData(*m_elementData);
801 } 801 }
802 802
803 inline Node::InsertionNotificationRequest Node::insertedInto(ContainerNode* inse rtionPoint) 803 inline Node::InsertionNotificationRequest Node::insertedInto(ContainerNode* inse rtionPoint)
804 { 804 {
805 ASSERT(!childNeedsStyleInvalidation()); 805 ASSERT(!childNeedsStyleInvalidation());
806 ASSERT(!needsStyleInvalidation()); 806 ASSERT(!needsStyleInvalidation());
807 ASSERT(insertionPoint->inDocument() || isContainerNode()); 807 ASSERT(insertionPoint->inDocument() || insertionPoint->isInShadowTree() || i sContainerNode());
808 if (insertionPoint->inDocument()) { 808 if (insertionPoint->inDocument()) {
809 setFlag(InDocumentFlag); 809 setFlag(InDocumentFlag);
810 insertionPoint->document().incrementNodeCount(); 810 insertionPoint->document().incrementNodeCount();
811 } 811 }
812 if (parentOrShadowHostNode()->isInShadowTree()) 812 if (parentOrShadowHostNode()->isInShadowTree())
813 setFlag(IsInShadowTreeFlag); 813 setFlag(IsInShadowTreeFlag);
814 if (childNeedsDistributionRecalc() && !insertionPoint->childNeedsDistributio nRecalc()) 814 if (childNeedsDistributionRecalc() && !insertionPoint->childNeedsDistributio nRecalc())
815 insertionPoint->markAncestorsWithChildNeedsDistributionRecalc(); 815 insertionPoint->markAncestorsWithChildNeedsDistributionRecalc();
816 return InsertionDone; 816 return InsertionDone;
817 } 817 }
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
903 static PassRefPtrWillBeRawPtr<T> create(const QualifiedName&, Document&) 903 static PassRefPtrWillBeRawPtr<T> create(const QualifiedName&, Document&)
904 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ 904 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \
905 PassRefPtrWillBeRawPtr<T> T::create(const QualifiedName& tagName, Document& document) \ 905 PassRefPtrWillBeRawPtr<T> T::create(const QualifiedName& tagName, Document& document) \
906 { \ 906 { \
907 return adoptRefWillBeNoop(new T(tagName, document)); \ 907 return adoptRefWillBeNoop(new T(tagName, document)); \
908 } 908 }
909 909
910 } // namespace 910 } // namespace
911 911
912 #endif // Element_h 912 #endif // Element_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/ContainerNode.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698