diff --git a/third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom b/third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom index 6bf19778f155f..5d0e207c3b9f8 100644 --- a/third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom +++ b/third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom @@ -2523,18 +2523,18 @@ enum WebFeature { kV8Document_HasTrustToken_Method = 3202, kForceLoadAtTop = 3203, - kLegacyLayoutByDetailsMarker = 3206, - kLegacyLayoutByEditing = 3207, - kLegacyLayoutByFrameSet = 3211, - kLegacyLayoutByGrid = 3212, - kLegacyLayoutByMultiCol = 3214, - kLegacyLayoutByPrinting = 3215, - kLegacyLayoutBySVG = 3217, - kLegacyLayoutByTable = 3219, - kLegacyLayoutByTextCombine = 3220, - kLegacyLayoutByTextControl = 3221, - kLegacyLayoutByVTTCue = 3222, - kLegacyLayoutByTableFlexGridBlockInNGFragmentationContext = 3224, + kOBSOLETE_LegacyLayoutByDetailsMarker = 3206, + kOBSOLETE_LegacyLayoutByEditing = 3207, + kOBSOLETE_LegacyLayoutByFrameSet = 3211, + kOBSOLETE_LegacyLayoutByGrid = 3212, + kOBSOLETE_LegacyLayoutByMultiCol = 3214, + kOBSOLETE_LegacyLayoutByPrinting = 3215, + kOBSOLETE_LegacyLayoutBySVG = 3217, + kOBSOLETE_LegacyLayoutByTable = 3219, + kOBSOLETE_LegacyLayoutByTextCombine = 3220, + kOBSOLETE_LegacyLayoutByTextControl = 3221, + kOBSOLETE_LegacyLayoutByVTTCue = 3222, + kOBSOLETE_LegacyLayoutByTableFlexGridBlockInNGFragmentationContext = 3224, kDocumentPolicyHeader = 3225, kDocumentPolicyReportOnlyHeader = 3226, kRequireDocumentPolicyHeader = 3227, diff --git a/third_party/blink/renderer/core/dom/element.cc b/third_party/blink/renderer/core/dom/element.cc index 08a2d26ccd5d8..c0fb2cb3c5b73 100644 --- a/third_party/blink/renderer/core/dom/element.cc +++ b/third_party/blink/renderer/core/dom/element.cc @@ -433,13 +433,8 @@ bool NeedsLegacyLayoutForEntireDocument(Document& document) { // layout (because of the above check), which would re-attach all layout // objects, which would cause the frameset to lose state of some sort, leaving // everything blank when printed. - if (document.IsFrameSet() && - !RuntimeEnabledFeatures::LayoutNGFrameSetEnabled()) { - UseCounter::Count(document, WebFeature::kLegacyLayoutByFrameSet); - return true; - } - - return false; + return document.IsFrameSet() && + !RuntimeEnabledFeatures::LayoutNGFrameSetEnabled(); } bool CalculateStyleShouldForceLegacyLayout(const Element& element, @@ -452,27 +447,20 @@ bool CalculateStyleShouldForceLegacyLayout(const Element& element, if (!RuntimeEnabledFeatures::LayoutNGBlockFragmentationEnabled()) { // Disable NG for the entire subtree if we're establishing a multicol // container. - if (style.SpecifiesColumns()) { - UseCounter::Count(document, WebFeature::kLegacyLayoutByMultiCol); + if (style.SpecifiesColumns()) return true; - } } if (document.Printing() && element == document.documentElement() && !RuntimeEnabledFeatures::LayoutNGPrintingEnabled()) { - UseCounter::Count(document, WebFeature::kLegacyLayoutByPrinting); return true; } if (NeedsLegacyLayoutForEntireDocument(document)) return true; - if (NeedsLegacyBlockFragmentation(element, style)) { - UseCounter::Count( - document, - WebFeature::kLegacyLayoutByTableFlexGridBlockInNGFragmentationContext); + if (NeedsLegacyBlockFragmentation(element, style)) return true; - } return false; } diff --git a/third_party/blink/renderer/core/html/track/vtt/vtt_cue_box.cc b/third_party/blink/renderer/core/html/track/vtt/vtt_cue_box.cc index 2d23ab2928341..fb6d9be1ffc51 100644 --- a/third_party/blink/renderer/core/html/track/vtt/vtt_cue_box.cc +++ b/third_party/blink/renderer/core/html/track/vtt/vtt_cue_box.cc @@ -157,7 +157,6 @@ LayoutObject* VTTCueBox::CreateLayoutObject(const ComputedStyle& style, if (RuntimeEnabledFeatures::LayoutNGVTTCueEnabled()) return LayoutObjectFactory::CreateBlockFlow(*this, style, legacy); - UseCounter::Count(GetDocument(), WebFeature::kLegacyLayoutByVTTCue); return MakeGarbageCollected(this, snap_to_lines_position_); } diff --git a/third_party/blink/renderer/core/svg/svg_svg_element.cc b/third_party/blink/renderer/core/svg/svg_svg_element.cc index c8860d62a3bc7..e4ee1df63c614 100644 --- a/third_party/blink/renderer/core/svg/svg_svg_element.cc +++ b/third_party/blink/renderer/core/svg/svg_svg_element.cc @@ -518,7 +518,6 @@ void SVGSVGElement::AttachLayoutTree(AttachContext& context) { LayoutObject* SVGSVGElement::CreateLayoutObject(const ComputedStyle&, LegacyLayout) { - UseCounter::Count(GetDocument(), WebFeature::kLegacyLayoutBySVG); if (IsOutermostSVGSVGElement()) return MakeGarbageCollected(this); diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml index e8c23c0aa4bf3..16d5f09466ede 100644 --- a/tools/metrics/histograms/enums.xml +++ b/tools/metrics/histograms/enums.xml @@ -40270,27 +40270,27 @@ Called by update_use_counter_feature_enum.py.--> - - + + - - + + - - + + - + - - - - + + + + + label="OBSOLETE_LegacyLayoutByTableFlexGridBlockInNGFragmentationContext"/>