Changeset 260769 in webkit
- Timestamp:
- Apr 27, 2020 1:01:53 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 1 deleted
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r260762 r260769 1 2020-04-27 Per Arne Vollan <pvollan@apple.com> 2 3 [Cocoa] After r258891, r255119 can be reverted 4 https://bugs.webkit.org/show_bug.cgi?id=211083 5 <rdar://problem/60714318> 6 7 Unreviewed revert of r255119. 8 9 Copying a MIME type map from the UI process to the WebContent process on startup is not needed anymore, 10 since r258891 will map the Launch Services database in the WebContent process. 11 12 * platform/MIMETypeRegistry.cpp: 13 (WebCore::commonMimeTypesMap): 14 (WebCore::typesForCommonExtension): 15 (WebCore::overriddenMimeTypesMap): Deleted. 16 * platform/MIMETypeRegistry.h: 17 * testing/Internals.cpp: 18 (WebCore::Internals::mediaMIMETypeForExtension): Deleted. 19 * testing/Internals.h: 20 * testing/Internals.idl: 21 1 22 2020-04-27 Darin Adler <darin@apple.com> 2 23 -
trunk/Source/WebCore/platform/MIMETypeRegistry.cpp
r260707 r260769 271 271 } 272 272 273 Optional<HashMap<String, Vector<String>, ASCIICaseInsensitiveHash>>& overriddenMimeTypesMap()274 {275 static NeverDestroyed<Optional<HashMap<String, Vector<String>, ASCIICaseInsensitiveHash>>> map;276 return map;277 }278 279 273 const std::initializer_list<TypeExtensionPair>& commonMediaTypes() 280 274 { … … 363 357 } 364 358 365 const HashMap<String, Vector<String>, ASCIICaseInsensitiveHash>& commonMimeTypesMap()359 static const HashMap<String, Vector<String>, ASCIICaseInsensitiveHash>& commonMimeTypesMap() 366 360 { 367 361 ASSERT(isMainThread()); … … 388 382 static const Vector<String>* typesForCommonExtension(const String& extension) 389 383 { 390 if (overriddenMimeTypesMap().hasValue()) {391 auto mapEntry = overriddenMimeTypesMap()->find(extension);392 if (mapEntry == overriddenMimeTypesMap()->end())393 return nullptr;394 return &mapEntry->value;395 }396 384 auto mapEntry = commonMimeTypesMap().find(extension); 397 385 if (mapEntry == commonMimeTypesMap().end()) -
trunk/Source/WebCore/platform/MIMETypeRegistry.h
r258799 r260769 31 31 32 32 namespace WebCore { 33 34 WEBCORE_EXPORT Optional<HashMap<String, Vector<String>, ASCIICaseInsensitiveHash>>& overriddenMimeTypesMap();35 WEBCORE_EXPORT const HashMap<String, Vector<String>, ASCIICaseInsensitiveHash>& commonMimeTypesMap();36 33 37 34 struct TypeExtensionPair { -
trunk/Source/WebCore/testing/Internals.cpp
r260744 r260769 120 120 #include "LoaderStrategy.h" 121 121 #include "Location.h" 122 #include "MIMETypeRegistry.h"123 122 #include "MallocStatistics.h" 124 123 #include "MediaDevices.h" … … 5634 5633 #endif 5635 5634 5636 String Internals::mediaMIMETypeForExtension(const String& extension)5637 {5638 return MIMETypeRegistry::getMediaMIMETypeForExtension(extension);5639 }5640 5641 5635 bool Internals::supportsPictureInPicture() 5642 5636 { -
trunk/Source/WebCore/testing/Internals.h
r260505 r260769 994 994 String encodedPreferenceValue(const String& domain, const String& key); 995 995 996 String mediaMIMETypeForExtension(const String& extension);997 998 996 String getUTIFromTag(const String& tagClass, const String& tag, const String& conformingToUTI); 999 997 -
trunk/Source/WebCore/testing/Internals.idl
r260505 r260769 897 897 DOMString encodedPreferenceValue(DOMString domain, DOMString key); 898 898 899 DOMString mediaMIMETypeForExtension(DOMString extension);900 901 899 DOMString getUTIFromTag(DOMString tagClass, DOMString tag, DOMString conformingToUTI); 902 900 -
trunk/Source/WebKit/ChangeLog
r260768 r260769 1 2020-04-27 Per Arne Vollan <pvollan@apple.com> 2 3 [Cocoa] After r258891, r255119 can be reverted 4 https://bugs.webkit.org/show_bug.cgi?id=211083 5 6 Unreviewed revert of r255119. 7 8 * Shared/WebProcessCreationParameters.cpp: 9 (WebKit::WebProcessCreationParameters::encode const): 10 (WebKit::WebProcessCreationParameters::decode): 11 * Shared/WebProcessCreationParameters.h: 12 * UIProcess/Cocoa/WebProcessPoolCocoa.mm: 13 (WebKit::WebProcessPool::platformInitializeWebProcess): 14 * WebProcess/cocoa/WebProcessCocoa.mm: 15 (WebKit::WebProcess::platformInitializeWebProcess): 16 1 17 2020-04-27 Brent Fulgham <bfulgham@apple.com> 2 18 -
trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp
r260650 r260769 180 180 encoder << mapDBExtensionHandle; 181 181 encoder << systemHasBattery; 182 encoder << mimeTypesMap;183 182 #endif 184 183 … … 504 503 return false; 505 504 parameters.systemHasBattery = WTFMove(*systemHasBattery); 506 507 Optional<Optional<HashMap<String, Vector<String>, ASCIICaseInsensitiveHash>>> mimeTypesMap;508 decoder >> mimeTypesMap;509 if (!mimeTypesMap)510 return false;511 parameters.mimeTypesMap = WTFMove(*mimeTypesMap);512 505 #endif 513 506 -
trunk/Source/WebKit/Shared/WebProcessCreationParameters.h
r260650 r260769 218 218 Optional<SandboxExtension::Handle> mapDBExtensionHandle; 219 219 bool systemHasBattery { false }; 220 Optional<HashMap<String, Vector<String>, ASCIICaseInsensitiveHash>> mimeTypesMap;221 220 #endif 222 221 -
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
r260650 r260769 52 52 #import <WebCore/Color.h> 53 53 #import <WebCore/LocalizedDeviceModel.h> 54 #import <WebCore/MIMETypeRegistry.h>55 54 #import <WebCore/NetworkStorageSession.h> 56 55 #import <WebCore/NotImplemented.h> … … 415 414 } 416 415 parameters.systemHasBattery = systemHasBattery(); 417 parameters.mimeTypesMap = commonMimeTypesMap();418 416 419 417 SandboxExtension::Handle mapDBHandle; -
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
r260709 r260769 62 62 #import <WebCore/LocalizedStrings.h> 63 63 #import <WebCore/LogInitialization.h> 64 #import <WebCore/MIMETypeRegistry.h>65 64 #import <WebCore/MemoryRelease.h> 66 65 #import <WebCore/NSScrollerImpDetails.h> … … 328 327 setSystemHasBattery(parameters.systemHasBattery); 329 328 330 if (parameters.mimeTypesMap)331 overriddenMimeTypesMap() = WTFMove(parameters.mimeTypesMap);332 333 329 #if PLATFORM(IOS_FAMILY) 334 330 RenderThemeIOS::setCSSValueToSystemColorMap(WTFMove(parameters.cssValueToSystemColorMap)); -
trunk/Tools/ChangeLog
r260759 r260769 1 2020-04-27 Per Arne Vollan <pvollan@apple.com> 2 3 [Cocoa] After r258891, r255119 can be reverted 4 https://bugs.webkit.org/show_bug.cgi?id=211083 5 6 Unreviewed revert of r255119. 7 8 * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: 9 * TestWebKitAPI/Tests/WebKit/MimeTypes.mm: Removed. 10 1 11 2020-04-27 Daniel Bates <dabates@apple.com> 2 12 -
trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
r260712 r260769 890 890 C0C5D3C61459912900A802A6 /* GetBackingScaleFactor_Bundle.mm in Sources */ = {isa = PBXBuildFile; fileRef = C0C5D3BD14598B6F00A802A6 /* GetBackingScaleFactor_Bundle.mm */; }; 891 891 C13D82D92416F13200A62793 /* EnableAccessibility.mm in Sources */ = {isa = PBXBuildFile; fileRef = C13D82D82416F13200A62793 /* EnableAccessibility.mm */; }; 892 C145CC0C23DA5A1F003A5EEB /* MimeTypes.mm in Sources */ = {isa = PBXBuildFile; fileRef = C145CC0B23DA5A0F003A5EEB /* MimeTypes.mm */; };893 892 C149D550242E98DF003EBB12 /* SleepDisabler.mm in Sources */ = {isa = PBXBuildFile; fileRef = C149D54F242E9844003EBB12 /* SleepDisabler.mm */; }; 894 893 C15CBB3023F1FF1A00300CC7 /* BacklightLevelNotification.mm in Sources */ = {isa = PBXBuildFile; fileRef = C15CBB2F23F1FF1A00300CC7 /* BacklightLevelNotification.mm */; }; … … 2485 2484 C0C5D3BD14598B6F00A802A6 /* GetBackingScaleFactor_Bundle.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = GetBackingScaleFactor_Bundle.mm; sourceTree = "<group>"; }; 2486 2485 C13D82D82416F13200A62793 /* EnableAccessibility.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = EnableAccessibility.mm; sourceTree = "<group>"; }; 2487 C145CC0B23DA5A0F003A5EEB /* MimeTypes.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MimeTypes.mm; sourceTree = "<group>"; };2488 2486 C149D54F242E9844003EBB12 /* SleepDisabler.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SleepDisabler.mm; sourceTree = "<group>"; }; 2489 2487 C15CBB2F23F1FF1A00300CC7 /* BacklightLevelNotification.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = BacklightLevelNotification.mm; sourceTree = "<group>"; }; … … 2955 2953 E34A6D182412DE390012AB6E /* GrantAccessToPreferencesService.mm */, 2956 2954 E35B908123F60DD0000011FF /* LocalizedDeviceModel.mm */, 2957 C145CC0B23DA5A0F003A5EEB /* MimeTypes.mm */,2958 2955 E325C90623E3870200BC7D3B /* PictureInPictureSupport.mm */, 2959 2956 C15CBB3E23FB177A00300CC7 /* PreferenceChanges.mm */, … … 4989 4986 5165FE04201EE620009F7EC3 /* MessagePortProviders.mm in Sources */, 4990 4987 A5B149DE1F5A19EA00C6DAFF /* MIMETypeRegistry.cpp in Sources */, 4991 C145CC0C23DA5A1F003A5EEB /* MimeTypes.mm in Sources */,4992 4988 51CD1C6C1B38CE4300142CA5 /* ModalAlerts.mm in Sources */, 4993 4989 7C83E0B61D0A64B300FEBCF3 /* ModalAlertsSPI.cpp in Sources */,
Note: See TracChangeset
for help on using the changeset viewer.