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

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

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 bool hasDistribution() const { return !m_distributedNodes.isEmpty(); } 46 bool hasDistribution() const { return !m_distributedNodes.isEmpty(); }
47 void setDistributedNodes(DistributedNodes&); 47 void setDistributedNodes(DistributedNodes&);
48 void clearDistribution() { m_distributedNodes.clear(); } 48 void clearDistribution() { m_distributedNodes.clear(); }
49 bool isActive() const; 49 bool isActive() const;
50 bool canBeActive() const; 50 bool canBeActive() const;
51 51
52 bool isShadowInsertionPoint() const; 52 bool isShadowInsertionPoint() const;
53 bool isContentInsertionPoint() const; 53 bool isContentInsertionPoint() const;
54 54
55 PassRefPtrWillBeRawPtr<StaticNodeList> getDistributedNodes(); 55 RawPtr<StaticNodeList> getDistributedNodes();
56 56
57 virtual bool canAffectSelector() const { return false; } 57 virtual bool canAffectSelector() const { return false; }
58 58
59 void attach(const AttachContext& = AttachContext()) override; 59 void attach(const AttachContext& = AttachContext()) override;
60 void detach(const AttachContext& = AttachContext()) override; 60 void detach(const AttachContext& = AttachContext()) override;
61 61
62 size_t distributedNodesSize() const { return m_distributedNodes.size(); } 62 size_t distributedNodesSize() const { return m_distributedNodes.size(); }
63 Node* distributedNodeAt(size_t index) const { return m_distributedNodes.at( index).get(); } 63 Node* distributedNodeAt(size_t index) const { return m_distributedNodes.at( index).get(); }
64 Node* firstDistributedNode() const { return m_distributedNodes.isEmpty() ? 0 : m_distributedNodes.first().get(); } 64 Node* firstDistributedNode() const { return m_distributedNodes.isEmpty() ? 0 : m_distributedNodes.first().get(); }
65 Node* lastDistributedNode() const { return m_distributedNodes.isEmpty() ? 0 : m_distributedNodes.last().get(); } 65 Node* lastDistributedNode() const { return m_distributedNodes.isEmpty() ? 0 : m_distributedNodes.last().get(); }
(...skipping 10 matching lines...) Expand all
76 void removedFrom(ContainerNode*) override; 76 void removedFrom(ContainerNode*) override;
77 void willRecalcStyle(StyleRecalcChange) override; 77 void willRecalcStyle(StyleRecalcChange) override;
78 78
79 private: 79 private:
80 bool isInsertionPoint() const = delete; // This will catch anyone doing an u nnecessary check. 80 bool isInsertionPoint() const = delete; // This will catch anyone doing an u nnecessary check.
81 81
82 DistributedNodes m_distributedNodes; 82 DistributedNodes m_distributedNodes;
83 bool m_registeredWithShadowRoot; 83 bool m_registeredWithShadowRoot;
84 }; 84 };
85 85
86 typedef WillBeHeapVector<RefPtrWillBeMember<InsertionPoint>, 1> DestinationInser tionPoints; 86 typedef HeapVector<Member<InsertionPoint>, 1> DestinationInsertionPoints;
87 87
88 DEFINE_ELEMENT_TYPE_CASTS(InsertionPoint, isInsertionPoint()); 88 DEFINE_ELEMENT_TYPE_CASTS(InsertionPoint, isInsertionPoint());
89 89
90 inline bool isActiveInsertionPoint(const Node& node) 90 inline bool isActiveInsertionPoint(const Node& node)
91 { 91 {
92 return node.isInsertionPoint() && toInsertionPoint(node).isActive(); 92 return node.isInsertionPoint() && toInsertionPoint(node).isActive();
93 } 93 }
94 94
95 inline bool isActiveShadowInsertionPoint(const Node& node) 95 inline bool isActiveShadowInsertionPoint(const Node& node)
96 { 96 {
(...skipping 10 matching lines...) Expand all
107 return node.shadowHost()->shadow(); 107 return node.shadowHost()->shadow();
108 if (isActiveInsertionPoint(*parent)) 108 if (isActiveInsertionPoint(*parent))
109 return node.shadowHost()->shadow(); 109 return node.shadowHost()->shadow();
110 if (parent->isElementNode()) 110 if (parent->isElementNode())
111 return toElement(parent)->shadow(); 111 return toElement(parent)->shadow();
112 return 0; 112 return 0;
113 } 113 }
114 114
115 const InsertionPoint* resolveReprojection(const Node*); 115 const InsertionPoint* resolveReprojection(const Node*);
116 116
117 void collectDestinationInsertionPoints(const Node&, WillBeHeapVector<RawPtrWillB eMember<InsertionPoint>, 8>& results); 117 void collectDestinationInsertionPoints(const Node&, HeapVector<Member<InsertionP oint>, 8>& results);
118 118
119 } // namespace blink 119 } // namespace blink
120 120
121 #endif // InsertionPoint_h 121 #endif // InsertionPoint_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698