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

Side by Side Diff: third_party/WebKit/Source/core/layout/compositing/CompositingReasonFinder.cpp

Issue 2065233002: Force flattening for elements with non-initial value of opacity (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix assert. (overflow needs to be adjusted prior to querying used transform-style) Created 4 years, 6 months 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
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 "core/layout/compositing/CompositingReasonFinder.h" 5 #include "core/layout/compositing/CompositingReasonFinder.h"
6 6
7 #include "core/CSSPropertyNames.h" 7 #include "core/CSSPropertyNames.h"
8 #include "core/dom/Document.h" 8 #include "core/dom/Document.h"
9 #include "core/frame/FrameView.h" 9 #include "core/frame/FrameView.h"
10 #include "core/frame/Settings.h" 10 #include "core/frame/Settings.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 85
86 if (requiresCompositingForAnimation(style)) 86 if (requiresCompositingForAnimation(style))
87 reasons |= CompositingReasonActiveAnimation; 87 reasons |= CompositingReasonActiveAnimation;
88 88
89 if (style.hasWillChangeCompositingHint() && !style.subtreeWillChangeContents ()) 89 if (style.hasWillChangeCompositingHint() && !style.subtreeWillChangeContents ())
90 reasons |= CompositingReasonWillChangeCompositingHint; 90 reasons |= CompositingReasonWillChangeCompositingHint;
91 91
92 if (style.hasInlineTransform()) 92 if (style.hasInlineTransform())
93 reasons |= CompositingReasonInlineTransform; 93 reasons |= CompositingReasonInlineTransform;
94 94
95 if (style.transformStyle3D() == TransformStyle3DPreserve3D) 95 if (style.usedTransformStyle3D() == TransformStyle3DPreserve3D)
96 reasons |= CompositingReasonPreserve3DWith3DDescendants; 96 reasons |= CompositingReasonPreserve3DWith3DDescendants;
97 97
98 if (style.hasPerspective()) 98 if (style.hasPerspective())
99 reasons |= CompositingReasonPerspectiveWith3DDescendants; 99 reasons |= CompositingReasonPerspectiveWith3DDescendants;
100 100
101 if (style.hasCompositorProxy()) 101 if (style.hasCompositorProxy())
102 reasons |= CompositingReasonCompositorProxy; 102 reasons |= CompositingReasonCompositorProxy;
103 103
104 // If the implementation of createsGroup changes, we need to be aware of tha t in this part of code. 104 // If the implementation of createsGroup changes, we need to be aware of tha t in this part of code.
105 ASSERT((layoutObject->isTransparent() || layoutObject->hasMask() || layoutOb ject->hasFilterInducingProperty() || style.hasBlendMode()) == layoutObject->crea tesGroup()); 105 ASSERT((layoutObject->isTransparent() || layoutObject->hasMask() || layoutOb ject->hasFilterInducingProperty() || style.hasBlendMode()) == layoutObject->crea tesGroup());
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 bool CompositingReasonFinder::requiresCompositingForPositionFixed(const PaintLay er* layer) const 178 bool CompositingReasonFinder::requiresCompositingForPositionFixed(const PaintLay er* layer) const
179 { 179 {
180 if (!(m_compositingTriggers & ViewportConstrainedPositionedTrigger)) 180 if (!(m_compositingTriggers & ViewportConstrainedPositionedTrigger))
181 return false; 181 return false;
182 // Don't promote fixed position elements that are descendants of a non-view container, e.g. transformed elements. 182 // Don't promote fixed position elements that are descendants of a non-view container, e.g. transformed elements.
183 // They will stay fixed wrt the container rather than the enclosing frame. 183 // They will stay fixed wrt the container rather than the enclosing frame.
184 return layer->scrollsWithViewport() && m_layoutView.frameView()->isScrollabl e(); 184 return layer->scrollsWithViewport() && m_layoutView.frameView()->isScrollabl e();
185 } 185 }
186 186
187 } // namespace blink 187 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp ('k') | third_party/WebKit/Source/core/paint/PaintLayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698