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

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

Issue 1252683003: Oilpan: Schedule a precise GC when a page navigates (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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
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 ASSERT(!childNeedsStyleInvalidation()); 798 ASSERT(!childNeedsStyleInvalidation());
799 ASSERT(!needsStyleInvalidation()); 799 ASSERT(!needsStyleInvalidation());
800 ASSERT(insertionPoint->inDocument() || isContainerNode()); 800 ASSERT(insertionPoint->inDocument() || isContainerNode());
801 if (insertionPoint->inDocument()) 801 if (insertionPoint->inDocument())
802 setFlag(InDocumentFlag); 802 setFlag(InDocumentFlag);
803 if (parentOrShadowHostNode()->isInShadowTree()) 803 if (parentOrShadowHostNode()->isInShadowTree())
804 setFlag(IsInShadowTreeFlag); 804 setFlag(IsInShadowTreeFlag);
805 if (childNeedsDistributionRecalc() && !insertionPoint->childNeedsDistributio nRecalc()) 805 if (childNeedsDistributionRecalc() && !insertionPoint->childNeedsDistributio nRecalc())
806 insertionPoint->markAncestorsWithChildNeedsDistributionRecalc(); 806 insertionPoint->markAncestorsWithChildNeedsDistributionRecalc();
807 if (insertionPoint->inDocument())
808 insertionPoint->document().topDocument().incrementNodeCount();
haraken 2015/08/11 07:43:08 You can move this code into the above 'insertionPo
keishi 2015/08/11 08:12:57 Done.
807 return InsertionDone; 809 return InsertionDone;
808 } 810 }
809 811
810 inline void Node::removedFrom(ContainerNode* insertionPoint) 812 inline void Node::removedFrom(ContainerNode* insertionPoint)
811 { 813 {
812 ASSERT(insertionPoint->inDocument() || isContainerNode() || isInShadowTree() ); 814 ASSERT(insertionPoint->inDocument() || isContainerNode() || isInShadowTree() );
813 if (insertionPoint->inDocument()) 815 if (insertionPoint->inDocument())
814 clearFlag(InDocumentFlag); 816 clearFlag(InDocumentFlag);
815 if (isInShadowTree() && !treeScope().rootNode().isShadowRoot()) 817 if (isInShadowTree() && !treeScope().rootNode().isShadowRoot())
816 clearFlag(IsInShadowTreeFlag); 818 clearFlag(IsInShadowTreeFlag);
817 if (AXObjectCache* cache = document().existingAXObjectCache()) 819 if (AXObjectCache* cache = document().existingAXObjectCache())
818 cache->remove(this); 820 cache->remove(this);
821 if (insertionPoint->inDocument())
822 insertionPoint->document().topDocument().decrementNodeCount();
haraken 2015/08/11 07:43:08 Ditto.
keishi 2015/08/11 08:12:58 Done.
819 } 823 }
820 824
821 inline void Element::invalidateStyleAttribute() 825 inline void Element::invalidateStyleAttribute()
822 { 826 {
823 ASSERT(elementData()); 827 ASSERT(elementData());
824 elementData()->m_styleAttributeIsDirty = true; 828 elementData()->m_styleAttributeIsDirty = true;
825 } 829 }
826 830
827 inline const StylePropertySet* Element::presentationAttributeStyle() 831 inline const StylePropertySet* Element::presentationAttributeStyle()
828 { 832 {
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
892 static PassRefPtrWillBeRawPtr<T> create(const QualifiedName&, Document&) 896 static PassRefPtrWillBeRawPtr<T> create(const QualifiedName&, Document&)
893 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ 897 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \
894 PassRefPtrWillBeRawPtr<T> T::create(const QualifiedName& tagName, Document& document) \ 898 PassRefPtrWillBeRawPtr<T> T::create(const QualifiedName& tagName, Document& document) \
895 { \ 899 { \
896 return adoptRefWillBeNoop(new T(tagName, document)); \ 900 return adoptRefWillBeNoop(new T(tagName, document)); \
897 } 901 }
898 902
899 } // namespace 903 } // namespace
900 904
901 #endif // Element_h 905 #endif // Element_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698