webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends | List of all members
WebCore::CachedFont Class Reference

#include <CachedFont.h>

Inheritance diagram for WebCore::CachedFont:
WebCore::CachedResource

Public Member Functions

 CachedFont (CachedResourceRequest &&, SessionID, Type=FontResource)
 
virtual ~CachedFont ()
 
void beginLoadIfNeeded (CachedResourceLoader &)
 
bool stillNeedsLoad () const override
 
virtual bool ensureCustomFontData (const AtomicString &remoteURI)
 
virtual RefPtr< FontcreateFont (const FontDescription &, const AtomicString &remoteURI, bool syntheticBold, bool syntheticItalic, const FontFeatureSettings &, const FontVariantSettings &)
 
- Public Member Functions inherited from WebCore::CachedResource
 CachedResource (CachedResourceRequest &&, Type, SessionID)
 
virtual ~CachedResource ()
 
virtual void setEncoding (const String &)
 
virtual String encoding () const
 
virtual const TextResourceDecodertextResourceDecoder () const
 
virtual void addDataBuffer (SharedBuffer &)
 
virtual void addData (const char *data, unsigned length)
 
virtual void error (CachedResource::Status)
 
void setResourceError (const ResourceError &error)
 
const ResourceErrorresourceError () const
 
virtual bool shouldIgnoreHTTPStatusCodeErrors () const
 
const ResourceRequestresourceRequest () const
 
ResourceRequestresourceRequest ()
 
const URLurl () const
 
const StringcachePartition () const
 
SessionID sessionID () const
 
Type type () const
 
ResourceLoadPriority loadPriority () const
 
void setLoadPriority (const std::optional< ResourceLoadPriority > &)
 
WEBCORE_EXPORT void addClient (CachedResourceClient &)
 
WEBCORE_EXPORT void removeClient (CachedResourceClient &)
 
bool hasClients () const
 
bool hasClient (CachedResourceClient &client)
 
bool deleteIfPossible ()
 
PreloadResult preloadResult () const
 
virtual void didRemoveClient (CachedResourceClient &)
 
void destroyDecodedDataIfNeeded ()
 
unsigned count () const
 
Status status () const
 
void setStatus (Status status)
 
unsigned size () const
 
unsigned encodedSize () const
 
unsigned decodedSize () const
 
unsigned overheadSize () const
 
bool isLoaded () const
 
bool isLoading () const
 
void setLoading (bool b)
 
SubresourceLoaderloader ()
 
bool areAllClientsXMLHttpRequests () const
 
bool isImage () const
 
bool isMainOrMediaOrRawResource () const
 
bool ignoreForRequestCount () const
 
unsigned accessCount () const
 
void increaseAccessCount ()
 
void finish ()
 
void setInCache (bool inCache)
 
bool inCache () const
 
void clearLoader ()
 
SharedBufferresourceBuffer () const
 
virtual void redirectReceived (ResourceRequest &, const ResourceResponse &)
 
virtual void responseReceived (const ResourceResponse &)
 
virtual bool shouldCacheResponse (const ResourceResponse &)
 
void setResponse (const ResourceResponse &)
 
const ResourceResponseresponse () const
 
void setCrossOrigin ()
 
bool isCrossOrigin () const
 
bool isCORSSameOrigin () const
 
ResourceResponse::Tainting responseTainting () const
 
void loadFrom (const CachedResource &)
 
SecurityOriginorigin () const
 
AtomicString initiatorName () const
 
bool canDelete () const
 
bool hasOneHandle () const
 
bool isExpired () const
 
void cancelLoad ()
 
bool wasCanceled () const
 
bool errorOccurred () const
 
bool loadFailedOrCanceled () const
 
bool shouldSendResourceLoadCallbacks () const
 
DataBufferingPolicy dataBufferingPolicy () const
 
bool allowsCaching () const
 
const FetchOptionsoptions () const
 
virtual void destroyDecodedData ()
 
void setOwningCachedResourceLoader (CachedResourceLoader *cachedResourceLoader)
 
bool isPreloaded () const
 
void increasePreloadCount ()
 
void decreasePreloadCount ()
 
