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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 rootBlock->multiColumnFlowThread()) | 151 rootBlock->multiColumnFlowThread()) |
152 rootBlock = multiColumnFlowThread; | 152 rootBlock = multiColumnFlowThread; |
153 for (LayoutObject* child = rootBlock->firstChild(); child; | 153 for (LayoutObject* child = rootBlock->firstChild(); child; |
154 child = child->nextSibling()) { | 154 child = child->nextSibling()) { |
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 = wrapUnique(new Vector<PaintLayerStackingNode*>); | 162 m_posZOrderList = |
| 163 WTF::wrapUnique(new Vector<PaintLayerStackingNode*>); |
| 164 } |
163 m_posZOrderList->append(layer->stackingNode()); | 165 m_posZOrderList->append(layer->stackingNode()); |
164 } | 166 } |
165 } | 167 } |
166 } | 168 } |
167 | 169 |
168 #if ENABLE(ASSERT) | 170 #if ENABLE(ASSERT) |
169 updateStackingParentForZOrderLists(this); | 171 updateStackingParentForZOrderLists(this); |
170 #endif | 172 #endif |
171 | 173 |
172 m_zOrderListsDirty = false; | 174 m_zOrderListsDirty = false; |
173 } | 175 } |
174 | 176 |
175 void PaintLayerStackingNode::collectLayers( | 177 void PaintLayerStackingNode::collectLayers( |
176 std::unique_ptr<Vector<PaintLayerStackingNode*>>& posBuffer, | 178 std::unique_ptr<Vector<PaintLayerStackingNode*>>& posBuffer, |
177 std::unique_ptr<Vector<PaintLayerStackingNode*>>& negBuffer) { | 179 std::unique_ptr<Vector<PaintLayerStackingNode*>>& negBuffer) { |
178 if (layer()->isInTopLayer()) | 180 if (layer()->isInTopLayer()) |
179 return; | 181 return; |
180 | 182 |
181 if (isStacked()) { | 183 if (isStacked()) { |
182 std::unique_ptr<Vector<PaintLayerStackingNode*>>& buffer = | 184 std::unique_ptr<Vector<PaintLayerStackingNode*>>& buffer = |
183 (zIndex() >= 0) ? posBuffer : negBuffer; | 185 (zIndex() >= 0) ? posBuffer : negBuffer; |
184 if (!buffer) | 186 if (!buffer) |
185 buffer = wrapUnique(new Vector<PaintLayerStackingNode*>); | 187 buffer = WTF::wrapUnique(new Vector<PaintLayerStackingNode*>); |
186 buffer->append(this); | 188 buffer->append(this); |
187 } | 189 } |
188 | 190 |
189 if (!isStackingContext()) { | 191 if (!isStackingContext()) { |
190 for (PaintLayer* child = layer()->firstChild(); child; | 192 for (PaintLayer* child = layer()->firstChild(); child; |
191 child = child->nextSibling()) | 193 child = child->nextSibling()) |
192 child->stackingNode()->collectLayers(posBuffer, negBuffer); | 194 child->stackingNode()->collectLayers(posBuffer, negBuffer); |
193 } | 195 } |
194 } | 196 } |
195 | 197 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 return stackingNode; | 263 return stackingNode; |
262 } | 264 } |
263 return 0; | 265 return 0; |
264 } | 266 } |
265 | 267 |
266 LayoutBoxModelObject* PaintLayerStackingNode::layoutObject() const { | 268 LayoutBoxModelObject* PaintLayerStackingNode::layoutObject() const { |
267 return m_layer->layoutObject(); | 269 return m_layer->layoutObject(); |
268 } | 270 } |
269 | 271 |
270 } // namespace blink | 272 } // namespace blink |
OLD | NEW |