Changeset 167424 in webkit
- Timestamp:
- Apr 17, 2014 1:42:53 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 18 added
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r167406 r167424 1 2014-04-17 Ion Rosca <rosca@adobe.com> 2 3 [CSS Blending] Isolation descendant dependent flags are not updated correctly 4 https://bugs.webkit.org/show_bug.cgi?id=130892 5 6 Reviewed by Dean Jackson. 7 8 * css3/compositing/blend-mode-isolation-flags-append-non-stacking-context-blending.html: Added. 9 * css3/compositing/blend-mode-isolation-flags-append-stacking-context-blending.html: Added. 10 * css3/compositing/blend-mode-isolation-flags-remove-non-stacking-context-blending.html: Added. 11 * css3/compositing/blend-mode-isolation-flags-remove-stacking-context-blending.html: Added. 12 * css3/compositing/blend-mode-isolation-flags-turn-off-blending-no-isolation.html: Added. 13 * css3/compositing/blend-mode-isolation-flags-turn-off-blending.html: Added. 14 * css3/compositing/blend-mode-isolation-flags-turn-off-stacking-context.html: Added. 15 * css3/compositing/blend-mode-isolation-flags-turn-on-blending.html: Added. 16 * css3/compositing/blend-mode-isolation-flags-turn-on-stacking-context.html: Added. 17 * platform/mac/css3/compositing/blend-mode-background-expected.txt: 18 * platform/mac/css3/compositing/blend-mode-isolated-group-1-expected.txt: 19 * platform/mac/css3/compositing/blend-mode-isolated-group-2-expected.txt: 20 * platform/mac/css3/compositing/blend-mode-isolated-group-3-expected.txt: 21 * platform/mac/css3/compositing/blend-mode-isolation-flags-append-non-stacking-context-blending-expected.txt: Added. 22 * platform/mac/css3/compositing/blend-mode-isolation-flags-append-stacking-context-blending-expected.txt: Added. 23 * platform/mac/css3/compositing/blend-mode-isolation-flags-remove-non-stacking-context-blending-expected.txt: Added. 24 * platform/mac/css3/compositing/blend-mode-isolation-flags-remove-stacking-context-blending-expected.txt: Added. 25 * platform/mac/css3/compositing/blend-mode-isolation-flags-turn-off-blending-expected.txt: Added. 26 * platform/mac/css3/compositing/blend-mode-isolation-flags-turn-off-blending-no-isolation-expected.txt: Added. 27 * platform/mac/css3/compositing/blend-mode-isolation-flags-turn-off-stacking-context-expected.txt: Added. 28 * platform/mac/css3/compositing/blend-mode-isolation-flags-turn-on-blending-expected.txt: Added. 29 * platform/mac/css3/compositing/blend-mode-isolation-flags-turn-on-stacking-context-expected.txt: Added. 30 * platform/mac/css3/compositing/blend-mode-layers-expected.txt: 31 * platform/mac/css3/compositing/blend-mode-reflection-expected.txt: 32 * platform/mac/css3/compositing/blend-mode-simple-composited-expected.txt: 33 * platform/mac/css3/compositing/blend-mode-simple-expected.txt: 34 1 35 2014-04-16 Brian J. Burg <burg@cs.washington.edu> 2 36 -
trunk/LayoutTests/platform/mac/css3/compositing/blend-mode-background-expected.txt
r166525 r167424 1 1 layer at (0,0) size 800x600 2 2 RenderView at (0,0) size 800x600 3 layer at (0,0) size 800x100 3 layer at (0,0) size 800x100 isolatesBlending 4 4 RenderBlock {HTML} at (0,0) size 800x100 5 5 RenderBody {BODY} at (8,20) size 784x60 [bgcolor=#0000FF] -
trunk/LayoutTests/platform/mac/css3/compositing/blend-mode-isolated-group-1-expected.txt
r166525 r167424 8 8 layer at (48,48) size 60x60 blendMode: multiply 9 9 RenderBlock {DIV} at (20,20) size 60x60 [bgcolor=#008000] 10 layer at (128,28) size 60x60 10 layer at (128,28) size 60x60 isolatesBlending 11 11 RenderBlock (floating) {DIV} at (120,20) size 60x60 [bgcolor=#EE82EE] 12 12 layer at (148,48) size 60x60 blendMode: multiply 13 13 RenderBlock {DIV} at (20,20) size 60x60 [bgcolor=#008000] 14 layer at (228,28) size 60x60 14 layer at (228,28) size 60x60 isolatesBlending 15 15 RenderBlock (floating) {DIV} at (220,20) size 60x60 [bgcolor=#EE82EE] 16 16 layer at (248,48) size 60x60 blendMode: multiply 17 17 RenderBlock {DIV} at (20,20) size 60x60 [bgcolor=#008000] 18 layer at (328,28) size 60x60 18 layer at (328,28) size 60x60 isolatesBlending 19 19 RenderBlock (floating) {DIV} at (320,20) size 60x60 [bgcolor=#EE82EE] 20 20 layer at (348,48) size 60x60 blendMode: multiply -
trunk/LayoutTests/platform/mac/css3/compositing/blend-mode-isolated-group-2-expected.txt
r166525 r167424 8 8 layer at (48,48) size 60x60 blendMode: multiply 9 9 RenderBlock {DIV} at (20,20) size 60x60 [bgcolor=#008000] 10 layer at (128,28) size 60x60 10 layer at (128,28) size 60x60 isolatesBlending 11 11 RenderBlock (floating) {DIV} at (120,20) size 60x60 [bgcolor=#EE82EE] 12 12 layer at (148,48) size 60x60 blendMode: multiply 13 13 RenderBlock {DIV} at (20,20) size 60x60 [bgcolor=#008000] 14 layer at (228,28) size 60x60 14 layer at (228,28) size 60x60 isolatesBlending 15 15 RenderBlock (floating) {DIV} at (220,20) size 60x60 [bgcolor=#EE82EE] 16 16 layer at (248,48) size 60x60 blendMode: multiply 17 17 RenderBlock {DIV} at (20,20) size 60x60 [bgcolor=#008000] 18 layer at (328,28) size 60x60 18 layer at (328,28) size 60x60 isolatesBlending 19 19 RenderBlock (floating) {DIV} at (320,20) size 60x60 [bgcolor=#EE82EE] 20 20 layer at (348,48) size 60x60 blendMode: multiply -
trunk/LayoutTests/platform/mac/css3/compositing/blend-mode-isolated-group-3-expected.txt
r166525 r167424 8 8 layer at (68,68) size 60x60 9 9 RenderBlock (positioned) {DIV} at (40,40) size 60x60 [bgcolor=#FFA500] 10 layer at (128,28) size 60x60 10 layer at (128,28) size 60x60 isolatesBlending 11 11 RenderBlock (floating) zI: -1 {DIV} at (120,20) size 60x60 [bgcolor=#EE82EE] 12 12 layer at (148,48) size 60x60 blendMode: multiply … … 14 14 layer at (168,68) size 60x60 15 15 RenderBlock (positioned) {DIV} at (40,40) size 60x60 [bgcolor=#FFA500] 16 layer at (228,28) size 60x60 16 layer at (228,28) size 60x60 isolatesBlending 17 17 RenderBlock (floating) zI: -1 {DIV} at (220,20) size 60x60 [bgcolor=#EE82EE] 18 18 layer at (248,48) size 60x60 blendMode: multiply … … 20 20 layer at (268,68) size 60x60 21 21 RenderBlock (positioned) {DIV} at (20,20) size 60x60 [bgcolor=#FFA500] 22 layer at (328,28) size 60x60 22 layer at (328,28) size 60x60 isolatesBlending 23 23 RenderBlock (floating) zI: -1 {DIV} at (320,20) size 60x60 [bgcolor=#EE82EE] 24 24 layer at (348,48) size 60x60 blendMode: multiply … … 32 32 layer at (468,68) size 60x60 33 33 RenderBlock (positioned) {DIV} at (40,40) size 60x60 [bgcolor=#FFA500] 34 layer at (528,28) size 60x60 34 layer at (528,28) size 60x60 isolatesBlending 35 35 RenderBlock (floating) zI: -1 {DIV} at (520,20) size 60x60 [bgcolor=#EE82EE] 36 36 layer at (548,48) size 60x60 blendMode: multiply … … 38 38 layer at (568,68) size 60x60 39 39 RenderBlock (positioned) {DIV} at (40,40) size 60x60 [bgcolor=#FFA500] 40 layer at (628,28) size 60x60 40 layer at (628,28) size 60x60 isolatesBlending 41 41 RenderBlock (floating) zI: -1 {DIV} at (620,20) size 60x60 [bgcolor=#EE82EE] 42 42 layer at (648,48) size 60x60 blendMode: multiply … … 44 44 layer at (668,68) size 60x60 45 45 RenderBlock (positioned) {DIV} at (20,20) size 60x60 [bgcolor=#FFA500] 46 layer at (28,128) size 60x60 46 layer at (28,128) size 60x60 isolatesBlending 47 47 RenderBlock (floating) zI: -1 {DIV} at (20,120) size 60x60 [bgcolor=#EE82EE] 48 48 layer at (48,148) size 60x60 blendMode: multiply -
trunk/LayoutTests/platform/mac/css3/compositing/blend-mode-layers-expected.txt
r166525 r167424 1 1 layer at (0,0) size 800x600 2 2 RenderView at (0,0) size 800x600 3 layer at (0,0) size 800x366 3 layer at (0,0) size 800x366 isolatesBlending 4 4 RenderBlock {HTML} at (0,0) size 800x366 5 5 RenderBody {BODY} at (8,16) size 784x0 … … 38 38 layer at (53,216) size 80x150 39 39 RenderBlock (relative positioned) {DIV} at (0,0) size 80x150 [bgcolor=#FFFF00] 40 layer at (223,246) size 160x75 40 layer at (223,246) size 160x75 isolatesBlending 41 41 RenderBlock {DIV} at (0,50) size 160x75 [bgcolor=#00FFFF] 42 42 layer at (243,206) size 160x160 blendMode: multiply -
trunk/LayoutTests/platform/mac/css3/compositing/blend-mode-reflection-expected.txt
r166525 r167424 1 1 layer at (0,0) size 800x600 2 2 RenderView at (0,0) size 800x600 3 layer at (0,0) size 800x286 3 layer at (0,0) size 800x286 isolatesBlending 4 4 RenderBlock {HTML} at (0,0) size 800x286 5 5 RenderBody {BODY} at (8,16) size 784x0 -
trunk/LayoutTests/platform/mac/css3/compositing/blend-mode-simple-composited-expected.txt
r166525 r167424 1 1 layer at (0,0) size 800x600 2 2 RenderView at (0,0) size 800x600 3 layer at (0,0) size 800x576 3 layer at (0,0) size 800x576 isolatesBlending 4 4 RenderBlock {HTML} at (0,0) size 800x576 5 5 RenderBody {BODY} at (8,16) size 784x0 -
trunk/LayoutTests/platform/mac/css3/compositing/blend-mode-simple-expected.txt
r166525 r167424 1 1 layer at (0,0) size 800x600 2 2 RenderView at (0,0) size 800x600 3 layer at (0,0) size 800x576 3 layer at (0,0) size 800x576 isolatesBlending 4 4 RenderBlock {HTML} at (0,0) size 800x576 5 5 RenderBody {BODY} at (8,16) size 784x0 -
trunk/Source/WebCore/ChangeLog
r167423 r167424 1 2014-04-17 Ion Rosca <rosca@adobe.com> 2 3 [CSS Blending] Isolation descendant dependent flags are not updated correctly 4 https://bugs.webkit.org/show_bug.cgi?id=130892 5 6 Reviewed by Dean Jackson. 7 8 The isolation descendant dependent flag (m_hasUnisolatedBlendingDescendants) 9 will help us to determine if a layer should isolate blending descendants or not. 10 The m_hasUnisolatedBlendingDescendants flag should be set for layers that have blending descendant layers 11 not isolated by descendant stacking contexts. 12 An element isolatesBlending() if it has this flag set and creates stacking context. 13 14 Tests: css3/compositing/blend-mode-isolation-flags-append-non-stacking-context-blending.html 15 css3/compositing/blend-mode-isolation-flags-append-stacking-context-blending.html 16 css3/compositing/blend-mode-isolation-flags-remove-non-stacking-context-blending.html 17 css3/compositing/blend-mode-isolation-flags-remove-stacking-context-blending.html 18 css3/compositing/blend-mode-isolation-flags-turn-off-blending-no-isolation.html 19 css3/compositing/blend-mode-isolation-flags-turn-off-blending.html 20 css3/compositing/blend-mode-isolation-flags-turn-off-stacking-context.html 21 css3/compositing/blend-mode-isolation-flags-turn-on-blending.html 22 css3/compositing/blend-mode-isolation-flags-turn-on-stacking-context.html 23 24 * rendering/RenderLayer.cpp: 25 (WebCore::RenderLayer::RenderLayer): 26 (WebCore::RenderLayer::updateBlendMode): 27 (WebCore::RenderLayer::updateAncestorChainHasBlendingDescendants): 28 When a layer has blending and it hasn't had it before, we set the isolation 29 flag for all its ancestors up to the first layer creating stacking context. 30 I removed the isComposited() check here. Isolation flags should be correct regardless 31 of compositing state. Moreover, if this method is called from styleChanged(), 32 the compositing state might not be accurate, it's going to be recalculated afterwards. 33 (WebCore::RenderLayer::dirtyAncestorChainHasBlendingDescendants): 34 When a layer doesn't have blending, but it used to have it before, we mark 35 the isolation flag as dirty for all its ancestors up to the first layer 36 creating stacking context. The isolation flags will be recalculated by 37 RenderLayer::updateDescendantDependentFlags. 38 (WebCore::RenderLayer::updateDescendantDependentFlags): 39 Evaluates if the layer has unisolated blending descendants by traversing 40 the layer subtree. 41 (WebCore::RenderLayer::addChild): 42 When adding a subtree that has blending or has some unisolated descendants, 43 we set the flag for all the ancestors, up to the stacking context layer. 44 (WebCore::RenderLayer::removeChild): 45 When removing a subtree that had blending or had some unisolated descendants, 46 we dirty the flag so that it could be reevaluated. 47 (WebCore::RenderLayer::calculateClipRects): 48 (WebCore::RenderLayer::updateTransform): 49 * rendering/RenderLayer.h: 50 Rename m_hasBlendedElementInChildStackingContext => m_hasUnisolatedBlendingDescendants 51 and m_hasBlendedElementInChildStackingContextStatusDirty => m_hasUnisolatedBlendingDescendantsStatusDirty, 52 * rendering/RenderLayerCompositor.cpp: 53 (WebCore::RenderLayerCompositor::computeCompositingRequirements): 54 Add an assert to make sure that if m_hasUnisolatedCompositedBlendingDescendants is true, 55 then m_hasUnisolatedBlendingDescendants is true as well. 56 1 57 2014-04-17 Tim Horton <timothy_horton@apple.com> 2 58 -
trunk/Source/WebCore/rendering/RenderLayer.cpp
r167215 r167424 188 188 , m_blendMode(BlendModeNormal) 189 189 , m_hasUnisolatedCompositedBlendingDescendants(false) 190 , m_has BlendedElementInChildStackingContext(false)191 , m_has BlendedElementInChildStackingContextStatusDirty(false)190 , m_hasUnisolatedBlendingDescendants(false) 191 , m_hasUnisolatedBlendingDescendantsStatusDirty(false) 192 192 #endif 193 193 , m_renderer(rendererLayerModelObject) … … 809 809 { 810 810 bool hadBlendMode = m_blendMode != BlendModeNormal; 811 if ( hadBlendMode != hasBlendMode()) {811 if (parent() && hadBlendMode != hasBlendMode()) { 812 812 if (hasBlendMode()) 813 updateNonCompositedParentStackingContextHasBlendedChild(true);813 parent()->updateAncestorChainHasBlendingDescendants(); 814 814 else 815 dirtyAncestorParentStackingContextHasBlendedElement();815 parent()->dirtyAncestorChainHasBlendingDescendants(); 816 816 } 817 817 … … 821 821 } 822 822 823 void RenderLayer::updateNonCompositedParentStackingContextHasBlendedChild(bool hasBlendedChild) 824 { 825 if (isComposited()) 826 return; 827 828 for (auto ancestor = parent(); ancestor && !ancestor->isComposited() && !ancestor->renderer().isRoot(); ancestor = ancestor->parent()) { 829 ancestor->m_hasBlendedElementInChildStackingContext = hasBlendedChild; 830 831 if (ancestor->isStackingContext()) 823 void RenderLayer::updateAncestorChainHasBlendingDescendants() 824 { 825 for (auto layer = this; layer; layer = layer->parent()) { 826 if (!layer->hasUnisolatedBlendingDescendantsStatusDirty() && layer->hasUnisolatedBlendingDescendants()) 832 827 break; 833 } 834 } 835 836 void RenderLayer::dirtyAncestorParentStackingContextHasBlendedElement() 837 { 838 for (auto layer = this; layer && !layer->isComposited() && !layer->m_hasBlendedElementInChildStackingContextStatusDirty; layer = layer->parent()) { 839 layer->m_hasBlendedElementInChildStackingContextStatusDirty = true; 828 layer->m_hasUnisolatedBlendingDescendants = true; 829 layer->m_hasUnisolatedBlendingDescendantsStatusDirty = false; 840 830 841 831 if (layer->isStackingContext()) … … 844 834 } 845 835 846 bool RenderLayer::nonCompositedParentStackingContextHasBlendedChild() const 847 { 848 for (auto ancestor = parent(); ancestor && !ancestor->isComposited() && !ancestor->renderer().isRoot(); ancestor = ancestor->parent()) { 849 if (ancestor->isStackingContext()) 850 return ancestor->hasBlendedElementInChildStackingContext(); 851 } 852 853 return false; 854 } 855 836 void RenderLayer::dirtyAncestorChainHasBlendingDescendants() 837 { 838 for (auto layer = this; layer; layer = layer->parent()) { 839 if (layer->hasUnisolatedBlendingDescendantsStatusDirty()) 840 break; 841 842 layer->m_hasUnisolatedBlendingDescendantsStatusDirty = true; 843 844 if (layer->isStackingContext()) 845 break; 846 } 847 } 856 848 #endif 857 849 … … 1098 1090 void RenderLayer::updateDescendantDependentFlags(HashSet<const RenderObject*>* outOfFlowDescendantContainingBlocks) 1099 1091 { 1100 if (m_visibleDescendantStatusDirty || m_hasSelfPaintingLayerDescendantDirty || m_hasOutOfFlowPositionedDescendantDirty || has BlendedElementInChildStackingContextStatusDirty()) {1092 if (m_visibleDescendantStatusDirty || m_hasSelfPaintingLayerDescendantDirty || m_hasOutOfFlowPositionedDescendantDirty || hasUnisolatedBlendingDescendantsStatusDirty()) { 1101 1093 m_hasVisibleDescendant = false; 1102 1094 m_hasSelfPaintingLayerDescendant = false; 1103 1095 m_hasOutOfFlowPositionedDescendant = false; 1104 setHasBlendedElementInChildStackingContext(false); 1096 #if ENABLE(CSS_COMPOSITING) 1097 m_hasUnisolatedBlendingDescendants = false; 1098 #endif 1105 1099 1106 1100 HashSet<const RenderObject*> childOutOfFlowDescendantContainingBlocks; … … 1122 1116 bool hasSelfPaintingLayerDescendant = child->isSelfPaintingLayer() || child->hasSelfPaintingLayerDescendant(); 1123 1117 bool hasOutOfFlowPositionedDescendant = !childOutOfFlowDescendantContainingBlocks.isEmpty(); 1124 bool hasBlendedElementInChildStackingContext = child->hasBlendMode() || child->hasBlendedElementInChildStackingContext(); 1125 1118 #if ENABLE(CSS_COMPOSITING) 1119 bool hasUnisolatedBlendingDescendants = child->hasBlendMode() || (child->hasUnisolatedBlendingDescendants() && !child->isolatesBlending()); 1120 1121 m_hasUnisolatedBlendingDescendants |= hasUnisolatedBlendingDescendants; 1122 #endif 1126 1123 m_hasVisibleDescendant |= hasVisibleDescendant; 1127 1124 m_hasSelfPaintingLayerDescendant |= hasSelfPaintingLayerDescendant; 1128 1125 m_hasOutOfFlowPositionedDescendant |= hasOutOfFlowPositionedDescendant; 1129 setHasBlendedElementInChildStackingContext(this->hasBlendedElementInChildStackingContext() | hasBlendedElementInChildStackingContext); 1130 1131 if (m_hasVisibleDescendant && m_hasSelfPaintingLayerDescendant && m_hasOutOfFlowPositionedDescendant && this->hasBlendedElementInChildStackingContext()) 1126 1127 bool allFlagsSet = m_hasVisibleDescendant && m_hasSelfPaintingLayerDescendant && m_hasOutOfFlowPositionedDescendant; 1128 #if ENABLE(CSS_COMPOSITING) 1129 allFlagsSet &= m_hasUnisolatedBlendingDescendants; 1130 #endif 1131 if (allFlagsSet) 1132 1132 break; 1133 1133 } … … 1143 1143 1144 1144 m_hasOutOfFlowPositionedDescendantDirty = false; 1145 1146 setHasBlendedElementInChildStackingContextStatusDirty(false); 1145 #if ENABLE(CSS_COMPOSITING) 1146 m_hasUnisolatedBlendingDescendantsStatusDirty = false; 1147 #endif 1147 1148 } 1148 1149 … … 1801 1802 1802 1803 #if ENABLE(CSS_COMPOSITING) 1803 if (child->hasBlendMode() || ( !child->isStackingContext() && child->hasBlendedElementInChildStackingContext()))1804 child->updateNonCompositedParentStackingContextHasBlendedChild(true);1804 if (child->hasBlendMode() || (child->hasUnisolatedBlendingDescendants() && !child->isolatesBlending())) 1805 updateAncestorChainHasBlendingDescendants(); 1805 1806 #endif 1806 1807 … … 1848 1849 1849 1850 #if ENABLE(CSS_COMPOSITING) 1850 if (oldChild->hasBlendMode() || oldChild->isolatesBlending())1851 dirtyAncestor ParentStackingContextHasBlendedElement();1851 if (oldChild->hasBlendMode() || (oldChild->hasUnisolatedBlendingDescendants() && !oldChild->isolatesBlending())) 1852 dirtyAncestorChainHasBlendingDescendants(); 1852 1853 #endif 1853 1854 … … 6430 6431 6431 6432 #if ENABLE(CSS_COMPOSITING) 6432 m_hasBlendedElementInChildStackingContext = isStackingContext ? nonCompositedParentStackingContextHasBlendedChild() : false; 6433 dirtyAncestorParentStackingContextHasBlendedElement(); 6433 if (parent()) { 6434 if (isStackingContext) { 6435 if (!hasUnisolatedBlendingDescendantsStatusDirty() && hasUnisolatedBlendingDescendants()) 6436 parent()->dirtyAncestorChainHasBlendingDescendants(); 6437 } else { 6438 if (hasUnisolatedBlendingDescendantsStatusDirty()) 6439 parent()->dirtyAncestorChainHasBlendingDescendants(); 6440 else if (hasUnisolatedBlendingDescendants()) 6441 parent()->updateAncestorChainHasBlendingDescendants(); 6442 } 6443 } 6434 6444 #endif 6435 6445 -
trunk/Source/WebCore/rendering/RenderLayer.h
r167215 r167424 778 778 #endif 779 779 780 bool hasBlendMode() const781 {782 780 #if ENABLE(CSS_COMPOSITING) 783 return renderer().hasBlendMode(); 784 #else 785 return false; 786 #endif 787 } 788 789 #if ENABLE(CSS_COMPOSITING) 781 bool hasBlendMode() const { return renderer().hasBlendMode(); } 790 782 BlendMode blendMode() const { return m_blendMode; } 791 #endif 792 793 bool isolatesCompositedBlending() const 794 { 795 #if ENABLE(CSS_COMPOSITING) 796 return m_hasUnisolatedCompositedBlendingDescendants && isStackingContext(); 797 #else 798 return false; 799 #endif 800 } 801 802 #if ENABLE(CSS_COMPOSITING) 783 784 bool isolatesCompositedBlending() const { return m_hasUnisolatedCompositedBlendingDescendants && isStackingContext(); } 803 785 bool hasUnisolatedCompositedBlendingDescendants() const { return m_hasUnisolatedCompositedBlendingDescendants; } 804 786 void setHasUnisolatedCompositedBlendingDescendants(bool hasUnisolatedCompositedBlendingDescendants) … … 806 788 m_hasUnisolatedCompositedBlendingDescendants = hasUnisolatedCompositedBlendingDescendants; 807 789 } 808 #endif 809 810 bool isolatesBlending() const 811 { 812 #if ENABLE(CSS_COMPOSITING) 813 return m_hasBlendedElementInChildStackingContext && isStackingContext(); 790 791 bool isolatesBlending() const { return hasUnisolatedBlendingDescendants() && isStackingContext(); } 792 bool hasUnisolatedBlendingDescendants() const 793 { 794 ASSERT(!m_hasUnisolatedBlendingDescendantsStatusDirty); 795 return m_hasUnisolatedBlendingDescendants; 796 } 797 bool hasUnisolatedBlendingDescendantsStatusDirty() const { return m_hasUnisolatedBlendingDescendantsStatusDirty; } 814 798 #else 815 return false; 816 #endif 817 } 818 819 bool hasBlendedElementInChildStackingContext() const 820 { 821 #if ENABLE(CSS_COMPOSITING) 822 return m_hasBlendedElementInChildStackingContext; 823 #else 824 return false; 825 #endif 826 } 827 828 void setHasBlendedElementInChildStackingContext(bool hasBlendedElementInChildStackingContext) 829 { 830 #if ENABLE(CSS_COMPOSITING) 831 m_hasBlendedElementInChildStackingContext = hasBlendedElementInChildStackingContext; 832 #else 833 UNUSED_PARAM(hasBlendedElementInChildStackingContext); 834 #endif 835 } 836 837 bool hasBlendedElementInChildStackingContextStatusDirty() const 838 { 839 #if ENABLE(CSS_COMPOSITING) 840 return m_hasBlendedElementInChildStackingContextStatusDirty; 841 #else 842 return false; 843 #endif 844 } 845 846 void setHasBlendedElementInChildStackingContextStatusDirty(bool hasBlendedElementInChildStackingContextStatusDirty) 847 { 848 #if ENABLE(CSS_COMPOSITING) 849 m_hasBlendedElementInChildStackingContextStatusDirty = hasBlendedElementInChildStackingContextStatusDirty; 850 #else 851 UNUSED_PARAM(hasBlendedElementInChildStackingContextStatusDirty); 852 #endif 853 } 799 bool hasBlendMode() const { return false; } 800 bool isolatesCompositedBlending() const { return false; } 801 bool isolatesBlending() const { return false; } 802 bool hasUnisolatedBlendingDescendantsStatusDirty() const { return false; } 803 #endif 854 804 855 805 bool isComposited() const { return m_backing != 0; } … … 1167 1117 1168 1118 #if ENABLE(CSS_COMPOSITING) 1169 void updateNonCompositedParentStackingContextHasBlendedChild(bool hasBlendedChild); 1170 void dirtyAncestorParentStackingContextHasBlendedElement(); 1171 bool nonCompositedParentStackingContextHasBlendedChild() const; 1119 void updateAncestorChainHasBlendingDescendants(); 1120 void dirtyAncestorChainHasBlendingDescendants(); 1172 1121 #endif 1173 1122 … … 1311 1260 BlendMode m_blendMode : 5; 1312 1261 bool m_hasUnisolatedCompositedBlendingDescendants : 1; 1313 bool m_has BlendedElementInChildStackingContext: 1;1314 bool m_has BlendedElementInChildStackingContextStatusDirty : 1;1262 bool m_hasUnisolatedBlendingDescendants : 1; 1263 bool m_hasUnisolatedBlendingDescendantsStatusDirty : 1; 1315 1264 #endif 1316 1265 -
trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp
r167407 r167424 1252 1252 #if ENABLE(CSS_COMPOSITING) 1253 1253 layer.setHasUnisolatedCompositedBlendingDescendants(childState.m_hasUnisolatedCompositedBlendingDescendants); 1254 ASSERT(!layer.hasUnisolatedCompositedBlendingDescendants() || layer.hasUnisolatedBlendingDescendants()); 1254 1255 #endif 1255 1256 // Now check for reasons to become composited that depend on the state of descendant layers.
Note: See TracChangeset
for help on using the changeset viewer.