Skip to content

Commit

Permalink
Remove CSSFontFaceAutoVariableRange runtime-enabled feature.
Browse files Browse the repository at this point in the history
This has been shipped for over a year:
  https://chromium-review.googlesource.com/c/chromium/src/+/3997276

Bug: 973194
Change-Id: I5fe7c43f566843f98efa6af51c8c9f0b2fc665c8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5014115
Reviewed-by: Munira Tursunova <moonira@google.com>
Auto-Submit: Jeremy Roman <jbroman@chromium.org>
Commit-Queue: Jeremy Roman <jbroman@chromium.org>
Commit-Queue: Munira Tursunova <moonira@google.com>
Cr-Commit-Position: refs/heads/main@{#1230782}
  • Loading branch information
jeremyroman authored and Chromium LUCI CQ committed Nov 29, 2023
1 parent 68e6177 commit 8ebc98c
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 25 deletions.
3 changes: 0 additions & 3 deletions third_party/blink/renderer/core/css/font_face.cc
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,6 @@ FontSelectionCapabilities FontFace::GetFontSelectionCapabilities() const {
FontSelectionRange::RangeType::kSetExplicitly};
break;
case CSSValueID::kAuto:
DCHECK(RuntimeEnabledFeatures::CSSFontFaceAutoVariableRangeEnabled());
capabilities.width = {kNormalWidthValue, kNormalWidthValue,
FontSelectionRange::RangeType::kSetFromAuto};
break;
Expand Down Expand Up @@ -708,7 +707,6 @@ FontSelectionCapabilities FontFace::GetFontSelectionCapabilities() const {
FontSelectionRange::RangeType::kSetExplicitly};
break;
case CSSValueID::kAuto:
DCHECK(RuntimeEnabledFeatures::CSSFontFaceAutoVariableRangeEnabled());
capabilities.slope = {kNormalSlopeValue, kNormalSlopeValue,
FontSelectionRange::RangeType::kSetFromAuto};
break;
Expand Down Expand Up @@ -782,7 +780,6 @@ FontSelectionCapabilities FontFace::GetFontSelectionCapabilities() const {
FontSelectionRange::RangeType::kSetExplicitly};
break;
case CSSValueID::kAuto:
DCHECK(RuntimeEnabledFeatures::CSSFontFaceAutoVariableRangeEnabled());
capabilities.weight = {kNormalWeightValue, kNormalWeightValue,
FontSelectionRange::RangeType::kSetFromAuto};
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5143,8 +5143,7 @@ CSSValue* ConsumeFontStyle(CSSParserTokenRange& range,
return ConsumeIdent(range);
}

if (RuntimeEnabledFeatures::CSSFontFaceAutoVariableRangeEnabled() &&
range.Peek().Id() == CSSValueID::kAuto &&
if (range.Peek().Id() == CSSValueID::kAuto &&
context.Mode() == kCSSFontFaceRuleMode) {
return ConsumeIdent(range);
}
Expand Down Expand Up @@ -5195,8 +5194,7 @@ CSSIdentifierValue* ConsumeFontStretchKeywordOnly(
token.Id() <= CSSValueID::kUltraExpanded)) {
return ConsumeIdent(range);
}
if (RuntimeEnabledFeatures::CSSFontFaceAutoVariableRangeEnabled() &&
token.Id() == CSSValueID::kAuto &&
if (token.Id() == CSSValueID::kAuto &&
context.Mode() == kCSSFontFaceRuleMode) {
return ConsumeIdent(range);
}
Expand Down Expand Up @@ -5240,10 +5238,8 @@ CSSValue* ConsumeFontWeight(CSSParserTokenRange& range,
return ConsumeIdent(range);
}
} else {
if ((token.Id() == CSSValueID::kNormal ||
token.Id() == CSSValueID::kBold) ||
(RuntimeEnabledFeatures::CSSFontFaceAutoVariableRangeEnabled() &&
token.Id() == CSSValueID::kAuto)) {
if (token.Id() == CSSValueID::kNormal || token.Id() == CSSValueID::kBold ||
token.Id() == CSSValueID::kAuto) {
return ConsumeIdent(range);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ FontPlatformData FontCustomPlatformData::GetFontPlatformData(
absl::optional<SkFontParameters::Variation::Axis> wght_parameters =
RetrieveVariationDesignParametersByTag(base_typeface_, kWghtTag);
if (selection_capabilities.weight.IsRangeSetFromAuto() && wght_parameters) {
DCHECK(RuntimeEnabledFeatures::CSSFontFaceAutoVariableRangeEnabled());
FontSelectionRange wght_range = {
FontSelectionValue(wght_parameters->min),
FontSelectionValue(wght_parameters->max)};
Expand All @@ -160,7 +159,6 @@ FontPlatformData FontCustomPlatformData::GetFontPlatformData(
absl::optional<SkFontParameters::Variation::Axis> wdth_parameters =
RetrieveVariationDesignParametersByTag(base_typeface_, kWdthTag);
if (selection_capabilities.width.IsRangeSetFromAuto() && wdth_parameters) {
DCHECK(RuntimeEnabledFeatures::CSSFontFaceAutoVariableRangeEnabled());
FontSelectionRange wdth_range = {
FontSelectionValue(wdth_parameters->min),
FontSelectionValue(wdth_parameters->max)};
Expand All @@ -179,7 +177,6 @@ FontPlatformData FontCustomPlatformData::GetFontPlatformData(
absl::optional<SkFontParameters::Variation::Axis> slnt_parameters =
RetrieveVariationDesignParametersByTag(base_typeface_, kSlntTag);
if (selection_capabilities.slope.IsRangeSetFromAuto() && slnt_parameters) {
DCHECK(RuntimeEnabledFeatures::CSSFontFaceAutoVariableRangeEnabled());
FontSelectionRange slnt_range = {
FontSelectionValue(slnt_parameters->min),
FontSelectionValue(slnt_parameters->max)};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include <algorithm>

#include "third_party/blink/renderer/platform/platform_export.h"
#include "third_party/blink/renderer/platform/runtime_enabled_features.h"
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
#include "third_party/blink/renderer/platform/wtf/hash_table_deleted_value_type.h"
#include "third_party/blink/renderer/platform/wtf/hash_traits.h"
Expand Down Expand Up @@ -280,9 +279,7 @@ struct FontSelectionRange {
FontSelectionValue minimum{FontSelectionValue(1)};
FontSelectionValue maximum{FontSelectionValue(0)};

RangeType type = RuntimeEnabledFeatures::CSSFontFaceAutoVariableRangeEnabled()
? kSetFromAuto
: kSetExplicitly;
RangeType type = kSetFromAuto;
};

struct PLATFORM_EXPORT FontSelectionRequest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -911,13 +911,6 @@
name: "CSSFirstLetterNoNewLineAsPrecedingChar",
status: "stable",
},
{
// @font-face Font property descriptors auto range.
// https://www.w3.org/TR/css-fonts-4/#font-prop-desc
name: "CSSFontFaceAutoVariableRange",
status: "stable",
base_feature: "none",
},
{
name: "CSSFontSizeAdjust",
status: "experimental",
Expand Down

0 comments on commit 8ebc98c

Please sign in to comment.