Chromium Code Reviews| 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 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 526 { | 526 { |
| 527 if (!RuntimeEnabledFeatures::cssCompositingEnabled()) | 527 if (!RuntimeEnabledFeatures::cssCompositingEnabled()) |
| 528 return; | 528 return; |
| 529 | 529 |
| 530 bool hadBlendMode = m_blendMode != BlendModeNormal; | 530 bool hadBlendMode = m_blendMode != BlendModeNormal; |
| 531 BlendMode newBlendMode = renderer()->style()->blendMode(); | 531 BlendMode newBlendMode = renderer()->style()->blendMode(); |
| 532 if (newBlendMode != m_blendMode) { | 532 if (newBlendMode != m_blendMode) { |
| 533 m_blendMode = newBlendMode; | 533 m_blendMode = newBlendMode; |
| 534 | 534 |
| 535 // Only update the flag if a blend mode is set or unset. | 535 // Only update the flag if a blend mode is set or unset. |
| 536 if (!hadBlendMode || !hasBlendMode()) | 536 if (parent() && (!hadBlendMode || !hasBlendMode())) |
|
Stephen Chennney
2013/11/27 13:06:26
My only concern is that, without a parent, should
rosca
2013/11/27 13:34:08
If we change the blendMode for an element we shoul
| |
| 537 dirtyAncestorChainBlendedDescendantStatus(); | 537 parent()->dirtyAncestorChainBlendedDescendantStatus(); |
| 538 | 538 |
| 539 if (hasCompositedLayerMapping()) | 539 if (hasCompositedLayerMapping()) |
| 540 compositedLayerMapping()->setBlendMode(newBlendMode); | 540 compositedLayerMapping()->setBlendMode(newBlendMode); |
| 541 } | 541 } |
| 542 } | 542 } |
| 543 | 543 |
| 544 void RenderLayer::updateTransform() | 544 void RenderLayer::updateTransform() |
| 545 { | 545 { |
| 546 // hasTransform() on the renderer is also true when there is transform-style : preserve-3d or perspective set, | 546 // hasTransform() on the renderer is also true when there is transform-style : preserve-3d or perspective set, |
| 547 // so check style too. | 547 // so check style too. |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 854 if (m_hasVisibleDescendant && m_hasSelfPaintingLayerDescendant && ha sOutOfFlowPositionedDescendant) | 854 if (m_hasVisibleDescendant && m_hasSelfPaintingLayerDescendant && ha sOutOfFlowPositionedDescendant) |
| 855 break; | 855 break; |
| 856 } | 856 } |
| 857 | 857 |
| 858 m_visibleDescendantStatusDirty = false; | 858 m_visibleDescendantStatusDirty = false; |
| 859 m_hasSelfPaintingLayerDescendantDirty = false; | 859 m_hasSelfPaintingLayerDescendantDirty = false; |
| 860 m_hasOutOfFlowPositionedDescendantDirty = false; | 860 m_hasOutOfFlowPositionedDescendantDirty = false; |
| 861 } | 861 } |
| 862 | 862 |
| 863 if (m_childLayerHasBlendModeStatusDirty) { | 863 if (m_childLayerHasBlendModeStatusDirty) { |
| 864 m_childLayerHasBlendMode = false; | |
| 864 for (RenderLayer* child = firstChild(); child; child = child->nextSiblin g()) { | 865 for (RenderLayer* child = firstChild(); child; child = child->nextSiblin g()) { |
| 865 if (!child->stackingNode()->isStackingContext()) | 866 if (!child->stackingNode()->isStackingContext()) |
| 866 child->updateDescendantDependentFlags(); | 867 child->updateDescendantDependentFlags(); |
| 867 | 868 |
| 868 bool childLayerHasBlendMode = child->paintsWithBlendMode() || (child ->m_childLayerHasBlendMode && !child->stackingNode()->isStackingContext()); | 869 bool childLayerHasBlendMode = child->paintsWithBlendMode() || (child ->m_childLayerHasBlendMode && !child->stackingNode()->isStackingContext()); |
| 869 m_childLayerHasBlendMode |= childLayerHasBlendMode; | 870 m_childLayerHasBlendMode |= childLayerHasBlendMode; |
| 870 | 871 |
| 871 if (m_childLayerHasBlendMode) | 872 if (m_childLayerHasBlendMode) |
| 872 break; | 873 break; |
| 873 } | 874 } |
| (...skipping 3287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4161 } | 4162 } |
| 4162 } | 4163 } |
| 4163 | 4164 |
| 4164 void showLayerTree(const WebCore::RenderObject* renderer) | 4165 void showLayerTree(const WebCore::RenderObject* renderer) |
| 4165 { | 4166 { |
| 4166 if (!renderer) | 4167 if (!renderer) |
| 4167 return; | 4168 return; |
| 4168 showLayerTree(renderer->enclosingLayer()); | 4169 showLayerTree(renderer->enclosingLayer()); |
| 4169 } | 4170 } |
| 4170 #endif | 4171 #endif |
| OLD | NEW |