Commit 4b6d2dbb authored by Vladimir Levin's avatar Vladimir Levin Committed by Commit Bot

DL: Add a rendersubtree use counter.

This patch adds a new use counter, kRenderSubtreeAttribute, to track
usage of the feature.

R=chrishtr@chromium.org, rakina@chromium.org

Change-Id: I2d2d9e19a3853941b3fc002592f4b971db23f982
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1846569Reviewed-by: default avatarChris Harrelson <chrishtr@chromium.org>
Commit-Queue: vmpstr <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#703861}
parent 55ee47e3
...@@ -2430,7 +2430,7 @@ enum WebFeature { ...@@ -2430,7 +2430,7 @@ enum WebFeature {
kPluginElementLoadedDocument = 3046, kPluginElementLoadedDocument = 3046,
kPluginElementLoadedImage = 3047, kPluginElementLoadedImage = 3047,
kPluginElementLoadedExternal = 3048, kPluginElementLoadedExternal = 3048,
kRenderSubtreeAttribute = 3049,
// Add new features immediately above this line. Don't change assigned // Add new features immediately above this line. Don't change assigned
// numbers of any item, and don't reuse removed slots. // numbers of any item, and don't reuse removed slots.
......
...@@ -2276,6 +2276,8 @@ void Element::AttributeChanged(const AttributeModificationParams& params) { ...@@ -2276,6 +2276,8 @@ void Element::AttributeChanged(const AttributeModificationParams& params) {
} else if (RuntimeEnabledFeatures::DisplayLockingEnabled() && } else if (RuntimeEnabledFeatures::DisplayLockingEnabled() &&
name == html_names::kRendersubtreeAttr && name == html_names::kRendersubtreeAttr &&
params.old_value != params.new_value) { params.old_value != params.new_value) {
UseCounter::Count(GetDocument(), WebFeature::kRenderSubtreeAttribute);
// This is needed to ensure that proper containment is put in place. // This is needed to ensure that proper containment is put in place.
SetNeedsStyleRecalc(kLocalStyleChange, SetNeedsStyleRecalc(kLocalStyleChange,
StyleChangeReasonForTracing::FromAttribute(name)); StyleChangeReasonForTracing::FromAttribute(name));
......
...@@ -24871,6 +24871,7 @@ Called by update_net_error_codes.py.--> ...@@ -24871,6 +24871,7 @@ Called by update_net_error_codes.py.-->
<int value="3046" label="PluginElementLoadedDocument"/> <int value="3046" label="PluginElementLoadedDocument"/>
<int value="3047" label="PluginElementLoadedImage"/> <int value="3047" label="PluginElementLoadedImage"/>
<int value="3048" label="PluginElementLoadedExternal"/> <int value="3048" label="PluginElementLoadedExternal"/>
<int value="3049" label="RenderSubtreeAttribute"/>
</enum> </enum>
<enum name="FeaturePolicyAllowlistType"> <enum name="FeaturePolicyAllowlistType">
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment