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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
301 dirtyStackingContextZOrderLists(); | 301 dirtyStackingContextZOrderLists(); |
302 | 302 |
303 if (isStackingContext) | 303 if (isStackingContext) |
304 dirtyZOrderLists(); | 304 dirtyZOrderLists(); |
305 else | 305 else |
306 clearZOrderLists(); | 306 clearZOrderLists(); |
307 } | 307 } |
308 | 308 |
309 bool RenderLayerStackingNode::shouldBeNormalFlowOnly() const | 309 bool RenderLayerStackingNode::shouldBeNormalFlowOnly() const |
310 { | 310 { |
311 RenderLayerModelObject* renderer = this->renderer(); | 311 return !isStackingContext() && !renderer()->isPositioned(); |
Julien - ping for review
2014/06/03 00:53:20
Based on the comments in the file, it really looks
| |
312 | |
313 const bool couldBeNormalFlow = renderer->hasOverflowClip() | |
314 || renderer->hasReflection() | |
315 || renderer->hasMask() | |
316 || renderer->isCanvas() | |
317 || renderer->isVideo() | |
318 || renderer->isEmbeddedObject() | |
319 || renderer->isRenderIFrame() | |
320 || (renderer->style()->specifiesColumns() && !layer()->isRootLayer()); | |
321 | |
322 const bool preventsElementFromBeingNormalFlow = renderer->isPositioned() | |
323 || renderer->hasTransform() | |
324 || renderer->hasClipPath() | |
325 || renderer->hasFilter() | |
326 || renderer->hasBlendMode() | |
327 || layer()->isTransparent(); | |
328 | |
329 return couldBeNormalFlow && !preventsElementFromBeingNormalFlow; | |
330 } | 312 } |
331 | 313 |
332 void RenderLayerStackingNode::updateIsNormalFlowOnly() | 314 void RenderLayerStackingNode::updateIsNormalFlowOnly() |
333 { | 315 { |
334 bool isNormalFlowOnly = shouldBeNormalFlowOnly(); | 316 bool isNormalFlowOnly = shouldBeNormalFlowOnly(); |
335 if (isNormalFlowOnly == this->isNormalFlowOnly()) | 317 if (isNormalFlowOnly == this->isNormalFlowOnly()) |
336 return; | 318 return; |
337 | 319 |
338 m_isNormalFlowOnly = isNormalFlowOnly; | 320 m_isNormalFlowOnly = isNormalFlowOnly; |
339 if (RenderLayer* p = layer()->parent()) | 321 if (RenderLayer* p = layer()->parent()) |
(...skipping 10 matching lines...) Expand all Loading... | |
350 } | 332 } |
351 return 0; | 333 return 0; |
352 } | 334 } |
353 | 335 |
354 RenderLayerModelObject* RenderLayerStackingNode::renderer() const | 336 RenderLayerModelObject* RenderLayerStackingNode::renderer() const |
355 { | 337 { |
356 return m_layer->renderer(); | 338 return m_layer->renderer(); |
357 } | 339 } |
358 | 340 |
359 } // namespace WebCore | 341 } // namespace WebCore |
OLD | NEW |