Diff
Modified: branches/safari-609-branch/Source/_javascript_Core/API/JSWrapperMap.mm (258869 => 258870)
--- branches/safari-609-branch/Source/_javascript_Core/API/JSWrapperMap.mm 2020-03-23 19:46:57 UTC (rev 258869)
+++ branches/safari-609-branch/Source/_javascript_Core/API/JSWrapperMap.mm 2020-03-23 20:19:38 UTC (rev 258870)
@@ -40,8 +40,11 @@
#import "WeakGCMap.h"
#import "WeakGCMapInlines.h"
#import <wtf/Vector.h>
-#import <wtf/spi/darwin/dyldSPI.h>
+#if PLATFORM(COCOA)
+#import <wtf/cocoa/RuntimeApplicationChecksCocoa.h>
+#endif
+
#include <mach-o/dyld.h>
#if PLATFORM(APPLETV)
@@ -720,7 +723,7 @@
// base our check on what SDK was used to build the application.
static uint32_t programSDKVersion = 0;
if (!programSDKVersion)
- programSDKVersion = dyld_get_program_sdk_version();
+ programSDKVersion = applicationSDKVersion();
return programSDKVersion >= firstSDKVersionWithInitConstructorSupport;
#endif
Modified: branches/safari-609-branch/Source/_javascript_Core/ChangeLog (258869 => 258870)
--- branches/safari-609-branch/Source/_javascript_Core/ChangeLog 2020-03-23 19:46:57 UTC (rev 258869)
+++ branches/safari-609-branch/Source/_javascript_Core/ChangeLog 2020-03-23 20:19:38 UTC (rev 258870)
@@ -1,3 +1,23 @@
+2020-03-13 Myles C. Maxfield <[email protected]>
+
+ [Cocoa] Push applicationSDKVersion() down from WebCore into WTF
+ https://bugs.webkit.org/show_bug.cgi?id=209030
+
+ Reviewed by Simon Fraser.
+
+ dyld_get_program_sdk_version() gives you the wrong answer in the Web Process (or at least
+ not the answer you actually want). There are already facilities for the UI Process to tell
+ the Web Process what the real value is, but those functions are currently in WebCore,
+ which is inaccessible to WTF. This patch is in preparation for
+ https://bugs.webkit.org/show_bug.cgi?id=208969 which needs to know this information in WTF.
+
+ I also found a few places which were calling dyld_get_program_sdk_version() in _javascript_Core
+ and WebCore (which is wrong because those libraries exist in the Web Process), and have fixed
+ them up to use applicationSDKVersion() instead.
+
+ * API/JSWrapperMap.mm:
+ (supportsInitMethodConstructors):
+
2020-03-17 Alan Coon <[email protected]>
Apply patch. rdar://problem/60396286
Modified: branches/safari-609-branch/Source/WTF/ChangeLog (258869 => 258870)
--- branches/safari-609-branch/Source/WTF/ChangeLog 2020-03-23 19:46:57 UTC (rev 258869)
+++ branches/safari-609-branch/Source/WTF/ChangeLog 2020-03-23 20:19:38 UTC (rev 258870)
@@ -1,3 +1,18 @@
+2020-03-13 Myles C. Maxfield <[email protected]>
+
+ [Cocoa] Push applicationSDKVersion() down from WebCore into WTF
+ https://bugs.webkit.org/show_bug.cgi?id=209030
+
+ Reviewed by Simon Fraser.
+
+ * WTF.xcodeproj/project.pbxproj:
+ * wtf/PlatformMac.cmake:
+ * wtf/cocoa/RuntimeApplicationChecksCocoa.cpp: Added.
+ * wtf/cocoa/RuntimeApplicationChecksCocoa.h: Added.
+ (WTF::applicationSDKVersionOverride):
+ (WTF::setApplicationSDKVersion):
+ (WTF::applicationSDKVersion):
+
b"2020-03-23 Russell Epstein <[email protected]>\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 <[email protected]>\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 <[email protected]>
Cherry-pick r256806. rdar://problem/59576023
Modified: branches/safari-609-branch/Source/WTF/WTF.xcodeproj/project.pbxproj (258869 => 258870)
--- branches/safari-609-branch/Source/WTF/WTF.xcodeproj/project.pbxproj 2020-03-23 19:46:57 UTC (rev 258869)
+++ branches/safari-609-branch/Source/WTF/WTF.xcodeproj/project.pbxproj 2020-03-23 20:19:38 UTC (rev 258870)
@@ -61,6 +61,7 @@
1C181C931D307AB800F5FA16 /* UTextProviderUTF16.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1C181C8D1D307AB800F5FA16 /* UTextProviderUTF16.cpp */; };
1C181C961D30800A00F5FA16 /* TextBreakIteratorInternalICUCocoa.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1C181C951D30800A00F5FA16 /* TextBreakIteratorInternalICUCocoa.cpp */; };
1C503BE623AAE0AE0072E66B /* LanguageCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1C503BE523AAE0AE0072E66B /* LanguageCocoa.mm */; };
+ 1CA85CA9241B0B260071C2F5 /* RuntimeApplicationChecksCocoa.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1CA85CA8241B0B260071C2F5 /* RuntimeApplicationChecksCocoa.cpp */; };
1FA47C8A152502DA00568D1B /* WebCoreThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1FA47C88152502DA00568D1B /* WebCoreThread.cpp */; };
2CCD892A15C0390200285083 /* GregorianDateTime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2CCD892915C0390200285083 /* GregorianDateTime.cpp */; };
2CDED0EF18115C38004DBA70 /* RunLoopCF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2CDED0EE18115C38004DBA70 /* RunLoopCF.cpp */; };
@@ -342,6 +343,8 @@
1C181C951D30800A00F5FA16 /* TextBreakIteratorInternalICUCocoa.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TextBreakIteratorInternalICUCocoa.cpp; sourceTree = "<group>"; };
1C503BE423AADEEA0072E66B /* NSLocaleSPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NSLocaleSPI.h; sourceTree = "<group>"; };
1C503BE523AAE0AE0072E66B /* LanguageCocoa.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = LanguageCocoa.mm; sourceTree = "<group>"; };
+ 1CA85CA7241B0B110071C2F5 /* RuntimeApplicationChecksCocoa.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RuntimeApplicationChecksCocoa.h; sourceTree = "<group>"; };
+ 1CA85CA8241B0B260071C2F5 /* RuntimeApplicationChecksCocoa.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RuntimeApplicationChecksCocoa.cpp; sourceTree = "<group>"; };
1CCDB1491E566626006C73C0 /* TextBreakIteratorCF.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextBreakIteratorCF.h; sourceTree = "<group>"; };
1CCDB14D1E566898006C73C0 /* TextBreakIteratorICU.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextBreakIteratorICU.h; sourceTree = "<group>"; };
1CCDB1511E566BC5006C73C0 /* CFStringSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CFStringSPI.h; sourceTree = "<group>"; };
@@ -1485,6 +1488,8 @@
5CC0EE872162BC2200A1A842 /* NSURLExtras.h */,
5CC0EE882162BC2200A1A842 /* NSURLExtras.mm */,
E392FA2622E92BFF00ECDC73 /* ResourceUsageCocoa.cpp */,
+ 1CA85CA8241B0B260071C2F5 /* RuntimeApplicationChecksCocoa.cpp */,
+ 1CA85CA7241B0B110071C2F5 /* RuntimeApplicationChecksCocoa.h */,
A30D412C1F0DE0BA00B71954 /* SoftLinking.h */,
5CC0EE862162BC2200A1A842 /* URLCocoa.mm */,
E4A0AD3C1A96253C00536DF6 /* WorkQueueCocoa.cpp */,
@@ -1666,6 +1671,7 @@
2CDED0F318115C85004DBA70 /* RunLoop.cpp in Sources */,
2CDED0EF18115C38004DBA70 /* RunLoopCF.cpp in Sources */,
A3EE5C3E21FFAC7D00FABD61 /* RunLoopTimerCF.cpp in Sources */,
+ 1CA85CA9241B0B260071C2F5 /* RuntimeApplicationChecksCocoa.cpp in Sources */,
A3EE5C3D21FFAC7D00FABD61 /* SchedulePairCF.cpp in Sources */,
A3EE5C4021FFACA200FABD61 /* SchedulePairMac.mm in Sources */,
0F66B28E1DC97BAB004A1D3F /* Seconds.cpp in Sources */,
Modified: branches/safari-609-branch/Source/WTF/wtf/PlatformMac.cmake (258869 => 258870)
--- branches/safari-609-branch/Source/WTF/wtf/PlatformMac.cmake 2020-03-23 19:46:57 UTC (rev 258869)
+++ branches/safari-609-branch/Source/WTF/wtf/PlatformMac.cmake 2020-03-23 20:19:38 UTC (rev 258870)
@@ -16,6 +16,7 @@
cocoa/CrashReporter.h
cocoa/Entitlements.h
cocoa/NSURLExtras.h
+ cocoa/RuntimeApplicationChecksCocoa.h
cocoa/SoftLinking.h
darwin/WeakLinking.h
@@ -64,6 +65,8 @@
cocoa/MemoryPressureHandlerCocoa.mm
cocoa/NSURLExtras.mm
cocoa/ResourceUsageCocoa.cpp
+ cocoa/RuntimeApplicationChecksCocoa.cpp
+ cocoa/SystemTracingCocoa.cpp
cocoa/URLCocoa.mm
cocoa/WorkQueueCocoa.cpp
Added: branches/safari-609-branch/Source/WTF/wtf/cocoa/RuntimeApplicationChecksCocoa.cpp (0 => 258870)
--- branches/safari-609-branch/Source/WTF/wtf/cocoa/RuntimeApplicationChecksCocoa.cpp (rev 0)
+++ branches/safari-609-branch/Source/WTF/wtf/cocoa/RuntimeApplicationChecksCocoa.cpp 2020-03-23 20:19:38 UTC (rev 258870)
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2011-2020 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include <wtf/cocoa/RuntimeApplicationChecksCocoa.h>
+
+#include <wtf/NeverDestroyed.h>
+#include <wtf/Optional.h>
+
+namespace WTF {
+
+static Optional<uint32_t>& applicationSDKVersionOverride()
+{
+ static NeverDestroyed<Optional<uint32_t>> version;
+ return version;
+}
+
+void setApplicationSDKVersion(uint32_t version)
+{
+ applicationSDKVersionOverride() = version;
+}
+
+uint32_t applicationSDKVersion()
+{
+ if (applicationSDKVersionOverride())
+ return *applicationSDKVersionOverride();
+ return dyld_get_program_sdk_version();
+}
+
+}
Added: branches/safari-609-branch/Source/WTF/wtf/cocoa/RuntimeApplicationChecksCocoa.h (0 => 258870)
--- branches/safari-609-branch/Source/WTF/wtf/cocoa/RuntimeApplicationChecksCocoa.h (rev 0)
+++ branches/safari-609-branch/Source/WTF/wtf/cocoa/RuntimeApplicationChecksCocoa.h 2020-03-23 20:19:38 UTC (rev 258870)
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2009-2020 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include <wtf/Forward.h>
+
+// This contains the values with which to compare the return value of applicationSDKVersion().
+#include <wtf/spi/darwin/dyldSPI.h>
+
+namespace WTF {
+
+// dyld_get_program_sdk_version() gives you the wrong answer in any process other than the UI process.
+// These functions are hooked up to give you the right answer.
+WTF_EXPORT_PRIVATE void setApplicationSDKVersion(uint32_t);
+WTF_EXPORT_PRIVATE uint32_t applicationSDKVersion();
+
+}
+
+using WTF::setApplicationSDKVersion;
+using WTF::applicationSDKVersion;
Modified: branches/safari-609-branch/Source/WebCore/ChangeLog (258869 => 258870)
--- branches/safari-609-branch/Source/WebCore/ChangeLog 2020-03-23 19:46:57 UTC (rev 258869)
+++ branches/safari-609-branch/Source/WebCore/ChangeLog 2020-03-23 20:19:38 UTC (rev 258870)
@@ -1,3 +1,23 @@
+2020-03-13 Myles C. Maxfield <[email protected]>
+
+ [Cocoa] Push applicationSDKVersion() down from WebCore into WTF
+ https://bugs.webkit.org/show_bug.cgi?id=209030
+
+ Reviewed by Simon Fraser.
+
+ * html/HTMLObjectElement.cpp:
+ * html/MediaElementSession.cpp:
+ (WebCore::MediaElementSession::requiresFullscreenForVideoPlayback const):
+ * loader/DocumentThreadableLoader.cpp:
+ (WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequest):
+ * platform/RuntimeApplicationChecks.h:
+ * platform/Timer.cpp:
+ (WebCore::shouldSuppressThreadSafetyCheck):
+ * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
+ (WebCore::applicationSDKVersionOverride): Deleted.
+ (WebCore::setApplicationSDKVersion): Deleted.
+ (WebCore::applicationSDKVersion): Deleted.
+
b'2020-03-23 Russell Epstein <[email protected]>\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 th
e 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 <[email protected]>\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 <[email protected]>\\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 2
020-03-19 Chris Fleizach <[email protected]>\\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 <[email protected]>\n\n Apply patch. rdar://problem/60396271\n\n 2020-03-17 Zalan Bujtas <[email protected]>\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 <[email protected]>
Cherry-pick r258459. rdar://problem/60539192
Modified: branches/safari-609-branch/Source/WebCore/html/HTMLObjectElement.cpp (258869 => 258870)
--- branches/safari-609-branch/Source/WebCore/html/HTMLObjectElement.cpp 2020-03-23 19:46:57 UTC (rev 258869)
+++ branches/safari-609-branch/Source/WebCore/html/HTMLObjectElement.cpp 2020-03-23 20:19:38 UTC (rev 258870)
@@ -54,7 +54,6 @@
#if PLATFORM(IOS_FAMILY)
#include "RuntimeApplicationChecks.h"
-#include <wtf/spi/darwin/dyldSPI.h>
#endif
namespace WebCore {
Modified: branches/safari-609-branch/Source/WebCore/html/MediaElementSession.cpp (258869 => 258870)
--- branches/safari-609-branch/Source/WebCore/html/MediaElementSession.cpp 2020-03-23 19:46:57 UTC (rev 258869)
+++ branches/safari-609-branch/Source/WebCore/html/MediaElementSession.cpp 2020-03-23 20:19:38 UTC (rev 258870)
@@ -53,7 +53,7 @@
#if PLATFORM(IOS_FAMILY)
#include "AudioSession.h"
#include "RuntimeApplicationChecks.h"
-#include <wtf/spi/darwin/dyldSPI.h>
+#include <wtf/cocoa/RuntimeApplicationChecksCocoa.h>
#endif
namespace WebCore {
@@ -737,7 +737,7 @@
#if PLATFORM(IOS_FAMILY)
if (IOSApplication::isIBooks())
return !m_element.hasAttributeWithoutSynchronization(HTMLNames::webkit_playsinlineAttr) && !m_element.hasAttributeWithoutSynchronization(HTMLNames::playsinlineAttr);
- if (dyld_get_program_sdk_version() < DYLD_IOS_VERSION_10_0)
+ if (applicationSDKVersion() < DYLD_IOS_VERSION_10_0)
return !m_element.hasAttributeWithoutSynchronization(HTMLNames::webkit_playsinlineAttr);
#endif
Modified: branches/safari-609-branch/Source/WebCore/loader/DocumentThreadableLoader.cpp (258869 => 258870)
--- branches/safari-609-branch/Source/WebCore/loader/DocumentThreadableLoader.cpp 2020-03-23 19:46:57 UTC (rev 258869)
+++ branches/safari-609-branch/Source/WebCore/loader/DocumentThreadableLoader.cpp 2020-03-23 20:19:38 UTC (rev 258870)
@@ -64,7 +64,7 @@
#include <wtf/Ref.h>
#if PLATFORM(IOS_FAMILY)
-#include <wtf/spi/darwin/dyldSPI.h>
+#include <wtf/cocoa/RuntimeApplicationChecksCocoa.h>
#endif
namespace WebCore {
Modified: branches/safari-609-branch/Source/WebCore/platform/RuntimeApplicationChecks.h (258869 => 258870)
--- branches/safari-609-branch/Source/WebCore/platform/RuntimeApplicationChecks.h 2020-03-23 19:46:57 UTC (rev 258869)
+++ branches/safari-609-branch/Source/WebCore/platform/RuntimeApplicationChecks.h 2020-03-23 20:19:38 UTC (rev 258870)
@@ -43,9 +43,6 @@
bool isInWebProcess();
bool isInNetworkProcess();
-WEBCORE_EXPORT void setApplicationSDKVersion(uint32_t);
-WEBCORE_EXPORT uint32_t applicationSDKVersion();
-
WEBCORE_EXPORT void setApplicationBundleIdentifier(const String&);
String applicationBundleIdentifier();
Modified: branches/safari-609-branch/Source/WebCore/platform/Timer.cpp (258869 => 258870)
--- branches/safari-609-branch/Source/WebCore/platform/Timer.cpp 2020-03-23 19:46:57 UTC (rev 258869)
+++ branches/safari-609-branch/Source/WebCore/platform/Timer.cpp 2020-03-23 20:19:38 UTC (rev 258870)
@@ -37,7 +37,7 @@
#include <wtf/Vector.h>
#if PLATFORM(COCOA)
-#include <wtf/spi/darwin/dyldSPI.h>
+#include <wtf/cocoa/RuntimeApplicationChecksCocoa.h>
#endif
namespace WebCore {
Modified: branches/safari-609-branch/Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm (258869 => 258870)
--- branches/safari-609-branch/Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm 2020-03-23 19:46:57 UTC (rev 258869)
+++ branches/safari-609-branch/Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm 2020-03-23 20:19:38 UTC (rev 258870)
@@ -66,24 +66,15 @@
applicationBundleIdentifierOverride() = bundleIdentifier;
}
-static Optional<uint32_t>& applicationSDKVersionOverride()
+void clearApplicationBundleIdentifierTestingOverride()
{
- static NeverDestroyed<Optional<uint32_t>> version;
- return version;
+ ASSERT(RunLoop::isMain());
+ applicationBundleIdentifierOverride() = emptyString();
+#if !ASSERT_MSG_DISABLED
+ applicationBundleIdentifierOverrideWasQueried = false;
+#endif
}
-void setApplicationSDKVersion(uint32_t version)
-{
- applicationSDKVersionOverride() = version;
-}
-
-uint32_t applicationSDKVersion()
-{
- if (applicationSDKVersionOverride())
- return *applicationSDKVersionOverride();
- return dyld_get_program_sdk_version();
-}
-
bool isInWebProcess()
{
static bool mainBundleIsWebProcess = [[[NSBundle mainBundle] bundleIdentifier] hasPrefix:@"com.apple.WebKit.WebContent"];
Modified: branches/safari-609-branch/Source/WebKit/ChangeLog (258869 => 258870)
--- branches/safari-609-branch/Source/WebKit/ChangeLog 2020-03-23 19:46:57 UTC (rev 258869)
+++ branches/safari-609-branch/Source/WebKit/ChangeLog 2020-03-23 20:19:38 UTC (rev 258870)
@@ -1,3 +1,17 @@
+2020-03-13 Myles C. Maxfield <[email protected]>
+
+ [Cocoa] Push applicationSDKVersion() down from WebCore into WTF
+ https://bugs.webkit.org/show_bug.cgi?id=209030
+
+ Reviewed by Simon Fraser.
+
+ * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
+ (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
+ * Shared/WebPreferencesDefaultValues.cpp:
+ (WebKit::defaultCSSOMViewScrollingAPIEnabled):
+ * WebProcess/cocoa/WebProcessCocoa.mm:
+ (WebKit::WebProcess::platformInitializeWebProcess):
+
b'2020-03-23 Russell Epstein <[email protected]>\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 <[email protected]> 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 <[email protected]>\n\n Sanitize suggested download f
ilename 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 <[email protected]>
Apply patch. rdar://problem/60756683
Modified: branches/safari-609-branch/Source/WebKit/NetworkProcess/cocoa/NetworkProcessCocoa.mm (258869 => 258870)
--- branches/safari-609-branch/Source/WebKit/NetworkProcess/cocoa/NetworkProcessCocoa.mm 2020-03-23 19:46:57 UTC (rev 258869)
+++ branches/safari-609-branch/Source/WebKit/NetworkProcess/cocoa/NetworkProcessCocoa.mm 2020-03-23 20:19:38 UTC (rev 258870)
@@ -45,6 +45,7 @@
#import <wtf/CallbackAggregator.h>
#import <wtf/ProcessPrivilege.h>
#import <wtf/RetainPtr.h>
+#import <wtf/cocoa/RuntimeApplicationChecksCocoa.h>
namespace WebKit {
@@ -71,7 +72,7 @@
void NetworkProcess::platformInitializeNetworkProcessCocoa(const NetworkProcessCreationParameters& parameters)
{
WebCore::setApplicationBundleIdentifier(parameters.uiProcessBundleIdentifier);
- WebCore::setApplicationSDKVersion(parameters.uiProcessSDKVersion);
+ setApplicationSDKVersion(parameters.uiProcessSDKVersion);
#if HAVE(HSTS_STORAGE_PATH)
if (!parameters.hstsStorageDirectory.isNull()) {
Modified: branches/safari-609-branch/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp (258869 => 258870)
--- branches/safari-609-branch/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp 2020-03-23 19:46:57 UTC (rev 258869)
+++ branches/safari-609-branch/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp 2020-03-23 20:19:38 UTC (rev 258870)
@@ -28,11 +28,9 @@
#include <WebCore/RuntimeApplicationChecks.h>
#if PLATFORM(COCOA)
-#include <wtf/spi/darwin/dyldSPI.h>
-#endif
-
-#if PLATFORM(IOS_FAMILY)
#include "VersionChecks.h"
+#include <pal/spi/cocoa/FeatureFlagsSPI.h>
+#include <wtf/cocoa/RuntimeApplicationChecksCocoa.h>
#endif
namespace WebKit {
@@ -49,7 +47,7 @@
bool defaultCSSOMViewScrollingAPIEnabled()
{
#if PLATFORM(IOS_FAMILY)
- if (WebCore::IOSApplication::isIMDb() && WebCore::applicationSDKVersion() < DYLD_IOS_VERSION_13_0)
+ if (WebCore::IOSApplication::isIMDb() && applicationSDKVersion() < DYLD_IOS_VERSION_13_0)
return false;
#endif
return true;
Modified: branches/safari-609-branch/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm (258869 => 258870)
--- branches/safari-609-branch/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm 2020-03-23 19:46:57 UTC (rev 258869)
+++ branches/safari-609-branch/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm 2020-03-23 20:19:38 UTC (rev 258870)
@@ -79,6 +79,7 @@
#import <wtf/FileSystem.h>
#import <wtf/ProcessPrivilege.h>
#import <wtf/cocoa/NSURLExtras.h>
+#import <wtf/cocoa/RuntimeApplicationChecksCocoa.h>
#if PLATFORM(IOS)
#import <WebCore/ParentalControlsContentFilter.h>
@@ -162,7 +163,7 @@
#endif
WebCore::setApplicationBundleIdentifier(parameters.uiProcessBundleIdentifier);
- WebCore::setApplicationSDKVersion(parameters.uiProcessSDKVersion);
+ setApplicationSDKVersion(parameters.uiProcessSDKVersion);
m_uiProcessBundleIdentifier = parameters.uiProcessBundleIdentifier;