OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
reserved. |
3 * | 3 * |
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
5 * | 5 * |
6 * Other contributors: | 6 * Other contributors: |
7 * Robert O'Callahan <roc+@cs.cmu.edu> | 7 * Robert O'Callahan <roc+@cs.cmu.edu> |
8 * David Baron <dbaron@fas.harvard.edu> | 8 * David Baron <dbaron@fas.harvard.edu> |
9 * Christian Biesinger <cbiesinger@web.de> | 9 * Christian Biesinger <cbiesinger@web.de> |
10 * Randall Jesup <rjesup@wgate.com> | 10 * Randall Jesup <rjesup@wgate.com> |
(...skipping 24 matching lines...) Expand all Loading... |
35 * version of this file only under the terms of one of those two | 35 * version of this file only under the terms of one of those two |
36 * licenses (the MPL or the GPL) and not to allow others to use your | 36 * licenses (the MPL or the GPL) and not to allow others to use your |
37 * version of this file under the LGPL, indicate your decision by | 37 * version of this file under the LGPL, indicate your decision by |
38 * deletingthe provisions above and replace them with the notice and | 38 * deletingthe provisions above and replace them with the notice and |
39 * other provisions required by the MPL or the GPL, as the case may be. | 39 * other provisions required by the MPL or the GPL, as the case may be. |
40 * If you do not delete the provisions above, a recipient may use your | 40 * If you do not delete the provisions above, a recipient may use your |
41 * version of this file under any of the LGPL, the MPL or the GPL. | 41 * version of this file under any of the LGPL, the MPL or the GPL. |
42 */ | 42 */ |
43 | 43 |
44 #include "config.h" | 44 #include "config.h" |
45 #include "core/rendering/RenderLayerStackingNode.h" | 45 #include "core/layout/LayerStackingNode.h" |
46 | 46 |
47 #include "core/layout/compositing/RenderLayerCompositor.h" | 47 #include "core/layout/Layer.h" |
48 #include "core/rendering/RenderLayer.h" | 48 #include "core/layout/compositing/LayerCompositor.h" |
49 #include "core/rendering/RenderView.h" | 49 #include "core/rendering/RenderView.h" |
50 #include "public/platform/Platform.h" | 50 #include "public/platform/Platform.h" |
51 | 51 |
52 namespace blink { | 52 namespace blink { |
53 | 53 |
54 // FIXME: This should not require RenderLayer. There is currently a cycle where | 54 // FIXME: This should not require Layer. There is currently a cycle where |
55 // in order to determine if we shoulBeNormalFlowOnly() we have to ask the render | 55 // in order to determine if we shoulBeNormalFlowOnly() we have to ask the render |
56 // layer about some of its state. | 56 // layer about some of its state. |
57 RenderLayerStackingNode::RenderLayerStackingNode(RenderLayer* layer) | 57 LayerStackingNode::LayerStackingNode(Layer* layer) |
58 : m_layer(layer) | 58 : m_layer(layer) |
59 , m_normalFlowListDirty(true) | 59 , m_normalFlowListDirty(true) |
60 #if ENABLE(ASSERT) | 60 #if ENABLE(ASSERT) |
61 , m_layerListMutationAllowed(true) | 61 , m_layerListMutationAllowed(true) |
62 , m_stackingParent(0) | 62 , m_stackingParent(0) |
63 #endif | 63 #endif |
64 { | 64 { |
65 m_isNormalFlowOnly = shouldBeNormalFlowOnly(); | 65 m_isNormalFlowOnly = shouldBeNormalFlowOnly(); |
66 | 66 |
67 // Non-stacking contexts should have empty z-order lists. As this is already
the case, | 67 // Non-stacking contexts should have empty z-order lists. As this is already
the case, |
68 // there is no need to dirty / recompute these lists. | 68 // there is no need to dirty / recompute these lists. |
69 m_zOrderListsDirty = isStackingContext(); | 69 m_zOrderListsDirty = isStackingContext(); |
70 } | 70 } |
71 | 71 |
72 RenderLayerStackingNode::~RenderLayerStackingNode() | 72 LayerStackingNode::~LayerStackingNode() |
73 { | 73 { |
74 #if ENABLE(ASSERT) | 74 #if ENABLE(ASSERT) |
75 if (!renderer()->documentBeingDestroyed()) { | 75 if (!renderer()->documentBeingDestroyed()) { |
76 ASSERT(!isInStackingParentZOrderLists()); | 76 ASSERT(!isInStackingParentZOrderLists()); |
77 ASSERT(!isInStackingParentNormalFlowList()); | 77 ASSERT(!isInStackingParentNormalFlowList()); |
78 | 78 |
79 updateStackingParentForZOrderLists(0); | 79 updateStackingParentForZOrderLists(0); |
80 updateStackingParentForNormalFlowList(0); | 80 updateStackingParentForNormalFlowList(0); |
81 } | 81 } |
82 #endif | 82 #endif |
83 } | 83 } |
84 | 84 |
85 // Helper for the sorting of layers by z-index. | 85 // Helper for the sorting of layers by z-index. |
86 static inline bool compareZIndex(RenderLayerStackingNode* first, RenderLayerStac
kingNode* second) | 86 static inline bool compareZIndex(LayerStackingNode* first, LayerStackingNode* se
cond) |
87 { | 87 { |
88 return first->zIndex() < second->zIndex(); | 88 return first->zIndex() < second->zIndex(); |
89 } | 89 } |
90 | 90 |
91 RenderLayerCompositor* RenderLayerStackingNode::compositor() const | 91 LayerCompositor* LayerStackingNode::compositor() const |
92 { | 92 { |
93 ASSERT(renderer()->view()); | 93 ASSERT(renderer()->view()); |
94 return renderer()->view()->compositor(); | 94 return renderer()->view()->compositor(); |
95 } | 95 } |
96 | 96 |
97 void RenderLayerStackingNode::dirtyZOrderLists() | 97 void LayerStackingNode::dirtyZOrderLists() |
98 { | 98 { |
99 ASSERT(m_layerListMutationAllowed); | 99 ASSERT(m_layerListMutationAllowed); |
100 ASSERT(isStackingContext()); | 100 ASSERT(isStackingContext()); |
101 | 101 |
102 #if ENABLE(ASSERT) | 102 #if ENABLE(ASSERT) |
103 updateStackingParentForZOrderLists(0); | 103 updateStackingParentForZOrderLists(0); |
104 #endif | 104 #endif |
105 | 105 |
106 if (m_posZOrderList) | 106 if (m_posZOrderList) |
107 m_posZOrderList->clear(); | 107 m_posZOrderList->clear(); |
108 if (m_negZOrderList) | 108 if (m_negZOrderList) |
109 m_negZOrderList->clear(); | 109 m_negZOrderList->clear(); |
110 m_zOrderListsDirty = true; | 110 m_zOrderListsDirty = true; |
111 | 111 |
112 if (!renderer()->documentBeingDestroyed()) | 112 if (!renderer()->documentBeingDestroyed()) |
113 compositor()->setNeedsCompositingUpdate(CompositingUpdateRebuildTree); | 113 compositor()->setNeedsCompositingUpdate(CompositingUpdateRebuildTree); |
114 } | 114 } |
115 | 115 |
116 void RenderLayerStackingNode::dirtyStackingContextZOrderLists() | 116 void LayerStackingNode::dirtyStackingContextZOrderLists() |
117 { | 117 { |
118 if (RenderLayerStackingNode* stackingNode = ancestorStackingContextNode()) | 118 if (LayerStackingNode* stackingNode = ancestorStackingContextNode()) |
119 stackingNode->dirtyZOrderLists(); | 119 stackingNode->dirtyZOrderLists(); |
120 } | 120 } |
121 | 121 |
122 void RenderLayerStackingNode::dirtyNormalFlowList() | 122 void LayerStackingNode::dirtyNormalFlowList() |
123 { | 123 { |
124 ASSERT(m_layerListMutationAllowed); | 124 ASSERT(m_layerListMutationAllowed); |
125 | 125 |
126 #if ENABLE(ASSERT) | 126 #if ENABLE(ASSERT) |
127 updateStackingParentForNormalFlowList(0); | 127 updateStackingParentForNormalFlowList(0); |
128 #endif | 128 #endif |
129 | 129 |
130 if (m_normalFlowList) | 130 if (m_normalFlowList) |
131 m_normalFlowList->clear(); | 131 m_normalFlowList->clear(); |
132 m_normalFlowListDirty = true; | 132 m_normalFlowListDirty = true; |
133 | 133 |
134 if (!renderer()->documentBeingDestroyed()) | 134 if (!renderer()->documentBeingDestroyed()) |
135 compositor()->setNeedsCompositingUpdate(CompositingUpdateRebuildTree); | 135 compositor()->setNeedsCompositingUpdate(CompositingUpdateRebuildTree); |
136 } | 136 } |
137 | 137 |
138 void RenderLayerStackingNode::rebuildZOrderLists() | 138 void LayerStackingNode::rebuildZOrderLists() |
139 { | 139 { |
140 ASSERT(m_layerListMutationAllowed); | 140 ASSERT(m_layerListMutationAllowed); |
141 ASSERT(isDirtyStackingContext()); | 141 ASSERT(isDirtyStackingContext()); |
142 | 142 |
143 for (RenderLayer* child = layer()->firstChild(); child; child = child->nextS
ibling()) { | 143 for (Layer* child = layer()->firstChild(); child; child = child->nextSibling
()) { |
144 if (!layer()->reflectionInfo() || layer()->reflectionInfo()->reflectionL
ayer() != child) | 144 if (!layer()->reflectionInfo() || layer()->reflectionInfo()->reflectionL
ayer() != child) |
145 child->stackingNode()->collectLayers(m_posZOrderList, m_negZOrderLis
t); | 145 child->stackingNode()->collectLayers(m_posZOrderList, m_negZOrderLis
t); |
146 } | 146 } |
147 | 147 |
148 // Sort the two lists. | 148 // Sort the two lists. |
149 if (m_posZOrderList) | 149 if (m_posZOrderList) |
150 std::stable_sort(m_posZOrderList->begin(), m_posZOrderList->end(), compa
reZIndex); | 150 std::stable_sort(m_posZOrderList->begin(), m_posZOrderList->end(), compa
reZIndex); |
151 | 151 |
152 if (m_negZOrderList) | 152 if (m_negZOrderList) |
153 std::stable_sort(m_negZOrderList->begin(), m_negZOrderList->end(), compa
reZIndex); | 153 std::stable_sort(m_negZOrderList->begin(), m_negZOrderList->end(), compa
reZIndex); |
154 | 154 |
155 // Append layers for top layer elements after normal layer collection, to en
sure they are on top regardless of z-indexes. | 155 // Append layers for top layer elements after normal layer collection, to en
sure they are on top regardless of z-indexes. |
156 // The renderers of top layer elements are children of the view, sorted in t
op layer stacking order. | 156 // The renderers of top layer elements are children of the view, sorted in t
op layer stacking order. |
157 if (layer()->isRootLayer()) { | 157 if (layer()->isRootLayer()) { |
158 RenderView* view = renderer()->view(); | 158 RenderView* view = renderer()->view(); |
159 for (RenderObject* child = view->firstChild(); child; child = child->nex
tSibling()) { | 159 for (RenderObject* child = view->firstChild(); child; child = child->nex
tSibling()) { |
160 Element* childElement = (child->node() && child->node()->isElementNo
de()) ? toElement(child->node()) : 0; | 160 Element* childElement = (child->node() && child->node()->isElementNo
de()) ? toElement(child->node()) : 0; |
161 if (childElement && childElement->isInTopLayer()) { | 161 if (childElement && childElement->isInTopLayer()) { |
162 RenderLayer* layer = toRenderLayerModelObject(child)->layer(); | 162 Layer* layer = toLayoutLayerModelObject(child)->layer(); |
163 // Create the buffer if it doesn't exist yet. | 163 // Create the buffer if it doesn't exist yet. |
164 if (!m_posZOrderList) | 164 if (!m_posZOrderList) |
165 m_posZOrderList = adoptPtr(new Vector<RenderLayerStackingNod
e*>); | 165 m_posZOrderList = adoptPtr(new Vector<LayerStackingNode*>); |
166 m_posZOrderList->append(layer->stackingNode()); | 166 m_posZOrderList->append(layer->stackingNode()); |
167 } | 167 } |
168 } | 168 } |
169 } | 169 } |
170 | 170 |
171 #if ENABLE(ASSERT) | 171 #if ENABLE(ASSERT) |
172 updateStackingParentForZOrderLists(this); | 172 updateStackingParentForZOrderLists(this); |
173 #endif | 173 #endif |
174 | 174 |
175 m_zOrderListsDirty = false; | 175 m_zOrderListsDirty = false; |
176 } | 176 } |
177 | 177 |
178 void RenderLayerStackingNode::updateNormalFlowList() | 178 void LayerStackingNode::updateNormalFlowList() |
179 { | 179 { |
180 if (!m_normalFlowListDirty) | 180 if (!m_normalFlowListDirty) |
181 return; | 181 return; |
182 | 182 |
183 ASSERT(m_layerListMutationAllowed); | 183 ASSERT(m_layerListMutationAllowed); |
184 | 184 |
185 for (RenderLayer* child = layer()->firstChild(); child; child = child->nextS
ibling()) { | 185 for (Layer* child = layer()->firstChild(); child; child = child->nextSibling
()) { |
186 if (child->stackingNode()->isNormalFlowOnly() && (!layer()->reflectionIn
fo() || layer()->reflectionInfo()->reflectionLayer() != child)) { | 186 if (child->stackingNode()->isNormalFlowOnly() && (!layer()->reflectionIn
fo() || layer()->reflectionInfo()->reflectionLayer() != child)) { |
187 if (!m_normalFlowList) | 187 if (!m_normalFlowList) |
188 m_normalFlowList = adoptPtr(new Vector<RenderLayerStackingNode*>
); | 188 m_normalFlowList = adoptPtr(new Vector<LayerStackingNode*>); |
189 m_normalFlowList->append(child->stackingNode()); | 189 m_normalFlowList->append(child->stackingNode()); |
190 } | 190 } |
191 } | 191 } |
192 | 192 |
193 #if ENABLE(ASSERT) | 193 #if ENABLE(ASSERT) |
194 updateStackingParentForNormalFlowList(this); | 194 updateStackingParentForNormalFlowList(this); |
195 #endif | 195 #endif |
196 | 196 |
197 m_normalFlowListDirty = false; | 197 m_normalFlowListDirty = false; |
198 } | 198 } |
199 | 199 |
200 void RenderLayerStackingNode::collectLayers(OwnPtr<Vector<RenderLayerStackingNod
e*> >& posBuffer, OwnPtr<Vector<RenderLayerStackingNode*> >& negBuffer) | 200 void LayerStackingNode::collectLayers(OwnPtr<Vector<LayerStackingNode*>>& posBuf
fer, OwnPtr<Vector<LayerStackingNode*>>& negBuffer) |
201 { | 201 { |
202 if (layer()->isInTopLayer()) | 202 if (layer()->isInTopLayer()) |
203 return; | 203 return; |
204 | 204 |
205 if (!isNormalFlowOnly()) { | 205 if (!isNormalFlowOnly()) { |
206 OwnPtr<Vector<RenderLayerStackingNode*> >& buffer = (zIndex() >= 0) ? po
sBuffer : negBuffer; | 206 OwnPtr<Vector<LayerStackingNode*>>& buffer = (zIndex() >= 0) ? posBuffer
: negBuffer; |
207 if (!buffer) | 207 if (!buffer) |
208 buffer = adoptPtr(new Vector<RenderLayerStackingNode*>); | 208 buffer = adoptPtr(new Vector<LayerStackingNode*>); |
209 buffer->append(this); | 209 buffer->append(this); |
210 } | 210 } |
211 | 211 |
212 if (!isStackingContext()) { | 212 if (!isStackingContext()) { |
213 for (RenderLayer* child = layer()->firstChild(); child; child = child->n
extSibling()) { | 213 for (Layer* child = layer()->firstChild(); child; child = child->nextSib
ling()) { |
214 if (!layer()->reflectionInfo() || layer()->reflectionInfo()->reflect
ionLayer() != child) | 214 if (!layer()->reflectionInfo() || layer()->reflectionInfo()->reflect
ionLayer() != child) |
215 child->stackingNode()->collectLayers(posBuffer, negBuffer); | 215 child->stackingNode()->collectLayers(posBuffer, negBuffer); |
216 } | 216 } |
217 } | 217 } |
218 } | 218 } |
219 | 219 |
220 #if ENABLE(ASSERT) | 220 #if ENABLE(ASSERT) |
221 bool RenderLayerStackingNode::isInStackingParentZOrderLists() const | 221 bool LayerStackingNode::isInStackingParentZOrderLists() const |
222 { | 222 { |
223 if (!m_stackingParent || m_stackingParent->zOrderListsDirty()) | 223 if (!m_stackingParent || m_stackingParent->zOrderListsDirty()) |
224 return false; | 224 return false; |
225 | 225 |
226 if (m_stackingParent->posZOrderList() && m_stackingParent->posZOrderList()->
find(this) != kNotFound) | 226 if (m_stackingParent->posZOrderList() && m_stackingParent->posZOrderList()->
find(this) != kNotFound) |
227 return true; | 227 return true; |
228 | 228 |
229 if (m_stackingParent->negZOrderList() && m_stackingParent->negZOrderList()->
find(this) != kNotFound) | 229 if (m_stackingParent->negZOrderList() && m_stackingParent->negZOrderList()->
find(this) != kNotFound) |
230 return true; | 230 return true; |
231 | 231 |
232 return false; | 232 return false; |
233 } | 233 } |
234 | 234 |
235 bool RenderLayerStackingNode::isInStackingParentNormalFlowList() const | 235 bool LayerStackingNode::isInStackingParentNormalFlowList() const |
236 { | 236 { |
237 if (!m_stackingParent || m_stackingParent->normalFlowListDirty()) | 237 if (!m_stackingParent || m_stackingParent->normalFlowListDirty()) |
238 return false; | 238 return false; |
239 | 239 |
240 return (m_stackingParent->normalFlowList() && m_stackingParent->normalFlowLi
st()->find(this) != kNotFound); | 240 return (m_stackingParent->normalFlowList() && m_stackingParent->normalFlowLi
st()->find(this) != kNotFound); |
241 } | 241 } |
242 | 242 |
243 void RenderLayerStackingNode::updateStackingParentForZOrderLists(RenderLayerStac
kingNode* stackingParent) | 243 void LayerStackingNode::updateStackingParentForZOrderLists(LayerStackingNode* st
ackingParent) |
244 { | 244 { |
245 if (m_posZOrderList) { | 245 if (m_posZOrderList) { |
246 for (size_t i = 0; i < m_posZOrderList->size(); ++i) | 246 for (size_t i = 0; i < m_posZOrderList->size(); ++i) |
247 m_posZOrderList->at(i)->setStackingParent(stackingParent); | 247 m_posZOrderList->at(i)->setStackingParent(stackingParent); |
248 } | 248 } |
249 | 249 |
250 if (m_negZOrderList) { | 250 if (m_negZOrderList) { |
251 for (size_t i = 0; i < m_negZOrderList->size(); ++i) | 251 for (size_t i = 0; i < m_negZOrderList->size(); ++i) |
252 m_negZOrderList->at(i)->setStackingParent(stackingParent); | 252 m_negZOrderList->at(i)->setStackingParent(stackingParent); |
253 } | 253 } |
254 } | 254 } |
255 | 255 |
256 void RenderLayerStackingNode::updateStackingParentForNormalFlowList(RenderLayerS
tackingNode* stackingParent) | 256 void LayerStackingNode::updateStackingParentForNormalFlowList(LayerStackingNode*
stackingParent) |
257 { | 257 { |
258 if (m_normalFlowList) { | 258 if (m_normalFlowList) { |
259 for (size_t i = 0; i < m_normalFlowList->size(); ++i) | 259 for (size_t i = 0; i < m_normalFlowList->size(); ++i) |
260 m_normalFlowList->at(i)->setStackingParent(stackingParent); | 260 m_normalFlowList->at(i)->setStackingParent(stackingParent); |
261 } | 261 } |
262 } | 262 } |
263 #endif | 263 #endif |
264 | 264 |
265 void RenderLayerStackingNode::updateLayerListsIfNeeded() | 265 void LayerStackingNode::updateLayerListsIfNeeded() |
266 { | 266 { |
267 updateZOrderLists(); | 267 updateZOrderLists(); |
268 updateNormalFlowList(); | 268 updateNormalFlowList(); |
269 | 269 |
270 if (!layer()->reflectionInfo()) | 270 if (!layer()->reflectionInfo()) |
271 return; | 271 return; |
272 | 272 |
273 RenderLayer* reflectionLayer = layer()->reflectionInfo()->reflectionLayer(); | 273 Layer* reflectionLayer = layer()->reflectionInfo()->reflectionLayer(); |
274 reflectionLayer->stackingNode()->updateZOrderLists(); | 274 reflectionLayer->stackingNode()->updateZOrderLists(); |
275 reflectionLayer->stackingNode()->updateNormalFlowList(); | 275 reflectionLayer->stackingNode()->updateNormalFlowList(); |
276 } | 276 } |
277 | 277 |
278 void RenderLayerStackingNode::updateStackingNodesAfterStyleChange(const RenderSt
yle* oldStyle) | 278 void LayerStackingNode::updateStackingNodesAfterStyleChange(const RenderStyle* o
ldStyle) |
279 { | 279 { |
280 bool wasStackingContext = oldStyle ? !oldStyle->hasAutoZIndex() : false; | 280 bool wasStackingContext = oldStyle ? !oldStyle->hasAutoZIndex() : false; |
281 int oldZIndex = oldStyle ? oldStyle->zIndex() : 0; | 281 int oldZIndex = oldStyle ? oldStyle->zIndex() : 0; |
282 | 282 |
283 bool isStackingContext = this->isStackingContext(); | 283 bool isStackingContext = this->isStackingContext(); |
284 if (isStackingContext == wasStackingContext && oldZIndex == zIndex()) | 284 if (isStackingContext == wasStackingContext && oldZIndex == zIndex()) |
285 return; | 285 return; |
286 | 286 |
287 dirtyStackingContextZOrderLists(); | 287 dirtyStackingContextZOrderLists(); |
288 | 288 |
289 if (isStackingContext) | 289 if (isStackingContext) |
290 dirtyZOrderLists(); | 290 dirtyZOrderLists(); |
291 else | 291 else |
292 clearZOrderLists(); | 292 clearZOrderLists(); |
293 } | 293 } |
294 | 294 |
295 // FIXME: Rename shouldBeNormalFlowOnly to something more accurate now that CSS | 295 // FIXME: Rename shouldBeNormalFlowOnly to something more accurate now that CSS |
296 // 2.1 defines the term "normal flow". | 296 // 2.1 defines the term "normal flow". |
297 bool RenderLayerStackingNode::shouldBeNormalFlowOnly() const | 297 bool LayerStackingNode::shouldBeNormalFlowOnly() const |
298 { | 298 { |
299 return !isStackingContext() && !renderer()->isPositioned(); | 299 return !isStackingContext() && !renderer()->isPositioned(); |
300 } | 300 } |
301 | 301 |
302 void RenderLayerStackingNode::updateIsNormalFlowOnly() | 302 void LayerStackingNode::updateIsNormalFlowOnly() |
303 { | 303 { |
304 bool isNormalFlowOnly = shouldBeNormalFlowOnly(); | 304 bool isNormalFlowOnly = shouldBeNormalFlowOnly(); |
305 if (isNormalFlowOnly == this->isNormalFlowOnly()) | 305 if (isNormalFlowOnly == this->isNormalFlowOnly()) |
306 return; | 306 return; |
307 | 307 |
308 m_isNormalFlowOnly = isNormalFlowOnly; | 308 m_isNormalFlowOnly = isNormalFlowOnly; |
309 if (RenderLayer* p = layer()->parent()) | 309 if (Layer* p = layer()->parent()) |
310 p->stackingNode()->dirtyNormalFlowList(); | 310 p->stackingNode()->dirtyNormalFlowList(); |
311 dirtyStackingContextZOrderLists(); | 311 dirtyStackingContextZOrderLists(); |
312 } | 312 } |
313 | 313 |
314 RenderLayerStackingNode* RenderLayerStackingNode::ancestorStackingContextNode()
const | 314 LayerStackingNode* LayerStackingNode::ancestorStackingContextNode() const |
315 { | 315 { |
316 for (RenderLayer* ancestor = layer()->parent(); ancestor; ancestor = ancesto
r->parent()) { | 316 for (Layer* ancestor = layer()->parent(); ancestor; ancestor = ancestor->par
ent()) { |
317 RenderLayerStackingNode* stackingNode = ancestor->stackingNode(); | 317 LayerStackingNode* stackingNode = ancestor->stackingNode(); |
318 if (stackingNode->isStackingContext()) | 318 if (stackingNode->isStackingContext()) |
319 return stackingNode; | 319 return stackingNode; |
320 } | 320 } |
321 return 0; | 321 return 0; |
322 } | 322 } |
323 | 323 |
324 RenderLayerModelObject* RenderLayerStackingNode::renderer() const | 324 LayoutLayerModelObject* LayerStackingNode::renderer() const |
325 { | 325 { |
326 return m_layer->renderer(); | 326 return m_layer->renderer(); |
327 } | 327 } |
328 | 328 |
329 } // namespace blink | 329 } // namespace blink |
OLD | NEW |