Commit e152ada9 authored by Xiaocheng Hu's avatar Xiaocheng Hu Committed by Commit Bot

Remove FontFallbackList::LoadingCustomFonts()

Now the function always returns false, this patch removes it together
with the relevant code paths.

Bug: 441925
Change-Id: I1e7974ca4cf376e3fa57d3afd97cf1b82e029594
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2429530
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Reviewed-by: default avatarChris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#810880}
parent 6d21e86b
...@@ -292,8 +292,7 @@ ComputedStyle::ComputeDifferenceIgnoringInheritedFirstLineStyle( ...@@ -292,8 +292,7 @@ ComputedStyle::ComputeDifferenceIgnoringInheritedFirstLineStyle(
return Difference::kDisplayAffectingDescendantStyles; return Difference::kDisplayAffectingDescendantStyles;
if (!old_style.NonIndependentInheritedEqual(new_style)) if (!old_style.NonIndependentInheritedEqual(new_style))
return Difference::kInherited; return Difference::kInherited;
if (!old_style.LoadingCustomFontsEqual(new_style) || if (old_style.JustifyItems() != new_style.JustifyItems())
old_style.JustifyItems() != new_style.JustifyItems())
return Difference::kInherited; return Difference::kInherited;
bool non_inherited_equal = old_style.NonInheritedEqual(new_style); bool non_inherited_equal = old_style.NonInheritedEqual(new_style);
if (!non_inherited_equal && old_style.ChildHasExplicitInheritance()) { if (!non_inherited_equal && old_style.ChildHasExplicitInheritance()) {
...@@ -563,10 +562,6 @@ bool ComputedStyle::NonIndependentInheritedEqual( ...@@ -563,10 +562,6 @@ bool ComputedStyle::NonIndependentInheritedEqual(
svg_style_->InheritedEqual(*other.svg_style_); svg_style_->InheritedEqual(*other.svg_style_);
} }
bool ComputedStyle::LoadingCustomFontsEqual(const ComputedStyle& other) const {
return GetFont().LoadingCustomFonts() == other.GetFont().LoadingCustomFonts();
}
bool ComputedStyle::NonInheritedEqual(const ComputedStyle& other) const { bool ComputedStyle::NonInheritedEqual(const ComputedStyle& other) const {
// compare everything except the pseudoStyle pointer // compare everything except the pseudoStyle pointer
return ComputedStyleBase::NonInheritedEqual(other) && return ComputedStyleBase::NonInheritedEqual(other) &&
......
...@@ -1156,7 +1156,6 @@ class ComputedStyle : public ComputedStyleBase, ...@@ -1156,7 +1156,6 @@ class ComputedStyle : public ComputedStyleBase,
bool NonInheritedEqual(const ComputedStyle&) const; bool NonInheritedEqual(const ComputedStyle&) const;
inline bool IndependentInheritedEqual(const ComputedStyle&) const; inline bool IndependentInheritedEqual(const ComputedStyle&) const;
inline bool NonIndependentInheritedEqual(const ComputedStyle&) const; inline bool NonIndependentInheritedEqual(const ComputedStyle&) const;
bool LoadingCustomFontsEqual(const ComputedStyle&) const;
bool InheritedDataShared(const ComputedStyle&) const; bool InheritedDataShared(const ComputedStyle&) const;
bool HasChildDependentFlags() const { return ChildHasExplicitInheritance(); } bool HasChildDependentFlags() const { return ChildHasExplicitInheritance(); }
......
...@@ -47,10 +47,6 @@ ...@@ -47,10 +47,6 @@
name: "DiffNeedsReshapeAndFullLayoutAndPaintInvalidation", name: "DiffNeedsReshapeAndFullLayoutAndPaintInvalidation",
fields_to_diff: ["font"], fields_to_diff: ["font"],
methods_to_diff: [ methods_to_diff: [
{
method: "FontInternal().LoadingCustomFonts()",
field_dependencies: ["font"]
},
{ {
method: "TextTransform()", method: "TextTransform()",
field_dependencies: ["text-transform"] field_dependencies: ["text-transform"]
......
...@@ -615,10 +615,6 @@ LayoutUnit Font::TabWidth(const TabSize& tab_size, LayoutUnit position) const { ...@@ -615,10 +615,6 @@ LayoutUnit Font::TabWidth(const TabSize& tab_size, LayoutUnit position) const {
return distance_to_tab_stop; return distance_to_tab_stop;
} }
bool Font::LoadingCustomFonts() const {
return font_fallback_list_ && font_fallback_list_->LoadingCustomFonts();
}
bool Font::IsFallbackValid() const { bool Font::IsFallbackValid() const {
return !font_fallback_list_ || font_fallback_list_->IsValid(); return !font_fallback_list_ || font_fallback_list_->IsValid();
} }
......
...@@ -232,7 +232,6 @@ class PLATFORM_EXPORT Font { ...@@ -232,7 +232,6 @@ class PLATFORM_EXPORT Font {
void WillUseFontData(const String& text) const; void WillUseFontData(const String& text) const;
bool LoadingCustomFonts() const;
bool IsFallbackValid() const; bool IsFallbackValid() const;
bool ShouldSkipDrawing() const { bool ShouldSkipDrawing() const {
......
...@@ -80,13 +80,6 @@ void FontFallbackList::ReleaseFontData() { ...@@ -80,13 +80,6 @@ void FontFallbackList::ReleaseFontData() {
shape_cache_.reset(); // Clear the weak pointer to the cache instance. shape_cache_.reset(); // Clear the weak pointer to the cache instance.
} }
bool FontFallbackList::LoadingCustomFonts() const {
// This function is only used for style and layout invalidation purposes. We
// don't need it for invalidation when the feature below is enabled.
// TODO(xiaochengh): Remove this function.
return false;
}
bool FontFallbackList::ShouldSkipDrawing() const { bool FontFallbackList::ShouldSkipDrawing() const {
// The DCHECK hit will be fixed by the runtime enabled feature below, so we // The DCHECK hit will be fixed by the runtime enabled feature below, so we
// don't fix it in the legacy code paths. // don't fix it in the legacy code paths.
......
...@@ -71,7 +71,6 @@ class PLATFORM_EXPORT FontFallbackList : public RefCounted<FontFallbackList> { ...@@ -71,7 +71,6 @@ class PLATFORM_EXPORT FontFallbackList : public RefCounted<FontFallbackList> {
// revalidate a FontFallbackList, but create a new FontFallbackList instead. // revalidate a FontFallbackList, but create a new FontFallbackList instead.
void RevalidateDeprecated(); void RevalidateDeprecated();
bool LoadingCustomFonts() const;
bool ShouldSkipDrawing() const; bool ShouldSkipDrawing() const;
FontSelector* GetFontSelector() const { return font_selector_.Get(); } FontSelector* GetFontSelector() const { return font_selector_.Get(); }
......
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