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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 // Sort the two lists. | 161 // Sort the two lists. |
162 if (m_posZOrderList) | 162 if (m_posZOrderList) |
163 std::stable_sort(m_posZOrderList->begin(), m_posZOrderList->end(), compa
reZIndex); | 163 std::stable_sort(m_posZOrderList->begin(), m_posZOrderList->end(), compa
reZIndex); |
164 | 164 |
165 if (m_negZOrderList) | 165 if (m_negZOrderList) |
166 std::stable_sort(m_negZOrderList->begin(), m_negZOrderList->end(), compa
reZIndex); | 166 std::stable_sort(m_negZOrderList->begin(), m_negZOrderList->end(), compa
reZIndex); |
167 | 167 |
168 // Append layers for top layer elements after normal layer collection, to en
sure they are on top regardless of z-indexes. | 168 // Append layers for top layer elements after normal layer collection, to en
sure they are on top regardless of z-indexes. |
169 // The renderers of top layer elements are children of the view, sorted in t
op layer stacking order. | 169 // The renderers of top layer elements are children of the view, sorted in t
op layer stacking order. |
170 if (layer()->isRootLayer()) { | 170 if (layer()->isRootLayer()) { |
171 RenderObject* view = renderer()->view(); | 171 RenderView* view = renderer()->view(); |
172 for (RenderObject* child = view->firstChild(); child; child = child->nex
tSibling()) { | 172 for (RenderObject* child = view->firstChild(); child; child = child->nex
tSibling()) { |
173 Element* childElement = (child->node() && child->node()->isElementNo
de()) ? toElement(child->node()) : 0; | 173 Element* childElement = (child->node() && child->node()->isElementNo
de()) ? toElement(child->node()) : 0; |
174 if (childElement && childElement->isInTopLayer()) { | 174 if (childElement && childElement->isInTopLayer()) { |
175 RenderLayer* layer = toRenderLayerModelObject(child)->layer(); | 175 RenderLayer* layer = toRenderLayerModelObject(child)->layer(); |
176 // Create the buffer if it doesn't exist yet. | 176 // Create the buffer if it doesn't exist yet. |
177 if (!m_posZOrderList) | 177 if (!m_posZOrderList) |
178 m_posZOrderList = adoptPtr(new Vector<RenderLayerStackingNod
e*>); | 178 m_posZOrderList = adoptPtr(new Vector<RenderLayerStackingNod
e*>); |
179 m_posZOrderList->append(layer->stackingNode()); | 179 m_posZOrderList->append(layer->stackingNode()); |
180 } | 180 } |
181 } | 181 } |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 return ancestor->stackingNode(); | 372 return ancestor->stackingNode(); |
373 return 0; | 373 return 0; |
374 } | 374 } |
375 | 375 |
376 RenderLayerModelObject* RenderLayerStackingNode::renderer() const | 376 RenderLayerModelObject* RenderLayerStackingNode::renderer() const |
377 { | 377 { |
378 return m_layer->renderer(); | 378 return m_layer->renderer(); |
379 } | 379 } |
380 | 380 |
381 } // namespace WebCore | 381 } // namespace WebCore |
OLD | NEW |