bool isLinkPreload ()
 
void setLinkPreload ()
 
void registerHandle (CachedResourceHandleBase *)
 
WEBCORE_EXPORT void unregisterHandle (CachedResourceHandleBase *)
 
bool canUseCacheValidator () const
 
virtual RevalidationDecision makeRevalidationDecision (CachePolicy) const
 
bool redirectChainAllowsReuse (ReuseExpiredRedirectionOrNot) const
 
bool hasRedirections () const
 
bool varyHeaderValuesMatch (const ResourceRequest &)
 
bool isCacheValidator () const
 
CachedResourceresourceToRevalidate () const
 
void setResourceToRevalidate (CachedResource *)
 
virtual void switchClientsToRevalidatedResource ()
 
void clearResourceToRevalidate ()
 
void updateResponseAfterRevalidation (const ResourceResponse &validatingResponse)
 
bool validationInProgress () const
 
bool validationCompleting () const
 
virtual void didSendData (unsigned long long, unsigned long long)
 
virtual void didRetrieveDerivedDataFromCache (const String &, SharedBuffer &)
 
unsigned long identifierForLoadWithoutResourceLoader () const
 
 CachedResource (CachedResourceRequest &&, Type, SessionID)
 
virtual ~CachedResource ()
 
virtual void setEncoding (const String &)
 
virtual String encoding () const
 
virtual const TextResourceDecodertextResourceDecoder () const
 
virtual void addDataBuffer (SharedBuffer &)
 
virtual void addData (const char *data, unsigned length)
 
virtual void error (CachedResource::Status)
 
void setResourceError (const ResourceError &error)
 
const ResourceErrorresourceError () const
 
virtual bool shouldIgnoreHTTPStatusCodeErrors () const
 
const ResourceRequestresourceRequest () const
 
ResourceRequestresourceRequest ()
 
const URLurl () const
 
const StringcachePartition () const
 
SessionID sessionID () const
 
Type type () const
 
ResourceLoadPriority loadPriority () const
 
void setLoadPriority (const std::optional< ResourceLoadPriority > &)
 
WEBCORE_EXPORT void addClient (CachedResourceClient &)
 
WEBCORE_EXPORT void removeClient (CachedResourceClient &)
 
bool hasClients () const
 
bool hasClient (CachedResourceClient &client)
 
bool deleteIfPossible ()
 
PreloadResult preloadResult () const
 
virtual void didRemoveClient (CachedResourceClient &)
 
void destroyDecodedDataIfNeeded ()
 
unsigned count () const
 
Status status () const
 
void setStatus (Status status)
 
unsigned size () const
 
unsigned encodedSize () const
 
unsigned decodedSize () const
 
unsigned overheadSize () const
 
bool isLoaded () const
 
bool isLoading () const
 
void setLoading (bool b)
 
SubresourceLoaderloader ()
 
bool areAllClientsXMLHttpRequests () const
 
bool isImage () const
 
bool isMainOrMediaOrRawResource () const
 
bool ignoreForRequestCount () const
 
unsigned accessCount () const
 
void increaseAccessCount ()
 
void finish ()
 
void setInCache (bool inCache)
 
bool inCache () const
 
void clearLoader ()
 
SharedBufferresourceBuffer () const
 
virtual void redirectReceived (ResourceRequest &, const ResourceResponse &)
 
virtual void responseReceived (const ResourceResponse &)
 
virtual bool shouldCacheResponse (const ResourceResponse &)
 
void setResponse (const ResourceResponse &)
 
const ResourceResponseresponse () const
 
void setCrossOrigin ()
 
bool isCrossOrigin () const
 
bool isCORSSameOrigin () const
 
ResourceResponse::Tainting responseTainting () const
 
void loadFrom (const CachedResource &)
 
SecurityOriginorigin () const
 
AtomicString initiatorName () const
 
bool canDelete () const
 
bool hasOneHandle () const
 
bool isExpired () const
 
void cancelLoad ()
 
bool wasCanceled () const
 
bool errorOccurred () const
 
bool loadFailedOrCanceled () const
 
bool shouldSendResourceLoadCallbacks () const
 
