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

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

Issue 23890025: WIP (Introduce WTF::NonNullPtr<T>.) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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/Document.cpp ('k') | Source/core/dom/Element.cpp » ('j') | 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, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2013 Appl e Inc. All rights reserved. 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2013 Appl e 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 706 matching lines...) Expand 10 before | Expand all | Expand 10 after
717 717
718 void didAddAttribute(const QualifiedName&, const AtomicString&); 718 void didAddAttribute(const QualifiedName&, const AtomicString&);
719 void willModifyAttribute(const QualifiedName&, const AtomicString& oldValue, const AtomicString& newValue); 719 void willModifyAttribute(const QualifiedName&, const AtomicString& oldValue, const AtomicString& newValue);
720 void didModifyAttribute(const QualifiedName&, const AtomicString&); 720 void didModifyAttribute(const QualifiedName&, const AtomicString&);
721 void didRemoveAttribute(const QualifiedName&); 721 void didRemoveAttribute(const QualifiedName&);
722 722
723 void synchronizeAttribute(const QualifiedName&) const; 723 void synchronizeAttribute(const QualifiedName&) const;
724 void synchronizeAttribute(const AtomicString& localName) const; 724 void synchronizeAttribute(const AtomicString& localName) const;
725 725
726 void updateId(const AtomicString& oldId, const AtomicString& newId); 726 void updateId(const AtomicString& oldId, const AtomicString& newId);
727 void updateId(TreeScope&, const AtomicString& oldId, const AtomicString& new Id); 727 void updateId(NonNullPtr<TreeScope>, const AtomicString& oldId, const Atomic String& newId);
728 void updateName(const AtomicString& oldName, const AtomicString& newName); 728 void updateName(const AtomicString& oldName, const AtomicString& newName);
729 void updateLabel(TreeScope&, const AtomicString& oldForAttributeValue, const AtomicString& newForAttributeValue); 729 void updateLabel(NonNullPtr<TreeScope>, const AtomicString& oldForAttributeV alue, const AtomicString& newForAttributeValue);
730 730
731 void scrollByUnits(int units, ScrollGranularity); 731 void scrollByUnits(int units, ScrollGranularity);
732 732
733 virtual NodeType nodeType() const OVERRIDE FINAL; 733 virtual NodeType nodeType() const OVERRIDE FINAL;
734 virtual bool childTypeAllowed(NodeType) const OVERRIDE FINAL; 734 virtual bool childTypeAllowed(NodeType) const OVERRIDE FINAL;
735 735
736 void setAttributeInternal(size_t index, const QualifiedName&, const AtomicSt ring& value, SynchronizationOfLazyAttribute); 736 void setAttributeInternal(size_t index, const QualifiedName&, const AtomicSt ring& value, SynchronizationOfLazyAttribute);
737 void addAttributeInternal(const QualifiedName&, const AtomicString& value, S ynchronizationOfLazyAttribute); 737 void addAttributeInternal(const QualifiedName&, const AtomicString& value, S ynchronizationOfLazyAttribute);
738 void removeAttributeInternal(size_t index, SynchronizationOfLazyAttribute); 738 void removeAttributeInternal(size_t index, SynchronizationOfLazyAttribute);
739 void attributeChangedFromParserOrByCloning(const QualifiedName&, const Atomi cString&, AttributeModificationReason); 739 void attributeChangedFromParserOrByCloning(const QualifiedName&, const Atomi cString&, AttributeModificationReason);
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 if (childNeedsDistributionRecalc() && !insertionPoint->childNeedsDistributio nRecalc()) 979 if (childNeedsDistributionRecalc() && !insertionPoint->childNeedsDistributio nRecalc())
980 insertionPoint->markAncestorsWithChildNeedsDistributionRecalc(); 980 insertionPoint->markAncestorsWithChildNeedsDistributionRecalc();
981 return InsertionDone; 981 return InsertionDone;
982 } 982 }
983 983
984 inline void Node::removedFrom(ContainerNode* insertionPoint) 984 inline void Node::removedFrom(ContainerNode* insertionPoint)
985 { 985 {
986 ASSERT(insertionPoint->inDocument() || isContainerNode()); 986 ASSERT(insertionPoint->inDocument() || isContainerNode());
987 if (insertionPoint->inDocument()) 987 if (insertionPoint->inDocument())
988 clearFlag(InDocumentFlag); 988 clearFlag(InDocumentFlag);
989 if (isInShadowTree() && !treeScope().rootNode()->isShadowRoot()) 989 if (isInShadowTree() && !treeScope()->rootNode()->isShadowRoot())
990 clearFlag(IsInShadowTreeFlag); 990 clearFlag(IsInShadowTreeFlag);
991 } 991 }
992 992
993 inline void Element::invalidateStyleAttribute() 993 inline void Element::invalidateStyleAttribute()
994 { 994 {
995 ASSERT(elementData()); 995 ASSERT(elementData());
996 elementData()->m_styleAttributeIsDirty = true; 996 elementData()->m_styleAttributeIsDirty = true;
997 } 997 }
998 998
999 inline const StylePropertySet* Element::presentationAttributeStyle() 999 inline const StylePropertySet* Element::presentationAttributeStyle()
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
1091 1091
1092 inline const Attribute* ElementData::attributeItem(unsigned index) const 1092 inline const Attribute* ElementData::attributeItem(unsigned index) const
1093 { 1093 {
1094 RELEASE_ASSERT(index < length()); 1094 RELEASE_ASSERT(index < length());
1095 return attributeBase() + index; 1095 return attributeBase() + index;
1096 } 1096 }
1097 1097
1098 } // namespace 1098 } // namespace
1099 1099
1100 #endif 1100 #endif
OLDNEW
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698