Backed out changeset aafb719b4379 (bug 1376964)

This commit is contained in:
Carsten "Tomcat" Book 2017-07-12 12:41:29 +02:00
parent 4e6ba1d0fc
commit a269ba0e44
10 changed files with 11 additions and 9 deletions

View File

@ -246,7 +246,7 @@ gfxAndroidPlatform::CreatePlatformFontList()
}
bool
gfxAndroidPlatform::IsFontFormatSupported(uint32_t aFormatFlags)
gfxAndroidPlatform::IsFontFormatSupported(nsIURI *aFontURI, uint32_t aFormatFlags)
{
// check for strange format flags
NS_ASSERTION(!(aFormatFlags & gfxUserFontSet::FLAG_FORMAT_NOT_USED),

View File

@ -40,7 +40,7 @@ public:
void GetSystemFontList(InfallibleTArray<FontListEntry>* retValue);
// platform implementations of font functions
virtual bool IsFontFormatSupported(uint32_t aFormatFlags) override;
virtual bool IsFontFormatSupported(nsIURI *aFontURI, uint32_t aFormatFlags) override;
virtual gfxPlatformFontList* CreatePlatformFontList() override;
virtual void GetCommonFallbackFonts(uint32_t aCh, uint32_t aNextCh,

View File

@ -472,7 +472,7 @@ public:
bool UseGraphiteShaping();
// check whether format is supported on a platform or not (if unclear, returns true)
virtual bool IsFontFormatSupported(uint32_t aFormatFlags) { return false; }
virtual bool IsFontFormatSupported(nsIURI *aFontURI, uint32_t aFormatFlags) { return false; }
virtual bool DidRenderingDeviceReset(DeviceResetReason* aResetReason = nullptr) { return false; }

View File

@ -311,7 +311,7 @@ gfxPlatformGtk::GetFTLibrary()
}
bool
gfxPlatformGtk::IsFontFormatSupported(uint32_t aFormatFlags)
gfxPlatformGtk::IsFontFormatSupported(nsIURI *aFontURI, uint32_t aFormatFlags)
{
// check for strange format flags
NS_ASSERTION(!(aFormatFlags & gfxUserFontSet::FLAG_FORMAT_NOT_USED),

View File

@ -87,7 +87,8 @@ public:
* Check whether format is supported on a platform or not (if unclear,
* returns true).
*/
virtual bool IsFontFormatSupported(uint32_t aFormatFlags) override;
virtual bool IsFontFormatSupported(nsIURI *aFontURI,
uint32_t aFormatFlags) override;
/**
* Calls XFlush if xrender is enabled.

View File

@ -152,7 +152,7 @@ gfxPlatformMac::CreateFontGroup(const FontFamilyList& aFontFamilyList,
}
bool
gfxPlatformMac::IsFontFormatSupported(uint32_t aFormatFlags)
gfxPlatformMac::IsFontFormatSupported(nsIURI *aFontURI, uint32_t aFormatFlags)
{
// check for strange format flags
NS_ASSERTION(!(aFormatFlags & gfxUserFontSet::FLAG_FORMAT_NOT_USED),

View File

@ -46,7 +46,7 @@ public:
GetSystemFontFamilyList(InfallibleTArray<mozilla::dom::FontFamilyListEntry>*
aFontFamilies) override;
bool IsFontFormatSupported(uint32_t aFormatFlags) override;
bool IsFontFormatSupported(nsIURI *aFontURI, uint32_t aFormatFlags) override;
virtual void GetCommonFallbackFonts(uint32_t aCh, uint32_t aNextCh,
Script aRunScript,

View File

@ -532,6 +532,7 @@ gfxUserFontEntry::DoLoadNextSrc(bool aForceAsync)
// src url ==> start the load process
else if (currSrc.mSourceType == gfxFontFaceSrc::eSourceType_URL) {
if (gfxPlatform::GetPlatform()->IsFontFormatSupported(
currSrc.mURI->get(),
currSrc.mFormatFlags)) {
if (ServoStyleSet* set = ServoStyleSet::Current()) {

View File

@ -881,7 +881,7 @@ gfxWindowsPlatform::CreateFontGroup(const FontFamilyList& aFontFamilyList,
}
bool
gfxWindowsPlatform::IsFontFormatSupported(uint32_t aFormatFlags)
gfxWindowsPlatform::IsFontFormatSupported(nsIURI *aFontURI, uint32_t aFormatFlags)
{
// check for strange format flags
NS_ASSERTION(!(aFormatFlags & gfxUserFontSet::FLAG_FORMAT_NOT_USED),

View File

@ -174,7 +174,7 @@ public:
/**
* Check whether format is supported on a platform or not (if unclear, returns true)
*/
virtual bool IsFontFormatSupported(uint32_t aFormatFlags) override;
virtual bool IsFontFormatSupported(nsIURI *aFontURI, uint32_t aFormatFlags) override;
virtual void CompositorUpdated() override;