WebKit Bugzilla
Attachment 362589 Details for
Bug 194895
: Incorrect use of String::foldCase for font family names
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-194895-20190220213326.patch (text/plain), 2.71 KB, created by
Darin Adler
on 2019-02-20 21:33:26 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Darin Adler
Created:
2019-02-20 21:33:26 PST
Size:
2.71 KB
patch
obsolete
>Subversion Revision: 241860 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 26277ea5e6422ed0ab34dfff421fa7cbc3266123..8abc90f98b8968700c727b109727e8a2819081e8 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,21 @@ >+2019-02-20 Darin Adler <darin@apple.com> >+ >+ Incorrect use of String::foldCase for font family names >+ https://bugs.webkit.org/show_bug.cgi?id=194895 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * platform/graphics/FontCascadeDescription.cpp: >+ (WebCore::FontCascadeDescription::foldedFamilyName): Use convertToASCIILowercase >+ instead of foldCase for three reasons: 1) Other functions in this class are folding >+ only ASCII case by using ASCIICaseInsensitiveHash, so this one should be consistent. >+ 2) This is considerably faster, and 3) Font family names don't need arbitrary >+ Unicode case folding, it's only A-Z that should be folded. >+ >+ * platform/graphics/cocoa/FontCacheCoreText.cpp: >+ (WebCore::FontDatabase::collectionForFamily): Use convertToASCIILowercase here >+ for basically the same reason as above. >+ > 2019-02-20 Simon Fraser <simon.fraser@apple.com> > > REGRESSION (240698): Fixed position banners flicker and move when scrolling on iOS >diff --git a/Source/WebCore/platform/graphics/FontCascadeDescription.cpp b/Source/WebCore/platform/graphics/FontCascadeDescription.cpp >index f75547af48d6613b29e5c879ce69ab11b6d66dd4..a744bf97c3783b43e0cbac11d9283c6a38775356 100644 >--- a/Source/WebCore/platform/graphics/FontCascadeDescription.cpp >+++ b/Source/WebCore/platform/graphics/FontCascadeDescription.cpp >@@ -140,7 +140,7 @@ String FontCascadeDescription::foldedFamilyName(const AtomicString& family) > // always take the case insensitive patch once this radar is fixed. > if (family.startsWith('.')) > return family.string(); >- return family.string().foldCase(); >+ return family.string().convertToASCIILowercase(); > } > > } // namespace WebCore >diff --git a/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp b/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp >index 528528425b674f8afba311ced16e75f06284fc71..e0449f654d09e68ba90ccde761f52ddbd82223a0 100644 >--- a/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp >+++ b/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp >@@ -887,7 +887,7 @@ public: > > const InstalledFontFamily& collectionForFamily(const String& familyName) > { >- auto folded = familyName.foldCase(); >+ auto folded = familyName.convertToASCIILowercase(); > { > std::lock_guard<Lock> locker(m_familyNameToFontDescriptorsLock); > auto it = m_familyNameToFontDescriptors.find(folded);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194895
:
362589
|
362591