| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights |
| 3 * reserved. | 3 * reserved. |
| 4 * | 4 * |
| 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
| 6 * | 6 * |
| 7 * Other contributors: | 7 * Other contributors: |
| 8 * Robert O'Callahan <roc+@cs.cmu.edu> | 8 * Robert O'Callahan <roc+@cs.cmu.edu> |
| 9 * David Baron <dbaron@fas.harvard.edu> | 9 * David Baron <dbaron@fas.harvard.edu> |
| 10 * Christian Biesinger <cbiesinger@web.de> | 10 * Christian Biesinger <cbiesinger@web.de> |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 Element* childElement = (child->node() && child->node()->isElementNode()) | 155 Element* childElement = (child->node() && child->node()->isElementNode()) |
| 156 ? toElement(child->node()) | 156 ? toElement(child->node()) |
| 157 : 0; | 157 : 0; |
| 158 if (childElement && childElement->isInTopLayer()) { | 158 if (childElement && childElement->isInTopLayer()) { |
| 159 PaintLayer* layer = toLayoutBoxModelObject(child)->layer(); | 159 PaintLayer* layer = toLayoutBoxModelObject(child)->layer(); |
| 160 // Create the buffer if it doesn't exist yet. | 160 // Create the buffer if it doesn't exist yet. |
| 161 if (!m_posZOrderList) { | 161 if (!m_posZOrderList) { |
| 162 m_posZOrderList = | 162 m_posZOrderList = |
| 163 WTF::wrapUnique(new Vector<PaintLayerStackingNode*>); | 163 WTF::wrapUnique(new Vector<PaintLayerStackingNode*>); |
| 164 } | 164 } |
| 165 m_posZOrderList->append(layer->stackingNode()); | 165 m_posZOrderList->push_back(layer->stackingNode()); |
| 166 } | 166 } |
| 167 } | 167 } |
| 168 } | 168 } |
| 169 | 169 |
| 170 #if ENABLE(ASSERT) | 170 #if ENABLE(ASSERT) |
| 171 updateStackingParentForZOrderLists(this); | 171 updateStackingParentForZOrderLists(this); |
| 172 #endif | 172 #endif |
| 173 | 173 |
| 174 m_zOrderListsDirty = false; | 174 m_zOrderListsDirty = false; |
| 175 } | 175 } |
| 176 | 176 |
| 177 void PaintLayerStackingNode::collectLayers( | 177 void PaintLayerStackingNode::collectLayers( |
| 178 std::unique_ptr<Vector<PaintLayerStackingNode*>>& posBuffer, | 178 std::unique_ptr<Vector<PaintLayerStackingNode*>>& posBuffer, |
| 179 std::unique_ptr<Vector<PaintLayerStackingNode*>>& negBuffer) { | 179 std::unique_ptr<Vector<PaintLayerStackingNode*>>& negBuffer) { |
| 180 if (layer()->isInTopLayer()) | 180 if (layer()->isInTopLayer()) |
| 181 return; | 181 return; |
| 182 | 182 |
| 183 if (isStacked()) { | 183 if (isStacked()) { |
| 184 std::unique_ptr<Vector<PaintLayerStackingNode*>>& buffer = | 184 std::unique_ptr<Vector<PaintLayerStackingNode*>>& buffer = |
| 185 (zIndex() >= 0) ? posBuffer : negBuffer; | 185 (zIndex() >= 0) ? posBuffer : negBuffer; |
| 186 if (!buffer) | 186 if (!buffer) |
| 187 buffer = WTF::wrapUnique(new Vector<PaintLayerStackingNode*>); | 187 buffer = WTF::wrapUnique(new Vector<PaintLayerStackingNode*>); |
| 188 buffer->append(this); | 188 buffer->push_back(this); |
| 189 } | 189 } |
| 190 | 190 |
| 191 if (!isStackingContext()) { | 191 if (!isStackingContext()) { |
| 192 for (PaintLayer* child = layer()->firstChild(); child; | 192 for (PaintLayer* child = layer()->firstChild(); child; |
| 193 child = child->nextSibling()) | 193 child = child->nextSibling()) |
| 194 child->stackingNode()->collectLayers(posBuffer, negBuffer); | 194 child->stackingNode()->collectLayers(posBuffer, negBuffer); |
| 195 } | 195 } |
| 196 } | 196 } |
| 197 | 197 |
| 198 #if ENABLE(ASSERT) | 198 #if ENABLE(ASSERT) |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 return stackingNode; | 263 return stackingNode; |
| 264 } | 264 } |
| 265 return 0; | 265 return 0; |
| 266 } | 266 } |
| 267 | 267 |
| 268 LayoutBoxModelObject* PaintLayerStackingNode::layoutObject() const { | 268 LayoutBoxModelObject* PaintLayerStackingNode::layoutObject() const { |
| 269 return m_layer->layoutObject(); | 269 return m_layer->layoutObject(); |
| 270 } | 270 } |
| 271 | 271 |
| 272 } // namespace blink | 272 } // namespace blink |
| OLD | NEW |