DataBufferingPolicy dataBufferingPolicy () const
 
bool allowsCaching () const
 
const FetchOptionsoptions () const
 
virtual void destroyDecodedData ()
 
void setOwningCachedResourceLoader (CachedResourceLoader *cachedResourceLoader)
 
bool isPreloaded () const
 
void increasePreloadCount ()
 
void decreasePreloadCount ()
 
bool isLinkPreload ()
 
void setLinkPreload ()
 
void registerHandle (CachedResourceHandleBase *)
 
WEBCORE_EXPORT void unregisterHandle (CachedResourceHandleBase *)
 
bool canUseCacheValidator () const
 
virtual RevalidationDecision makeRevalidationDecision (CachePolicy) const
 
bool redirectChainAllowsReuse (ReuseExpiredRedirectionOrNot) const
 
bool hasRedirections () const
 
bool varyHeaderValuesMatch (const ResourceRequest &)
 
bool isCacheValidator () const
 
CachedResourceresourceToRevalidate () const
 
void setResourceToRevalidate (CachedResource *)
 
virtual void switchClientsToRevalidatedResource ()
 
void clearResourceToRevalidate ()
 
void updateResponseAfterRevalidation (const ResourceResponse &validatingResponse)
 
bool validationInProgress () const
 
bool validationCompleting () const
 
virtual void didSendData (unsigned long long, unsigned long long)
 
virtual void didRetrieveDerivedDataFromCache (const String &, SharedBuffer &)
 
unsigned long identifierForLoadWithoutResourceLoader () const
 

Static Public Member Functions

static std::unique_ptr< FontCustomPlatformDatacreateCustomFontData (SharedBuffer &, bool &wrapping)
 
static FontPlatformData platformDataFromCustomData (FontCustomPlatformData &, const FontDescription &, bool bold, bool italic, const FontFeatureSettings &, const FontVariantSettings &)
 
- Static Public Member Functions inherited from WebCore::CachedResource
static ResourceLoadPriority defaultPriorityForResourceType (Type)
 
static ResourceLoadPriority defaultPriorityForResourceType (Type)
 

Protected Member Functions

FontPlatformData platformDataFromCustomData (const FontDescription &, bool bold, bool italic, const FontFeatureSettings &, const FontVariantSettings &)
 
bool ensureCustomFontData (SharedBuffer *data)
 
- Protected Member Functions inherited from WebCore::CachedResource
 CachedResource (const URL &, Type, SessionID)
 
void setEncodedSize (unsigned)
 
void setDecodedSize (unsigned)
 
void didAccessDecodedData (double timeStamp)
 
virtual void didReplaceSharedBufferContents ()
 
 CachedResource (const URL &, Type, SessionID)
 
void setEncodedSize (unsigned)
 
void setDecodedSize (unsigned)
 
void didAccessDecodedData (double timeStamp)
 
virtual void didReplaceSharedBufferContents ()
 

Friends

class MemoryCache
 

Additional Inherited Members

- Public Types inherited from WebCore::CachedResource
enum  Type {
  MainResource, ImageResource, CSSStyleSheet, Script,
  FontResource, MediaResource, RawResource, SVGDocumentResource,
  MainResource, ImageResource, CSSStyleSheet, Script,
  FontResource, MediaResource, RawResource, SVGDocumentResource
}
 
enum  Status {
  Unknown, Pending, Cached, LoadError,
  DecodeError, Unknown, Pending, Cached,
  LoadError, DecodeError
}
 
enum  PreloadResult {
  PreloadNotReferenced, PreloadReferenced, PreloadReferencedWhileLoading, PreloadReferencedWhileComplete,
  PreloadNotReferenced, PreloadReferenced, PreloadReferencedWhileLoading, PreloadReferencedWhileComplete
}
 
enum  RevalidationDecision {
  RevalidationDecision::No, RevalidationDecision::YesDueToCachePolicy, RevalidationDecision::YesDueToNoStore, RevalidationDecision::YesDueToNoCache,
  RevalidationDecision::YesDueToExpired, RevalidationDecision::No, RevalidationDecision::YesDueToCachePolicy, RevalidationDecision::YesDueToNoStore,
  RevalidationDecision::YesDueToNoCache, RevalidationDecision::YesDueToExpired
}
 
