Skip to content
This repository has been archived by the owner on Jul 18, 2018. It is now read-only.

Commit

Permalink
Add a use-counter for viewport-fixed position:fixed under a filter
Browse files Browse the repository at this point in the history
This will inform whether we can make the change suggested in
w3c/fxtf-drafts#11

BUG=711736
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2

Review-Url: https://codereview.chromium.org/2817583006
Cr-Commit-Position: refs/heads/master@{#464853}
  • Loading branch information
chrishtr authored and Commit bot committed Apr 15, 2017
1 parent 097db1d commit e208bf0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions third_party/WebKit/Source/core/frame/UseCounter.h
Original file line number Diff line number Diff line change
Expand Up @@ -1574,6 +1574,7 @@ class CORE_EXPORT UseCounter {
kMediaStreamConstraintsGoogDAEchoCancellation = 1958,
kMediaStreamConstraintsGoogNoiseReduction = 1959,
kMediaStreamConstraintsGoogPowerLineFrequency = 1960,
kViewportFixedPositionUnderFilter = 1961,

// Add new features immediately above this line. Don't change assigned
// numbers of any item, and don't reuse removed slots.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
1 change: 1 addition & 0 deletions tools/metrics/histograms/histograms.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95629,6 +95629,7 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries.
<int value="1958" label="MediaStreamConstraintsGoogDAEchoCancellation"/>
<int value="1959" label="MediaStreamConstraintsGoogNoiseReduction"/>
<int value="1960" label="MediaStreamConstraintsGoogPowerLineFrequency"/>
<int value="1961" label="ViewportFixedPositionUnderFilter"/>
</enum>

<enum name="FetchRequestMode" type="int">
Expand Down

0 comments on commit e208bf0

Please sign in to comment.