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

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

Issue 1299323005: blink: Add backdrop-filter support (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: one more Created 5 years, 3 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 "config.h" 5 #include "config.h"
6 #include "core/layout/compositing/CompositingReasonFinder.h" 6 #include "core/layout/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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 105
106 // If the implementation of createsGroup changes, we need to be aware of tha t in this part of code. 106 // If the implementation of createsGroup changes, we need to be aware of tha t in this part of code.
107 ASSERT((layoutObject->isTransparent() || layoutObject->hasMask() || layoutOb ject->hasFilter() || style.hasBlendMode()) == layoutObject->createsGroup()); 107 ASSERT((layoutObject->isTransparent() || layoutObject->hasMask() || layoutOb ject->hasFilter() || style.hasBlendMode()) == layoutObject->createsGroup());
108 108
109 if (style.hasMask()) 109 if (style.hasMask())
110 reasons |= CompositingReasonMaskWithCompositedDescendants; 110 reasons |= CompositingReasonMaskWithCompositedDescendants;
111 111
112 if (style.hasFilter()) 112 if (style.hasFilter())
113 reasons |= CompositingReasonFilterWithCompositedDescendants; 113 reasons |= CompositingReasonFilterWithCompositedDescendants;
114 114
115 if (style.hasBackdropFilter())
116 reasons |= CompositingReasonBackdropFilter;
117
115 // See Layer::updateTransform for an explanation of why we check both. 118 // See Layer::updateTransform for an explanation of why we check both.
116 if (layoutObject->hasTransformRelatedProperty() && style.hasTransform()) 119 if (layoutObject->hasTransformRelatedProperty() && style.hasTransform())
117 reasons |= CompositingReasonTransformWithCompositedDescendants; 120 reasons |= CompositingReasonTransformWithCompositedDescendants;
118 121
119 if (layoutObject->isTransparent()) 122 if (layoutObject->isTransparent())
120 reasons |= CompositingReasonOpacityWithCompositedDescendants; 123 reasons |= CompositingReasonOpacityWithCompositedDescendants;
121 124
122 if (style.hasBlendMode()) 125 if (style.hasBlendMode())
123 reasons |= CompositingReasonBlendingWithCompositedDescendants; 126 reasons |= CompositingReasonBlendingWithCompositedDescendants;
124 127
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 bool CompositingReasonFinder::requiresCompositingForPositionFixed(const Deprecat edPaintLayer* layer) const 180 bool CompositingReasonFinder::requiresCompositingForPositionFixed(const Deprecat edPaintLayer* layer) const
178 { 181 {
179 if (!(m_compositingTriggers & ViewportConstrainedPositionedTrigger)) 182 if (!(m_compositingTriggers & ViewportConstrainedPositionedTrigger))
180 return false; 183 return false;
181 // Don't promote fixed position elements that are descendants of a non-view container, e.g. transformed elements. 184 // Don't promote fixed position elements that are descendants of a non-view container, e.g. transformed elements.
182 // They will stay fixed wrt the container rather than the enclosing frame. 185 // They will stay fixed wrt the container rather than the enclosing frame.
183 return layer->scrollsWithViewport() && m_layoutView.frameView()->isScrollabl e(); 186 return layer->scrollsWithViewport() && m_layoutView.frameView()->isScrollabl e();
184 } 187 }
185 188
186 } 189 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698