enum  Type {
  MainResource, ImageResource, CSSStyleSheet, Script,
  FontResource, MediaResource, RawResource, SVGDocumentResource,
  MainResource, ImageResource, CSSStyleSheet, Script,
  FontResource, MediaResource, RawResource, SVGDocumentResource
}
 
enum  Status {
  Unknown, Pending, Cached, LoadError,
  DecodeError, Unknown, Pending, Cached,
  LoadError, DecodeError
}
 
enum  PreloadResult {
  PreloadNotReferenced, PreloadReferenced, PreloadReferencedWhileLoading, PreloadReferencedWhileComplete,
  PreloadNotReferenced, PreloadReferenced, PreloadReferencedWhileLoading, PreloadReferencedWhileComplete
}
 
enum  RevalidationDecision {
  RevalidationDecision::No, RevalidationDecision::YesDueToCachePolicy, RevalidationDecision::YesDueToNoStore, RevalidationDecision::YesDueToNoCache,
  RevalidationDecision::YesDueToExpired, RevalidationDecision::No, RevalidationDecision::YesDueToCachePolicy, RevalidationDecision::YesDueToNoStore,
  RevalidationDecision::YesDueToNoCache, RevalidationDecision::YesDueToExpired
}
 
- Protected Attributes inherited from WebCore::CachedResource
HashCountedSet< CachedResourceClient * > m_clients
 
ResourceRequest m_resourceRequest
 
RefPtr< SubresourceLoaderm_loader
 
ResourceLoaderOptions m_options
 
ResourceResponse m_response
 
ResourceResponse::Tainting m_responseTainting { ResourceResponse::Tainting::Basic }
 
RefPtr< SharedBufferm_data
 
DeferrableOneShotTimer m_decodedDataDeletionTimer
 

Constructor & Destructor Documentation

◆ CachedFont()

WebCore::CachedFont::CachedFont ( CachedResourceRequest &&  request,
SessionID  sessionID,
Type  type = FontResource 
)

◆ ~CachedFont()

WebCore::CachedFont::~CachedFont ( )
virtual

Member Function Documentation

◆ beginLoadIfNeeded()

void WebCore::CachedFont::beginLoadIfNeeded ( CachedResourceLoader loader)

◆ createCustomFontData()

std::unique_ptr< FontCustomPlatformData > WebCore::CachedFont::createCustomFontData ( SharedBuffer bytes,
bool &  wrapping 
)
static

◆ createFont()

RefPtr< Font > WebCore::CachedFont::createFont ( const FontDescription fontDescription,
const AtomicString remoteURI,
bool  syntheticBold,
bool  syntheticItalic,
const FontFeatureSettings fontFaceFeatures,
const FontVariantSettings fontFaceVariantSettings 
)
virtual

◆ ensureCustomFontData() [1/2]

bool WebCore::CachedFont::ensureCustomFontData ( const AtomicString remoteURI)
virtual

◆ ensureCustomFontData() [2/2]

bool WebCore::CachedFont::ensureCustomFontData ( SharedBuffer data)
protected

◆ platformDataFromCustomData() [1/2]

FontPlatformData WebCore::CachedFont::platformDataFromCustomData ( FontCustomPlatformData fontCustomPlatformData,
const FontDescription fontDescription,
bool  bold,
bool  italic,
const FontFeatureSettings fontFaceFeatures,
const FontVariantSettings fontFaceVariantSettings 
)
static

◆ platformDataFromCustomData() [2/2]

FontPlatformData WebCore::CachedFont::platformDataFromCustomData ( const FontDescription fontDescription,
bool  bold,
bool  italic,
const FontFeatureSettings fontFaceFeatures,
const FontVariantSettings fontFaceVariantSettings 
)
protected

◆ stillNeedsLoad()

bool WebCore::CachedFont::stillNeedsLoad ( ) const
inlineoverridevirtual

Reimplemented from WebCore::CachedResource.

Friends And Related Function Documentation

◆ MemoryCache

friend class MemoryCache
friend

The documentation for this class was generated from the following files: