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

Unified Diff: third_party/WebKit/Source/core/layout/compositing/CompositingInputsUpdater.cpp

Issue 2817583006: Add a use-counter for viewport-fixed position:fixed under a filter (Closed)
Patch Set: Merge branch 'master' into usecounterfilter Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/compositing/CompositingInputsUpdater.cpp
diff --git a/third_party/WebKit/Source/core/layout/compositing/CompositingInputsUpdater.cpp b/third_party/WebKit/Source/core/layout/compositing/CompositingInputsUpdater.cpp
index d3889b9c879c8ef9142a429764b90dfcc6537d1e..c8f3f1db5a3cff773419d8e7fc1d10631c5cee93 100644
--- a/third_party/WebKit/Source/core/layout/compositing/CompositingInputsUpdater.cpp
+++ b/third_party/WebKit/Source/core/layout/compositing/CompositingInputsUpdater.cpp
@@ -186,6 +186,13 @@ void CompositingInputsUpdater::UpdateRecursive(PaintLayer* layer,
: parent->FilterAncestor();
bool layer_is_fixed_position =
layer->GetLayoutObject().Style()->GetPosition() == EPosition::kFixed;
+
+ if (layer_is_fixed_position && properties.filter_ancestor &&
+ layer->FixedToViewport()) {
+ UseCounter::Count(layer->GetLayoutObject().GetDocument(),
+ UseCounter::kViewportFixedPositionUnderFilter);
+ }
+
properties.nearest_fixed_position_layer =
layer_is_fixed_position ? layer : parent->NearestFixedPositionLayer();
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698