OLD | NEW |
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/CompositingInputsUpdater.h" | 5 #include "core/layout/compositing/CompositingInputsUpdater.h" |
6 | 6 |
7 #include "core/dom/Document.h" | 7 #include "core/dom/Document.h" |
8 #include "core/frame/FrameView.h" | 8 #include "core/frame/FrameView.h" |
9 #include "core/layout/LayoutBlock.h" | 9 #include "core/layout/LayoutBlock.h" |
10 #include "core/layout/LayoutView.h" | 10 #include "core/layout/LayoutView.h" |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 const PaintLayer* parent = layer->Parent(); | 179 const PaintLayer* parent = layer->Parent(); |
180 properties.opacity_ancestor = | 180 properties.opacity_ancestor = |
181 parent->IsTransparent() ? parent : parent->OpacityAncestor(); | 181 parent->IsTransparent() ? parent : parent->OpacityAncestor(); |
182 properties.transform_ancestor = | 182 properties.transform_ancestor = |
183 parent->Transform() ? parent : parent->TransformAncestor(); | 183 parent->Transform() ? parent : parent->TransformAncestor(); |
184 properties.filter_ancestor = parent->HasFilterInducingProperty() | 184 properties.filter_ancestor = parent->HasFilterInducingProperty() |
185 ? parent | 185 ? parent |
186 : parent->FilterAncestor(); | 186 : parent->FilterAncestor(); |
187 bool layer_is_fixed_position = | 187 bool layer_is_fixed_position = |
188 layer->GetLayoutObject().Style()->GetPosition() == EPosition::kFixed; | 188 layer->GetLayoutObject().Style()->GetPosition() == EPosition::kFixed; |
| 189 |
| 190 if (layer_is_fixed_position && properties.filter_ancestor && |
| 191 layer->FixedToViewport()) { |
| 192 UseCounter::Count(layer->GetLayoutObject().GetDocument(), |
| 193 UseCounter::kViewportFixedPositionUnderFilter); |
| 194 } |
| 195 |
189 properties.nearest_fixed_position_layer = | 196 properties.nearest_fixed_position_layer = |
190 layer_is_fixed_position ? layer : parent->NearestFixedPositionLayer(); | 197 layer_is_fixed_position ? layer : parent->NearestFixedPositionLayer(); |
191 | 198 |
192 if (info.has_ancestor_with_clip_related_property) { | 199 if (info.has_ancestor_with_clip_related_property) { |
193 const PaintLayer* parent_layer_on_clipping_container_chain = | 200 const PaintLayer* parent_layer_on_clipping_container_chain = |
194 FindParentLayerOnClippingContainerChain(layer); | 201 FindParentLayerOnClippingContainerChain(layer); |
195 const bool parent_has_clip_related_property = | 202 const bool parent_has_clip_related_property = |
196 parent_layer_on_clipping_container_chain->GetLayoutObject() | 203 parent_layer_on_clipping_container_chain->GetLayoutObject() |
197 .HasClipRelatedProperty(); | 204 .HasClipRelatedProperty(); |
198 properties.clipping_container = | 205 properties.clipping_container = |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 DCHECK(!layer->NeedsCompositingInputsUpdate()); | 285 DCHECK(!layer->NeedsCompositingInputsUpdate()); |
279 | 286 |
280 for (PaintLayer* child = layer->FirstChild(); child; | 287 for (PaintLayer* child = layer->FirstChild(); child; |
281 child = child->NextSibling()) | 288 child = child->NextSibling()) |
282 AssertNeedsCompositingInputsUpdateBitsCleared(child); | 289 AssertNeedsCompositingInputsUpdateBitsCleared(child); |
283 } | 290 } |
284 | 291 |
285 #endif | 292 #endif |
286 | 293 |
287 } // namespace blink | 294 } // namespace blink |
OLD | NEW |