Commit cd8e141f authored by Charlie Hu's avatar Charlie Hu Committed by Commit Bot

[Cleanup] Rename methods with 'FeaturePolicy' in method name

'font-display' has been migrated from feature policy to document policy
in (https://chromium-review.googlesource.com/c/chromium/src/+/2036518).
This CL cleans up some misnames after the migration.

Change-Id: I2edc1611a8b5f53997ad152661ba18284eac669a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2404147Reviewed-by: default avatarIan Clelland <iclelland@chromium.org>
Reviewed-by: default avatarDmitry Gozman <dgozman@chromium.org>
Commit-Queue: Charlie Hu <chenleihu@google.com>
Cr-Commit-Position: refs/heads/master@{#808479}
parent 73ba54ff
...@@ -147,9 +147,9 @@ RemoteFontFaceSource::RemoteFontFaceSource(CSSFontFace* css_font_face, ...@@ -147,9 +147,9 @@ RemoteFontFaceSource::RemoteFontFaceSource(CSSFontFace* css_font_face,
font_selector_(font_selector), font_selector_(font_selector),
// No need to report the violation here since the font is not loaded yet // No need to report the violation here since the font is not loaded yet
display_( display_(
GetFontDisplayWithFeaturePolicyCheck(display, GetFontDisplayWithDocumentPolicyCheck(display,
font_selector, font_selector,
ReportOptions::kDoNotReport)), ReportOptions::kDoNotReport)),
phase_(kNoLimitExceeded), phase_(kNoLimitExceeded),
is_intervention_triggered_(ShouldTriggerWebFontsIntervention()), is_intervention_triggered_(ShouldTriggerWebFontsIntervention()),
finished_before_document_rendering_begin_(false), finished_before_document_rendering_begin_(false),
...@@ -266,7 +266,7 @@ void RemoteFontFaceSource::SetDisplay(FontDisplay display) { ...@@ -266,7 +266,7 @@ void RemoteFontFaceSource::SetDisplay(FontDisplay display) {
// using the loaded font. // using the loaded font.
if (IsLoaded()) if (IsLoaded())
return; return;
display_ = GetFontDisplayWithFeaturePolicyCheck( display_ = GetFontDisplayWithDocumentPolicyCheck(
display, font_selector_, ReportOptions::kReportOnFailure); display, font_selector_, ReportOptions::kReportOnFailure);
UpdatePeriod(); UpdatePeriod();
} }
...@@ -290,7 +290,7 @@ bool RemoteFontFaceSource::UpdatePeriod() { ...@@ -290,7 +290,7 @@ bool RemoteFontFaceSource::UpdatePeriod() {
return changed; return changed;
} }
FontDisplay RemoteFontFaceSource::GetFontDisplayWithFeaturePolicyCheck( FontDisplay RemoteFontFaceSource::GetFontDisplayWithDocumentPolicyCheck(
FontDisplay display, FontDisplay display,
const FontSelector* font_selector, const FontSelector* font_selector,
ReportOptions report_option) const { ReportOptions report_option) const {
......
...@@ -138,9 +138,9 @@ class RemoteFontFaceSource final : public CSSFontFaceSource, ...@@ -138,9 +138,9 @@ class RemoteFontFaceSource final : public CSSFontFaceSource,
bool UpdatePeriod() override; bool UpdatePeriod() override;
bool ShouldTriggerWebFontsIntervention(); bool ShouldTriggerWebFontsIntervention();
bool IsLowPriorityLoadingAllowedForRemoteFont() const override; bool IsLowPriorityLoadingAllowedForRemoteFont() const override;
FontDisplay GetFontDisplayWithFeaturePolicyCheck(FontDisplay, FontDisplay GetFontDisplayWithDocumentPolicyCheck(FontDisplay,
const FontSelector*, const FontSelector*,
ReportOptions) const; ReportOptions) const;
// Our owning font face. // Our owning font face.
Member<CSSFontFace> face_; Member<CSSFontFace> face_;
......
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