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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 (LayoutObject* child = view->firstChild(); child; child = child->nex
tSibling()) { | 159 for (LayoutObject* 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 Layer* layer = toLayoutLayerModelObject(child)->layer(); | 162 Layer* layer = toLayoutBoxModelObject(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<LayerStackingNode*>); | 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); |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 LayerStackingNode* LayerStackingNode::ancestorStackingContextNode() const | 314 LayerStackingNode* LayerStackingNode::ancestorStackingContextNode() const |
315 { | 315 { |
316 for (Layer* ancestor = layer()->parent(); ancestor; ancestor = ancestor->par
ent()) { | 316 for (Layer* ancestor = layer()->parent(); ancestor; ancestor = ancestor->par
ent()) { |
317 LayerStackingNode* 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 LayoutLayerModelObject* LayerStackingNode::renderer() const | 324 LayoutBoxModelObject* 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 |