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

Side by Side Diff: Source/core/dom/shadow/ShadowRoot.h

Issue 235113002: Oilpan: Remove guardRef and guardDeref from TreeScope. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address comments. Created 6 years, 7 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/TreeScopeAdopter.cpp ('k') | Source/core/dom/shadow/ShadowRoot.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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 * * Neither the name of Google Inc. nor the names of its 10 * * Neither the name of Google Inc. nor the names of its
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 ShadowRoot* olderShadowRoot() const { return next(); } 114 ShadowRoot* olderShadowRoot() const { return next(); }
115 115
116 String innerHTML() const; 116 String innerHTML() const;
117 void setInnerHTML(const String&, ExceptionState&); 117 void setInnerHTML(const String&, ExceptionState&);
118 118
119 PassRefPtr<Node> cloneNode(bool, ExceptionState&); 119 PassRefPtr<Node> cloneNode(bool, ExceptionState&);
120 PassRefPtr<Node> cloneNode(ExceptionState& exceptionState) { return cloneNod e(true, exceptionState); } 120 PassRefPtr<Node> cloneNode(ExceptionState& exceptionState) { return cloneNod e(true, exceptionState); }
121 121
122 StyleSheetList* styleSheets(); 122 StyleSheetList* styleSheets();
123 123
124 virtual void trace(Visitor*) OVERRIDE;
125
124 private: 126 private:
125 ShadowRoot(Document&, ShadowRootType); 127 ShadowRoot(Document&, ShadowRootType);
126 virtual ~ShadowRoot(); 128 virtual ~ShadowRoot();
127 129
128 virtual void dispose() OVERRIDE; 130 virtual void dispose() OVERRIDE;
129 virtual void childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta) OVERRIDE; 131 virtual void childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta) OVERRIDE;
130 132
131 ShadowRootRareData* ensureShadowRootRareData(); 133 ShadowRootRareData* ensureShadowRootRareData();
132 134
133 void addChildShadowRoot(); 135 void addChildShadowRoot();
134 void removeChildShadowRoot(); 136 void removeChildShadowRoot();
135 void invalidateDescendantInsertionPoints(); 137 void invalidateDescendantInsertionPoints();
136 138
137 // ShadowRoots should never be cloned. 139 // ShadowRoots should never be cloned.
138 virtual PassRefPtr<Node> cloneNode(bool) OVERRIDE { return nullptr; } 140 virtual PassRefPtr<Node> cloneNode(bool) OVERRIDE { return nullptr; }
139 141
140 // FIXME: This shouldn't happen. https://bugs.webkit.org/show_bug.cgi?id=888 34 142 // FIXME: This shouldn't happen. https://bugs.webkit.org/show_bug.cgi?id=888 34
141 bool isOrphan() const { return !host(); } 143 bool isOrphan() const { return !host(); }
142 144
143 ShadowRoot* m_prev; 145 ShadowRoot* m_prev;
144 ShadowRoot* m_next; 146 ShadowRoot* m_next;
145 OwnPtr<ShadowRootRareData> m_shadowRootRareData; 147 OwnPtrWillBeMember<ShadowRootRareData> m_shadowRootRareData;
146 unsigned m_numberOfStyles : 27; 148 unsigned m_numberOfStyles : 27;
147 unsigned m_type : 1; 149 unsigned m_type : 1;
148 unsigned m_registeredWithParentShadowRoot : 1; 150 unsigned m_registeredWithParentShadowRoot : 1;
149 unsigned m_descendantInsertionPointsIsValid : 1; 151 unsigned m_descendantInsertionPointsIsValid : 1;
150 }; 152 };
151 153
152 inline Element* ShadowRoot::activeElement() const 154 inline Element* ShadowRoot::activeElement() const
153 { 155 {
154 return adjustedFocusedElement(); 156 return adjustedFocusedElement();
155 } 157 }
156 158
157 DEFINE_NODE_TYPE_CASTS(ShadowRoot, isShadowRoot()); 159 DEFINE_NODE_TYPE_CASTS(ShadowRoot, isShadowRoot());
158 DEFINE_TYPE_CASTS(ShadowRoot, TreeScope, treeScope, treeScope->rootNode().isShad owRoot(), treeScope.rootNode().isShadowRoot()); 160 DEFINE_TYPE_CASTS(ShadowRoot, TreeScope, treeScope, treeScope->rootNode().isShad owRoot(), treeScope.rootNode().isShadowRoot());
159 161
160 } // namespace 162 } // namespace
161 163
162 #endif 164 #endif
OLDNEW
« no previous file with comments | « Source/core/dom/TreeScopeAdopter.cpp ('k') | Source/core/dom/shadow/ShadowRoot.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698