Changeset 230082 in webkit
- Timestamp:
- Mar 29, 2018 2:49:25 PM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r230081 r230082 1 2018-03-29 Daniel Bates <dabates@apple.com> 2 3 MIMETypeRegistry should return const HashSets 4 https://bugs.webkit.org/show_bug.cgi?id=184150 5 6 Reviewed by Per Arne Vollan. 7 8 Only getSupportedNonImageMIMETypes() needs to return a non-const HashSet so that 9 LegacyWebKit can modify the set of non-image MIME types. 10 11 * platform/MIMETypeRegistry.cpp: 12 (WebCore::MIMETypeRegistry::getSupportedImageMIMETypes): 13 (WebCore::MIMETypeRegistry::getSupportedImageResourceMIMETypes): 14 (WebCore::MIMETypeRegistry::getSupportedImageMIMETypesForEncoding): 15 (WebCore::MIMETypeRegistry::getSupportedMediaMIMETypes): 16 (WebCore::MIMETypeRegistry::getPDFMIMETypes): 17 (WebCore::MIMETypeRegistry::getUnsupportedTextMIMETypes): 18 * platform/MIMETypeRegistry.h: 19 1 20 2018-03-29 Brady Eidson <beidson@apple.com> 2 21 -
trunk/Source/WebCore/platform/MIMETypeRegistry.cpp
r229498 r230082 652 652 } 653 653 654 HashSet<String, ASCIICaseInsensitiveHash>& MIMETypeRegistry::getSupportedImageMIMETypes()654 const HashSet<String, ASCIICaseInsensitiveHash>& MIMETypeRegistry::getSupportedImageMIMETypes() 655 655 { 656 656 if (!supportedImageMIMETypes) … … 659 659 } 660 660 661 HashSet<String, ASCIICaseInsensitiveHash>& MIMETypeRegistry::getSupportedImageResourceMIMETypes()661 const HashSet<String, ASCIICaseInsensitiveHash>& MIMETypeRegistry::getSupportedImageResourceMIMETypes() 662 662 { 663 663 if (!supportedImageResourceMIMETypes) … … 666 666 } 667 667 668 HashSet<String, ASCIICaseInsensitiveHash>& MIMETypeRegistry::getSupportedImageMIMETypesForEncoding()668 const HashSet<String, ASCIICaseInsensitiveHash>& MIMETypeRegistry::getSupportedImageMIMETypesForEncoding() 669 669 { 670 670 if (!supportedImageMIMETypesForEncoding) … … 680 680 } 681 681 682 HashSet<String, ASCIICaseInsensitiveHash>& MIMETypeRegistry::getSupportedMediaMIMETypes()682 const HashSet<String, ASCIICaseInsensitiveHash>& MIMETypeRegistry::getSupportedMediaMIMETypes() 683 683 { 684 684 if (!supportedMediaMIMETypes) … … 688 688 689 689 690 HashSet<String, ASCIICaseInsensitiveHash>& MIMETypeRegistry::getPDFMIMETypes()690 const HashSet<String, ASCIICaseInsensitiveHash>& MIMETypeRegistry::getPDFMIMETypes() 691 691 { 692 692 if (!pdfMIMETypes) … … 695 695 } 696 696 697 HashSet<String, ASCIICaseInsensitiveHash>& MIMETypeRegistry::getUnsupportedTextMIMETypes()697 const HashSet<String, ASCIICaseInsensitiveHash>& MIMETypeRegistry::getUnsupportedTextMIMETypes() 698 698 { 699 699 if (!unsupportedTextMIMETypes) -
trunk/Source/WebCore/platform/MIMETypeRegistry.h
r225472 r230082 107 107 // FIXME: WebKit coding style says we should not have the word "get" in the names of these functions. 108 108 // FIXME: Would be nice to find a way to avoid exposing these sets, even worse exposing non-const references. 109 WEBCORE_EXPORT static HashSet<String, ASCIICaseInsensitiveHash>& getSupportedImageMIMETypes();110 static HashSet<String, ASCIICaseInsensitiveHash>& getSupportedImageResourceMIMETypes();111 static HashSet<String, ASCIICaseInsensitiveHash>& getSupportedImageMIMETypesForEncoding();112 109 WEBCORE_EXPORT static HashSet<String, ASCIICaseInsensitiveHash>& getSupportedNonImageMIMETypes(); 113 WEBCORE_EXPORT static HashSet<String, ASCIICaseInsensitiveHash>& getSupportedMediaMIMETypes(); 114 WEBCORE_EXPORT static HashSet<String, ASCIICaseInsensitiveHash>& getPDFMIMETypes(); 115 WEBCORE_EXPORT static HashSet<String, ASCIICaseInsensitiveHash>& getUnsupportedTextMIMETypes(); 110 111 WEBCORE_EXPORT const static HashSet<String, ASCIICaseInsensitiveHash>& getSupportedImageMIMETypes(); 112 const static HashSet<String, ASCIICaseInsensitiveHash>& getSupportedImageResourceMIMETypes(); 113 const static HashSet<String, ASCIICaseInsensitiveHash>& getSupportedImageMIMETypesForEncoding(); 114 WEBCORE_EXPORT const static HashSet<String, ASCIICaseInsensitiveHash>& getSupportedMediaMIMETypes(); 115 WEBCORE_EXPORT const static HashSet<String, ASCIICaseInsensitiveHash>& getPDFMIMETypes(); 116 WEBCORE_EXPORT const static HashSet<String, ASCIICaseInsensitiveHash>& getUnsupportedTextMIMETypes(); 116 117 117 118 // FIXME: WebKit coding style says we should not have the word "get" in the name of this function.
Note: See TracChangeset
for help on using the changeset viewer.