Changeset 258870 in webkit
- Timestamp:
- Mar 23, 2020 1:19:38 PM (4 years ago)
- Location:
- branches/safari-609-branch/Source
- Files:
-
- 2 added
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-609-branch/Source/JavaScriptCore/API/JSWrapperMap.mm
r251425 r258870 41 41 #import "WeakGCMapInlines.h" 42 42 #import <wtf/Vector.h> 43 #import <wtf/spi/darwin/dyldSPI.h> 43 44 #if PLATFORM(COCOA) 45 #import <wtf/cocoa/RuntimeApplicationChecksCocoa.h> 46 #endif 44 47 45 48 #include <mach-o/dyld.h> … … 721 724 static uint32_t programSDKVersion = 0; 722 725 if (!programSDKVersion) 723 programSDKVersion = dyld_get_program_sdk_version();726 programSDKVersion = applicationSDKVersion(); 724 727 725 728 return programSDKVersion >= firstSDKVersionWithInitConstructorSupport; -
branches/safari-609-branch/Source/JavaScriptCore/ChangeLog
r258591 r258870 1 2020-03-13 Myles C. Maxfield <mmaxfield@apple.com> 2 3 [Cocoa] Push applicationSDKVersion() down from WebCore into WTF 4 https://bugs.webkit.org/show_bug.cgi?id=209030 5 6 Reviewed by Simon Fraser. 7 8 dyld_get_program_sdk_version() gives you the wrong answer in the Web Process (or at least 9 not the answer you actually want). There are already facilities for the UI Process to tell 10 the Web Process what the real value is, but those functions are currently in WebCore, 11 which is inaccessible to WTF. This patch is in preparation for 12 https://bugs.webkit.org/show_bug.cgi?id=208969 which needs to know this information in WTF. 13 14 I also found a few places which were calling dyld_get_program_sdk_version() in JavaScriptCore 15 and WebCore (which is wrong because those libraries exist in the Web Process), and have fixed 16 them up to use applicationSDKVersion() instead. 17 18 * API/JSWrapperMap.mm: 19 (supportsInitMethodConstructors): 20 1 21 2020-03-17 Alan Coon <alancoon@apple.com> 2 22 -
branches/safari-609-branch/Source/WTF/ChangeLog
r258853 r258870 1 2020-03-13 Myles C. Maxfield <mmaxfield@apple.com> 2 3 [Cocoa] Push applicationSDKVersion() down from WebCore into WTF 4 https://bugs.webkit.org/show_bug.cgi?id=209030 5 6 Reviewed by Simon Fraser. 7 8 * WTF.xcodeproj/project.pbxproj: 9 * wtf/PlatformMac.cmake: 10 * wtf/cocoa/RuntimeApplicationChecksCocoa.cpp: Added. 11 * wtf/cocoa/RuntimeApplicationChecksCocoa.h: Added. 12 (WTF::applicationSDKVersionOverride): 13 (WTF::setApplicationSDKVersion): 14 (WTF::applicationSDKVersion): 15 1 16 b"2020-03-23 Russell Epstein <repstein@apple.com>\n\n Cherry-pick r258658. rdar://problem/60756680\n\n REGRESSION(r254389): Cordova throws an exception because it expects a hyphen inside navigator.locale\n https://bugs.webkit.org/show_bug.cgi?id=208969\n <rdar://problem/59845517>\n \n Reviewed by Darin Adler.\n \n We want to thwart fingerprinting by minimizing the list of locales, but we also don't want to break existing apps.\n We can achieve both by a linked-on-or-after check.\n \n * wtf/cocoa/LanguageCocoa.mm:\n (WTF::canMinimizeLanguages):\n \n \n git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258658 268f45cc-cd09-0410-ab3c-d52691b4dbfc\n\n 2020-03-18 Myles C. Maxfield <mmaxfield@apple.com>\n\n REGRESSION(r254389): Cordova throws an exception because it expects a hyphen inside navigator.locale\n https://bugs.webkit.org/show_bug.cgi?id=208969\n <rdar://problem/59845517>\n\n Reviewed by Darin Adler.\n\n We want to thwart fingerprinting by minimizing the list of locales, but we also don't want to break existing apps.\n We can achieve both by a linked-on-or-after check.\n\n * wtf/cocoa/LanguageCocoa.mm:\n (WTF::canMinimizeLanguages):\n\n"2020-02-20 Russell Epstein <repstein@apple.com> 2 17 -
branches/safari-609-branch/Source/WTF/WTF.xcodeproj/project.pbxproj
r254865 r258870 62 62 1C181C961D30800A00F5FA16 /* TextBreakIteratorInternalICUCocoa.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1C181C951D30800A00F5FA16 /* TextBreakIteratorInternalICUCocoa.cpp */; }; 63 63 1C503BE623AAE0AE0072E66B /* LanguageCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1C503BE523AAE0AE0072E66B /* LanguageCocoa.mm */; }; 64 1CA85CA9241B0B260071C2F5 /* RuntimeApplicationChecksCocoa.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1CA85CA8241B0B260071C2F5 /* RuntimeApplicationChecksCocoa.cpp */; }; 64 65 1FA47C8A152502DA00568D1B /* WebCoreThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1FA47C88152502DA00568D1B /* WebCoreThread.cpp */; }; 65 66 2CCD892A15C0390200285083 /* GregorianDateTime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2CCD892915C0390200285083 /* GregorianDateTime.cpp */; }; … … 343 344 1C503BE423AADEEA0072E66B /* NSLocaleSPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NSLocaleSPI.h; sourceTree = "<group>"; }; 344 345 1C503BE523AAE0AE0072E66B /* LanguageCocoa.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = LanguageCocoa.mm; sourceTree = "<group>"; }; 346 1CA85CA7241B0B110071C2F5 /* RuntimeApplicationChecksCocoa.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RuntimeApplicationChecksCocoa.h; sourceTree = "<group>"; }; 347 1CA85CA8241B0B260071C2F5 /* RuntimeApplicationChecksCocoa.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RuntimeApplicationChecksCocoa.cpp; sourceTree = "<group>"; }; 345 348 1CCDB1491E566626006C73C0 /* TextBreakIteratorCF.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextBreakIteratorCF.h; sourceTree = "<group>"; }; 346 349 1CCDB14D1E566898006C73C0 /* TextBreakIteratorICU.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextBreakIteratorICU.h; sourceTree = "<group>"; }; … … 1486 1489 5CC0EE882162BC2200A1A842 /* NSURLExtras.mm */, 1487 1490 E392FA2622E92BFF00ECDC73 /* ResourceUsageCocoa.cpp */, 1491 1CA85CA8241B0B260071C2F5 /* RuntimeApplicationChecksCocoa.cpp */, 1492 1CA85CA7241B0B110071C2F5 /* RuntimeApplicationChecksCocoa.h */, 1488 1493 A30D412C1F0DE0BA00B71954 /* SoftLinking.h */, 1489 1494 5CC0EE862162BC2200A1A842 /* URLCocoa.mm */, … … 1667 1672 2CDED0EF18115C38004DBA70 /* RunLoopCF.cpp in Sources */, 1668 1673 A3EE5C3E21FFAC7D00FABD61 /* RunLoopTimerCF.cpp in Sources */, 1674 1CA85CA9241B0B260071C2F5 /* RuntimeApplicationChecksCocoa.cpp in Sources */, 1669 1675 A3EE5C3D21FFAC7D00FABD61 /* SchedulePairCF.cpp in Sources */, 1670 1676 A3EE5C4021FFACA200FABD61 /* SchedulePairMac.mm in Sources */, -
branches/safari-609-branch/Source/WTF/wtf/PlatformMac.cmake
r254615 r258870 17 17 cocoa/Entitlements.h 18 18 cocoa/NSURLExtras.h 19 cocoa/RuntimeApplicationChecksCocoa.h 19 20 cocoa/SoftLinking.h 20 21 … … 65 66 cocoa/NSURLExtras.mm 66 67 cocoa/ResourceUsageCocoa.cpp 68 cocoa/RuntimeApplicationChecksCocoa.cpp 69 cocoa/SystemTracingCocoa.cpp 67 70 cocoa/URLCocoa.mm 68 71 cocoa/WorkQueueCocoa.cpp -
branches/safari-609-branch/Source/WebCore/ChangeLog
r258856 r258870 1 2020-03-13 Myles C. Maxfield <mmaxfield@apple.com> 2 3 [Cocoa] Push applicationSDKVersion() down from WebCore into WTF 4 https://bugs.webkit.org/show_bug.cgi?id=209030 5 6 Reviewed by Simon Fraser. 7 8 * html/HTMLObjectElement.cpp: 9 * html/MediaElementSession.cpp: 10 (WebCore::MediaElementSession::requiresFullscreenForVideoPlayback const): 11 * loader/DocumentThreadableLoader.cpp: 12 (WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequest): 13 * platform/RuntimeApplicationChecks.h: 14 * platform/Timer.cpp: 15 (WebCore::shouldSuppressThreadSafetyCheck): 16 * platform/cocoa/RuntimeApplicationChecksCocoa.mm: 17 (WebCore::applicationSDKVersionOverride): Deleted. 18 (WebCore::setApplicationSDKVersion): Deleted. 19 (WebCore::applicationSDKVersion): Deleted. 20 1 21 b'2020-03-23 Russell Epstein <repstein@apple.com>\n\n Cherry-pick r258799. rdar://problem/60756681\n\n Content-Type & Nosniff Ignored on XML External Entity Resources\n <https://webkit.org/b/191171>\n <rdar://problem/45763222>\n \n Reviewed by Darin Adler.\n \n Source/WebCore:\n \n Test: http/tests/security/contentTypeOptions/nosniff-xml-external-entity.xhtml\n \n * platform/MIMETypeRegistry.cpp:\n (WebCore::MIMETypeRegistry::isXMLEntityMIMEType): Add.\n * platform/MIMETypeRegistry.h:\n (WebCore::MIMETypeRegistry::isXMLEntityMIMEType): Add.\n - Checks for XML external entity MIME types.\n \n * xml/parser/XMLDocumentParserLibxml2.cpp:\n (WebCore::externalEntityMimeTypeAllowedByNosniff): Add.\n - Checks whether the MIME type is valid based on the presence of\n the "X-Content-Type-Options: nosniff" header.\n (WebCore::openFunc):\n - Drop the contents of the resource that was returned and print\n an error message to the Web Inspector console if\n externalEntityMimeTypeAllowedByNosniff() says the MIME type is\n not allowed.\n \n LayoutTests:\n \n * http/tests/security/contentTypeOptions/nosniff-xml-external-entity-expected.txt: Add.\n * http/tests/security/contentTypeOptions/nosniff-xml-external-entity.xhtml: Add.\n \n git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258799 268f45cc-cd09-0410-ab3c-d52691b4dbfc\n\n 2020-03-20 David Kilzer <ddkilzer@apple.com>\n\n Content-Type & Nosniff Ignored on XML External Entity Resources\n <https://webkit.org/b/191171>\n <rdar://problem/45763222>\n\n Reviewed by Darin Adler.\n\n Test: http/tests/security/contentTypeOptions/nosniff-xml-external-entity.xhtml\n\n * platform/MIMETypeRegistry.cpp:\n (WebCore::MIMETypeRegistry::isXMLEntityMIMEType): Add.\n * platform/MIMETypeRegistry.h:\n (WebCore::MIMETypeRegistry::isXMLEntityMIMEType): Add.\n - Checks for XML external entity MIME types.\n\n * xml/parser/XMLDocumentParserLibxml2.cpp:\n (WebCore::externalEntityMimeTypeAllowedByNosniff): Add.\n - Checks whether the MIME type is valid based on the presence of\n the "X-Content-Type-Options: nosniff" header.\n (WebCore::openFunc):\n - Drop the contents of the resource that was returned and print\n an error message to the Web Inspector console if\n externalEntityMimeTypeAllowedByNosniff() says the MIME type is\n not allowed.\n\n b"2020-03-23 Russell Epstein <repstein@apple.com>\\n\\n Cherry-pick r258711. rdar://problem/60756645\\n\\n Source/WebCore:\\n AX: VO and safari: can\'t press the play button\\n https://bugs.webkit.org/show_bug.cgi?id=209249\\n \\n Reviewed by Darin Adler.\\n \\n Test: accessibility/ios-simulator/has-touch-event-listener-with-shadow.html\\n \\n If a node is in a shadowRoot, going up the node parent tree will stop and not check the entire tree for touch event listeners\\n and a touch event won\'t be dispatched. We need to change to use the parentInComposedTree instead to go up the chain.\\n \\n * accessibility/ios/AccessibilityObjectIOS.mm:\\n (WebCore::AccessibilityObject::hasTouchEventListener const):\\n \\n LayoutTests:\\n AX: VO and safari: caan\'t press the play button\\n https://bugs.webkit.org/show_bug.cgi?id=209249\\n \\n Reviewed by Darin Adler.\\n \\n * accessibility/ios-simulator/has-touch-event-listener-with-shadow-expected.txt: Added.\\n * accessibility/ios-simulator/has-touch-event-listener-with-shadow.html: Added.\\n \\n \\n git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258711 268f45cc-cd09-0410-ab3c-d52691b4dbfc\\n\\n 2020-03-19 Chris Fleizach <cfleizach@apple.com>\\n\\n AX: VO and safari: can\'t press the play button\\n https://bugs.webkit.org/show_bug.cgi?id=209249\\n\\n Reviewed by Darin Adler.\\n\\n Test: accessibility/ios-simulator/has-touch-event-listener-with-shadow.html\\n\\n If a node is in a shadowRoot, going up the node parent tree will stop and not check the entire tree for touch event listeners\\n and a touch event won\'t be dispatched. We need to change to use the parentInComposedTree instead to go up the chain.\\n\\n * accessibility/ios/AccessibilityObjectIOS.mm:\\n (WebCore::AccessibilityObject::hasTouchEventListener const):\\n\\n"2020-03-17 Alan Coon <alancoon@apple.com>\n\n Apply patch. rdar://problem/60396271\n\n 2020-03-17 Zalan Bujtas <zalan@apple.com>\n\n SVG filter triggers unstable layout.\n https://bugs.webkit.org/show_bug.cgi?id=207444\n rdar://problem/59297004\n\n Reviewed by Simon Fraser.\n\n SVG filter code marks DOM nodes dirty and schedules style recalc outside of the SVG root\n while in layout. This could lead to unstable layout and cause battery drain.\n (See webkit.org/b/208903)\n\n * rendering/RenderLayer.cpp: Remove filterNeedsRepaint(). It\'s a dangerously misleading name and should\n not be part of RenderLayer.\n (WebCore::RenderLayer::calculateClipRects const):\n * rendering/RenderLayer.h:\n * rendering/RenderLayerFilters.cpp:\n (WebCore::RenderLayerFilters::notifyFinished):\n * rendering/svg/RenderSVGResourceContainer.cpp:\n (WebCore::RenderSVGResourceContainer::markAllClientsForInvalidation):\n (WebCore::RenderSVGResourceContainer::markAllClientLayersForInvalidation):\n\n'2020-03-17 Alan Coon <alancoon@apple.com> 2 22 -
branches/safari-609-branch/Source/WebCore/html/HTMLObjectElement.cpp
r249237 r258870 55 55 #if PLATFORM(IOS_FAMILY) 56 56 #include "RuntimeApplicationChecks.h" 57 #include <wtf/spi/darwin/dyldSPI.h>58 57 #endif 59 58 -
branches/safari-609-branch/Source/WebCore/html/MediaElementSession.cpp
r253397 r258870 54 54 #include "AudioSession.h" 55 55 #include "RuntimeApplicationChecks.h" 56 #include <wtf/ spi/darwin/dyldSPI.h>56 #include <wtf/cocoa/RuntimeApplicationChecksCocoa.h> 57 57 #endif 58 58 … … 738 738 if (IOSApplication::isIBooks()) 739 739 return !m_element.hasAttributeWithoutSynchronization(HTMLNames::webkit_playsinlineAttr) && !m_element.hasAttributeWithoutSynchronization(HTMLNames::playsinlineAttr); 740 if ( dyld_get_program_sdk_version() < DYLD_IOS_VERSION_10_0)740 if (applicationSDKVersion() < DYLD_IOS_VERSION_10_0) 741 741 return !m_element.hasAttributeWithoutSynchronization(HTMLNames::webkit_playsinlineAttr); 742 742 #endif -
branches/safari-609-branch/Source/WebCore/loader/DocumentThreadableLoader.cpp
r256817 r258870 65 65 66 66 #if PLATFORM(IOS_FAMILY) 67 #include <wtf/ spi/darwin/dyldSPI.h>67 #include <wtf/cocoa/RuntimeApplicationChecksCocoa.h> 68 68 #endif 69 69 -
branches/safari-609-branch/Source/WebCore/platform/RuntimeApplicationChecks.h
r252000 r258870 43 43 bool isInWebProcess(); 44 44 bool isInNetworkProcess(); 45 46 WEBCORE_EXPORT void setApplicationSDKVersion(uint32_t);47 WEBCORE_EXPORT uint32_t applicationSDKVersion();48 45 49 46 WEBCORE_EXPORT void setApplicationBundleIdentifier(const String&); -
branches/safari-609-branch/Source/WebCore/platform/Timer.cpp
r252651 r258870 38 38 39 39 #if PLATFORM(COCOA) 40 #include <wtf/ spi/darwin/dyldSPI.h>40 #include <wtf/cocoa/RuntimeApplicationChecksCocoa.h> 41 41 #endif 42 42 -
branches/safari-609-branch/Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm
r252000 r258870 67 67 } 68 68 69 static Optional<uint32_t>& applicationSDKVersionOverride() 70 { 71 static NeverDestroyed<Optional<uint32_t>> version; 72 return version; 73 } 74 75 void setApplicationSDKVersion(uint32_t version) 76 { 77 applicationSDKVersionOverride() = version; 78 } 79 80 uint32_t applicationSDKVersion() 81 { 82 if (applicationSDKVersionOverride()) 83 return *applicationSDKVersionOverride(); 84 return dyld_get_program_sdk_version(); 69 void clearApplicationBundleIdentifierTestingOverride() 70 { 71 ASSERT(RunLoop::isMain()); 72 applicationBundleIdentifierOverride() = emptyString(); 73 #if !ASSERT_MSG_DISABLED 74 applicationBundleIdentifierOverrideWasQueried = false; 75 #endif 85 76 } 86 77 -
branches/safari-609-branch/Source/WebKit/ChangeLog
r258855 r258870 1 2020-03-13 Myles C. Maxfield <mmaxfield@apple.com> 2 3 [Cocoa] Push applicationSDKVersion() down from WebCore into WTF 4 https://bugs.webkit.org/show_bug.cgi?id=209030 5 6 Reviewed by Simon Fraser. 7 8 * NetworkProcess/cocoa/NetworkProcessCocoa.mm: 9 (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa): 10 * Shared/WebPreferencesDefaultValues.cpp: 11 (WebKit::defaultCSSOMViewScrollingAPIEnabled): 12 * WebProcess/cocoa/WebProcessCocoa.mm: 13 (WebKit::WebProcess::platformInitializeWebProcess): 14 1 15 b'2020-03-23 Russell Epstein <repstein@apple.com>\n\n Cherry-pick r258741. rdar://problem/60756641\n\n Sanitize suggested download filename received from web process\n https://bugs.webkit.org/show_bug.cgi?id=209300\n <rdar://problem/59487723>\n \n Patch by Alex Christensen <achristensen@webkit.org> on 2020-03-19\n Reviewed by Chris Dumez.\n \n Source/WebKit:\n \n * UIProcess/Downloads/DownloadProxy.cpp:\n (WebKit::DownloadProxy::decideDestinationWithSuggestedFilenameAsync):\n \n LayoutTests:\n \n * fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-backslash-expected.txt:\n * fast/dom/HTMLAnchorElement/anchor-file-blob-download-includes-backslash.html:\n \n git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258741 268f45cc-cd09-0410-ab3c-d52691b4dbfc\n\n 2020-03-19 Alex Christensen <achristensen@webkit.org>\n\n Sanitize suggested download filename received from web process\n https://bugs.webkit.org/show_bug.cgi?id=209300\n <rdar://problem/59487723>\n\n Reviewed by Chris Dumez.\n\n * UIProcess/Downloads/DownloadProxy.cpp:\n (WebKit::DownloadProxy::decideDestinationWithSuggestedFilenameAsync):\n\n'2020-03-23 Russell Epstein <repstein@apple.com> 2 16 -
branches/safari-609-branch/Source/WebKit/NetworkProcess/cocoa/NetworkProcessCocoa.mm
r256255 r258870 46 46 #import <wtf/ProcessPrivilege.h> 47 47 #import <wtf/RetainPtr.h> 48 #import <wtf/cocoa/RuntimeApplicationChecksCocoa.h> 48 49 49 50 namespace WebKit { … … 72 73 { 73 74 WebCore::setApplicationBundleIdentifier(parameters.uiProcessBundleIdentifier); 74 WebCore::setApplicationSDKVersion(parameters.uiProcessSDKVersion);75 setApplicationSDKVersion(parameters.uiProcessSDKVersion); 75 76 76 77 #if HAVE(HSTS_STORAGE_PATH) -
branches/safari-609-branch/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp
r255738 r258870 29 29 30 30 #if PLATFORM(COCOA) 31 #include <wtf/spi/darwin/dyldSPI.h>32 #endif33 34 #if PLATFORM(IOS_FAMILY)35 31 #include "VersionChecks.h" 32 #include <pal/spi/cocoa/FeatureFlagsSPI.h> 33 #include <wtf/cocoa/RuntimeApplicationChecksCocoa.h> 36 34 #endif 37 35 … … 50 48 { 51 49 #if PLATFORM(IOS_FAMILY) 52 if (WebCore::IOSApplication::isIMDb() && WebCore::applicationSDKVersion() < DYLD_IOS_VERSION_13_0)50 if (WebCore::IOSApplication::isIMDb() && applicationSDKVersion() < DYLD_IOS_VERSION_13_0) 53 51 return false; 54 52 #endif -
branches/safari-609-branch/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
r256818 r258870 80 80 #import <wtf/ProcessPrivilege.h> 81 81 #import <wtf/cocoa/NSURLExtras.h> 82 #import <wtf/cocoa/RuntimeApplicationChecksCocoa.h> 82 83 83 84 #if PLATFORM(IOS) … … 163 164 164 165 WebCore::setApplicationBundleIdentifier(parameters.uiProcessBundleIdentifier); 165 WebCore::setApplicationSDKVersion(parameters.uiProcessSDKVersion);166 setApplicationSDKVersion(parameters.uiProcessSDKVersion); 166 167 167 168 m_uiProcessBundleIdentifier = parameters.uiProcessBundleIdentifier;
Note: See TracChangeset
for help on using the changeset viewer.