Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Side by Side Diff: Source/core/rendering/compositing/CompositingReasonFinder.cpp

Issue 746163002: Drop RenderObject::hasBlendMode (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "core/rendering/compositing/CompositingReasonFinder.h" 6 #include "core/rendering/compositing/CompositingReasonFinder.h"
7 7
8 #include "core/CSSPropertyNames.h" 8 #include "core/CSSPropertyNames.h"
9 #include "core/dom/Document.h" 9 #include "core/dom/Document.h"
10 #include "core/frame/FrameView.h" 10 #include "core/frame/FrameView.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 if (style->hasInlineTransform()) 87 if (style->hasInlineTransform())
88 reasons |= CompositingReasonInlineTransform; 88 reasons |= CompositingReasonInlineTransform;
89 89
90 if (style->transformStyle3D() == TransformStyle3DPreserve3D) 90 if (style->transformStyle3D() == TransformStyle3DPreserve3D)
91 reasons |= CompositingReasonPreserve3DWith3DDescendants; 91 reasons |= CompositingReasonPreserve3DWith3DDescendants;
92 92
93 if (style->hasPerspective()) 93 if (style->hasPerspective())
94 reasons |= CompositingReasonPerspectiveWith3DDescendants; 94 reasons |= CompositingReasonPerspectiveWith3DDescendants;
95 95
96 // If the implementation of createsGroup changes, we need to be aware of tha t in this part of code. 96 // If the implementation of createsGroup changes, we need to be aware of tha t in this part of code.
97 ASSERT((renderer->isTransparent() || renderer->hasMask() || renderer->hasFil ter() || renderer->hasBlendMode()) == renderer->createsGroup()); 97 ASSERT((renderer->isTransparent() || renderer->hasMask() || renderer->hasFil ter() || style->hasBlendMode()) == renderer->createsGroup());
98 98
99 if (style->hasMask()) 99 if (style->hasMask())
100 reasons |= CompositingReasonMaskWithCompositedDescendants; 100 reasons |= CompositingReasonMaskWithCompositedDescendants;
101 101
102 if (style->hasFilter()) 102 if (style->hasFilter())
103 reasons |= CompositingReasonFilterWithCompositedDescendants; 103 reasons |= CompositingReasonFilterWithCompositedDescendants;
104 104
105 // See RenderLayer::updateTransform for an explanation of why we check both. 105 // See RenderLayer::updateTransform for an explanation of why we check both.
106 if (renderer->hasTransformRelatedProperty() && style->hasTransform()) 106 if (renderer->hasTransformRelatedProperty() && style->hasTransform())
107 reasons |= CompositingReasonTransformWithCompositedDescendants; 107 reasons |= CompositingReasonTransformWithCompositedDescendants;
108 108
109 if (renderer->isTransparent()) 109 if (renderer->isTransparent())
110 reasons |= CompositingReasonOpacityWithCompositedDescendants; 110 reasons |= CompositingReasonOpacityWithCompositedDescendants;
111 111
112 if (renderer->hasBlendMode()) 112 if (style->hasBlendMode())
113 reasons |= CompositingReasonBlendingWithCompositedDescendants; 113 reasons |= CompositingReasonBlendingWithCompositedDescendants;
114 114
115 if (renderer->hasReflection()) 115 if (renderer->hasReflection())
116 reasons |= CompositingReasonReflectionWithCompositedDescendants; 116 reasons |= CompositingReasonReflectionWithCompositedDescendants;
117 117
118 ASSERT(!(reasons & ~CompositingReasonComboAllStyleDeterminedReasons)); 118 ASSERT(!(reasons & ~CompositingReasonComboAllStyleDeterminedReasons));
119 return reasons; 119 return reasons;
120 } 120 }
121 121
122 bool CompositingReasonFinder::requiresCompositingForTransform(RenderObject* rend erer) const 122 bool CompositingReasonFinder::requiresCompositingForTransform(RenderObject* rend erer) const
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 bool CompositingReasonFinder::requiresCompositingForPositionFixed(const RenderLa yer* layer) const 164 bool CompositingReasonFinder::requiresCompositingForPositionFixed(const RenderLa yer* layer) const
165 { 165 {
166 if (!(m_compositingTriggers & ViewportConstrainedPositionedTrigger)) 166 if (!(m_compositingTriggers & ViewportConstrainedPositionedTrigger))
167 return false; 167 return false;
168 // Don't promote fixed position elements that are descendants of a non-view container, e.g. transformed elements. 168 // Don't promote fixed position elements that are descendants of a non-view container, e.g. transformed elements.
169 // They will stay fixed wrt the container rather than the enclosing frame. 169 // They will stay fixed wrt the container rather than the enclosing frame.
170 return layer->scrollsWithViewport() && m_renderView.frameView()->isScrollabl e(); 170 return layer->scrollsWithViewport() && m_renderView.frameView()->isScrollabl e();
171 } 171 }
172 172
173 } 173 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698