Chromium Code Reviews| Index: third_party/WebKit/Source/core/fetch/FontResource.h |
| diff --git a/third_party/WebKit/Source/core/fetch/FontResource.h b/third_party/WebKit/Source/core/fetch/FontResource.h |
| index e83ab315a525782642b34205c432c2d1cc84114f..e93ed7b87237ff8ddc7f43e37054bb76c4283a7e 100644 |
| --- a/third_party/WebKit/Source/core/fetch/FontResource.h |
| +++ b/third_party/WebKit/Source/core/fetch/FontResource.h |
| @@ -67,6 +67,11 @@ class CORE_EXPORT FontResource final : public Resource { |
| bool italic, |
| FontOrientation = FontOrientation::Horizontal); |
| + // Returns true if the loading priority of the remote font resource can be |
| + // lowered. The loading priority of the font can be lowered only if the |
| + // font is not needed for painting the text. |
| + bool isLowPriorityLoadingAllowedForRemoteFont() const; |
| + |
| private: |
| class FontResourceFactory : public ResourceFactory { |
| public: |
| @@ -112,6 +117,9 @@ class FontResourceClient : public ResourceClient { |
| ResourceClientType getResourceClientType() const final { return FontType; } |
| virtual void fontLoadShortLimitExceeded(FontResource*) {} |
| virtual void fontLoadLongLimitExceeded(FontResource*) {} |
| + |
| + // Returns true if loading priority of remote font resources can be lowered. |
| + virtual bool isLowPriorityLoadingAllowedForRemoteFont() const { return true; } |
|
kinuko
2016/11/15 05:43:47
It probably doesn't change anything but is the def
tbansal1
2016/11/15 08:17:04
Yes it is intentional. I have added more comments
Kunihiko Sakamoto
2016/11/15 09:34:53
A supplementary explanation:
All subclasses of Res
|
| }; |
| } // namespace blink |