Diff
Modified: trunk/Source/WTF/ChangeLog (243026 => 243027)
--- trunk/Source/WTF/ChangeLog 2019-03-15 23:45:55 UTC (rev 243026)
+++ trunk/Source/WTF/ChangeLog 2019-03-15 23:49:17 UTC (rev 243027)
@@ -1,3 +1,16 @@
+2019-03-15 Truitt Savell <[email protected]>
+
+ Unreviewed, rolling out r243008.
+
+ This revision broke High Sierra builders
+
+ Reverted changeset:
+
+ "[iOS] Block the accessibility server when accessibility is
+ not enabled."
+ https://bugs.webkit.org/show_bug.cgi?id=195342
+ https://trac.webkit.org/changeset/243008
+
2019-03-15 Per Arne Vollan <[email protected]>
[iOS] Block the accessibility server when accessibility is not enabled.
Modified: trunk/Source/WTF/wtf/spi/darwin/SandboxSPI.h (243026 => 243027)
--- trunk/Source/WTF/wtf/spi/darwin/SandboxSPI.h 2019-03-15 23:45:55 UTC (rev 243026)
+++ trunk/Source/WTF/wtf/spi/darwin/SandboxSPI.h 2019-03-15 23:49:17 UTC (rev 243027)
@@ -63,7 +63,6 @@
char *sandbox_extension_issue_file(const char *extension_class, const char *path, uint32_t flags);
char *sandbox_extension_issue_generic(const char *extension_class, uint32_t flags);
-char *sandbox_extension_issue_mach_to_process_by_pid(const char *extension_class, const char *name, uint32_t flags, pid_t);
int sandbox_check(pid_t, const char *operation, enum sandbox_filter_type, ...);
int sandbox_check_by_audit_token(audit_token_t, const char *operation, enum sandbox_filter_type, ...);
int sandbox_container_path_for_pid(pid_t, char *buffer, size_t bufsize);
Modified: trunk/Source/WebKit/ChangeLog (243026 => 243027)
--- trunk/Source/WebKit/ChangeLog 2019-03-15 23:45:55 UTC (rev 243026)
+++ trunk/Source/WebKit/ChangeLog 2019-03-15 23:49:17 UTC (rev 243027)
@@ -1,3 +1,16 @@
+2019-03-15 Truitt Savell <[email protected]>
+
+ Unreviewed, rolling out r243008.
+
+ This revision broke High Sierra builders
+
+ Reverted changeset:
+
+ "[iOS] Block the accessibility server when accessibility is
+ not enabled."
+ https://bugs.webkit.org/show_bug.cgi?id=195342
+ https://trac.webkit.org/changeset/243008
+
2019-03-15 Per Arne Vollan <[email protected]>
All networking from WebKit.Networking fails when Network Extension content filter is enabled
Modified: trunk/Source/WebKit/Platform/spi/ios/AccessibilitySupportSPI.h (243026 => 243027)
--- trunk/Source/WebKit/Platform/spi/ios/AccessibilitySupportSPI.h 2019-03-15 23:45:55 UTC (rev 243026)
+++ trunk/Source/WebKit/Platform/spi/ios/AccessibilitySupportSPI.h 2019-03-15 23:49:17 UTC (rev 243027)
@@ -41,8 +41,6 @@
#if PLATFORM(IOS_FAMILY)
extern Boolean _AXSKeyRepeatEnabled();
extern CFTimeInterval _AXSKeyRepeatDelay();
-extern Boolean _AXSApplicationAccessibilityEnabled();
-extern CFStringRef kAXSApplicationAccessibilityEnabledNotification;
#endif
#if ENABLE(ACCESSIBILITY_EVENTS)
Modified: trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb (243026 => 243027)
--- trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb 2019-03-15 23:45:55 UTC (rev 243026)
+++ trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb 2019-03-15 23:49:17 UTC (rev 243027)
@@ -188,6 +188,7 @@
(global-name "com.apple.backboard.hid.focus")
(global-name "com.apple.backboard.hid.services")
(global-name "com.apple.iohideventsystem")
+ (global-name "com.apple.iphone.axserver-systemwide")
(global-name "com.apple.frontboard.workspace")
(global-name "com.apple.frontboard.systemappservices"))
@@ -450,8 +451,6 @@
(deny mach-lookup (with send-signal SIGKILL)
(global-name "com.apple.backboard.hid.services"))
-(allow mach-lookup (extension "com.apple.webkit.extension.mach"))
-
;; These services have been identified as unused during living-on.
;; This list overrides some definitions above and in common.sb.
;; FIXME: remove overridden rules once the final list has been
Modified: trunk/Source/WebKit/Shared/SandboxExtension.h (243026 => 243027)
--- trunk/Source/WebKit/Shared/SandboxExtension.h 2019-03-15 23:45:55 UTC (rev 243026)
+++ trunk/Source/WebKit/Shared/SandboxExtension.h 2019-03-15 23:49:17 UTC (rev 243027)
@@ -27,7 +27,6 @@
#include <wtf/Forward.h>
#include <wtf/Noncopyable.h>
-#include <wtf/ProcessID.h>
#include <wtf/RefCounted.h>
#include <wtf/RefPtr.h>
#include <wtf/Vector.h>
@@ -47,7 +46,6 @@
enum class Type {
ReadOnly,
ReadWrite,
- Mach,
Generic,
};
@@ -103,7 +101,6 @@
static bool createHandleForReadWriteDirectory(const String& path, Handle&); // Will attempt to create the directory.
static String createHandleForTemporaryFile(const String& prefix, Type, Handle&);
static bool createHandleForGenericExtension(const String& extensionClass, Handle&);
- static bool createHandleForMachLookupByPid(const String& service, ProcessID, Handle&);
~SandboxExtension();
bool consume();
Modified: trunk/Source/WebKit/Shared/mac/SandboxExtensionMac.mm (243026 => 243027)
--- trunk/Source/WebKit/Shared/mac/SandboxExtensionMac.mm 2019-03-15 23:45:55 UTC (rev 243026)
+++ trunk/Source/WebKit/Shared/mac/SandboxExtensionMac.mm 2019-03-15 23:49:17 UTC (rev 243027)
@@ -40,9 +40,9 @@
class SandboxExtensionImpl {
public:
- static std::unique_ptr<SandboxExtensionImpl> create(const char* path, SandboxExtension::Type type, Optional<ProcessID> pid = WTF::nullopt)
+ static std::unique_ptr<SandboxExtensionImpl> create(const char* path, SandboxExtension::Type type)
{
- std::unique_ptr<SandboxExtensionImpl> impl { new SandboxExtensionImpl(path, type, pid) };
+ std::unique_ptr<SandboxExtensionImpl> impl { new SandboxExtensionImpl(path, type) };
if (!impl->m_token)
return nullptr;
return impl;
@@ -64,10 +64,6 @@
#if PLATFORM(IOS_FAMILY_SIMULATOR)
return !sandbox_check(getpid(), 0, SANDBOX_FILTER_NONE);
#else
- if (m_handle == -1) {
- LOG_ERROR("Could not create a sandbox extension for '%s', errno = %d", m_token, errno);
- return false;
- }
return m_handle;
#endif
}
@@ -84,7 +80,7 @@
}
private:
- char* sandboxExtensionForType(const char* path, SandboxExtension::Type type, Optional<ProcessID> pid = WTF::nullopt)
+ char* sandboxExtensionForType(const char* path, SandboxExtension::Type type)
{
switch (type) {
case SandboxExtension::Type::ReadOnly:
@@ -91,15 +87,13 @@
return sandbox_extension_issue_file(APP_SANDBOX_READ, path, 0);
case SandboxExtension::Type::ReadWrite:
return sandbox_extension_issue_file(APP_SANDBOX_READ_WRITE, path, 0);
- case SandboxExtension::Type::Mach:
- return sandbox_extension_issue_mach_to_process_by_pid("com.apple.webkit.extension.mach"_s, path, 0, pid.value());
case SandboxExtension::Type::Generic:
return sandbox_extension_issue_generic(path, 0);
}
}
- SandboxExtensionImpl(const char* path, SandboxExtension::Type type, Optional<ProcessID> pid = WTF::nullopt)
- : m_token { sandboxExtensionForType(path, type, pid) }
+ SandboxExtensionImpl(const char* path, SandboxExtension::Type type)
+ : m_token { sandboxExtensionForType(path, type) }
{
}
@@ -363,19 +357,6 @@
return true;
}
-bool SandboxExtension::createHandleForMachLookupByPid(const String& service, ProcessID pid, Handle& handle)
-{
- ASSERT(!handle.m_sandboxExtension);
-
- handle.m_sandboxExtension = SandboxExtensionImpl::create(service.utf8().data(), Type::Mach, pid);
- if (!handle.m_sandboxExtension) {
- WTFLogAlways("Could not create a '%s' sandbox extension", service.utf8().data());
- return false;
- }
-
- return true;
-}
-
SandboxExtension::SandboxExtension(const Handle& handle)
: m_sandboxExtension(WTFMove(handle.m_sandboxExtension))
{
Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm (243026 => 243027)
--- trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm 2019-03-15 23:45:55 UTC (rev 243026)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm 2019-03-15 23:49:17 UTC (rev 243027)
@@ -26,7 +26,6 @@
#import "config.h"
#import "WebProcessPool.h"
-#import "AccessibilitySupportSPI.h"
#import "CookieStorageUtilsCF.h"
#import "LegacyCustomProtocolManagerClient.h"
#import "NetworkProcessCreationParameters.h"
@@ -448,10 +447,6 @@
}];
#elif PLATFORM(IOS)
CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), this, backlightLevelDidChangeCallback, static_cast<CFStringRef>(UIBacklightLevelChangedNotification), nullptr, CFNotificationSuspensionBehaviorCoalesce);
- m_accessibilityEnabledObserver = [[NSNotificationCenter defaultCenter] addObserverForName:(__bridge id)kAXSApplicationAccessibilityEnabledNotification object:nil queue:[NSOperationQueue currentQueue] usingBlock:^(NSNotification *) {
- for (size_t i = 0; i < m_processes.size(); ++i)
- m_processes[i]->unblockAccessibilityServerIfNeeded();
- }];
#endif // !PLATFORM(IOS_FAMILY)
}
@@ -471,7 +466,6 @@
[[NSNotificationCenter defaultCenter] removeObserver:m_deactivationObserver.get()];
#elif PLATFORM(IOS)
CFNotificationCenterRemoveObserver(CFNotificationCenterGetDarwinNotifyCenter(), this, static_cast<CFStringRef>(UIBacklightLevelChangedNotification) , nullptr);
- [[NSNotificationCenter defaultCenter] removeObserver:m_accessibilityEnabledObserver.get()];
#endif // !PLATFORM(IOS_FAMILY)
}
Modified: trunk/Source/WebKit/UIProcess/WebProcessPool.h (243026 => 243027)
--- trunk/Source/WebKit/UIProcess/WebProcessPool.h 2019-03-15 23:45:55 UTC (rev 243026)
+++ trunk/Source/WebKit/UIProcess/WebProcessPool.h 2019-03-15 23:49:17 UTC (rev 243027)
@@ -673,10 +673,6 @@
std::unique_ptr<PerActivityStateCPUUsageSampler> m_perActivityStateCPUUsageSampler;
#endif
-#if PLATFORM(IOS_FAMILY)
- RetainPtr<NSObject> m_accessibilityEnabledObserver;
-#endif
-
bool m_shouldUseTestingNetworkSession { false };
bool m_processTerminationEnabled { true };
Modified: trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp (243026 => 243027)
--- trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp 2019-03-15 23:45:55 UTC (rev 243026)
+++ trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp 2019-03-15 23:49:17 UTC (rev 243027)
@@ -759,8 +759,6 @@
if (xpc_connection_t xpcConnection = connection()->xpcConnection())
m_throttler.didConnectToProcess(xpc_connection_get_pid(xpcConnection));
}
-
- unblockAccessibilityServerIfNeeded();
#endif
}
Modified: trunk/Source/WebKit/UIProcess/WebProcessProxy.h (243026 => 243027)
--- trunk/Source/WebKit/UIProcess/WebProcessProxy.h 2019-03-15 23:45:55 UTC (rev 243026)
+++ trunk/Source/WebKit/UIProcess/WebProcessProxy.h 2019-03-15 23:49:17 UTC (rev 243027)
@@ -293,10 +293,6 @@
void revokeAudioCaptureExtension() { m_mediaCaptureSandboxExtensions &= ~Audio; }
#endif
-#if PLATFORM(IOS_FAMILY)
- void unblockAccessibilityServerIfNeeded();
-#endif
-
protected:
static uint64_t generatePageID();
WebProcessProxy(WebProcessPool&, WebsiteDataStore&, IsPrewarmed);
@@ -435,7 +431,6 @@
#if PLATFORM(IOS_FAMILY)
ForegroundWebProcessToken m_foregroundToken;
BackgroundWebProcessToken m_backgroundToken;
- bool m_hasSentMessageToUnblockAccessibilityServer { false };
#endif
HashMap<String, uint64_t> m_pageURLRetainCountMap;
Modified: trunk/Source/WebKit/UIProcess/ios/WebProcessProxyIOS.mm (243026 => 243027)
--- trunk/Source/WebKit/UIProcess/ios/WebProcessProxyIOS.mm 2019-03-15 23:45:55 UTC (rev 243026)
+++ trunk/Source/WebKit/UIProcess/ios/WebProcessProxyIOS.mm 2019-03-15 23:49:17 UTC (rev 243027)
@@ -28,7 +28,6 @@
#if PLATFORM(IOS_FAMILY)
-#import "AccessibilitySupportSPI.h"
#import "WKFullKeyboardAccessWatcher.h"
#import "WebProcessMessages.h"
@@ -43,25 +42,6 @@
#endif
}
-void WebProcessProxy::unblockAccessibilityServerIfNeeded()
-{
- if (m_hasSentMessageToUnblockAccessibilityServer)
- return;
- if (!_AXSApplicationAccessibilityEnabled())
- return;
- if (!processIdentifier())
- return;
- if (!canSendMessage())
- return;
-
- SandboxExtension::Handle handle;
- if (!SandboxExtension::createHandleForMachLookupByPid("com.apple.iphone.axserver-systemwide", processIdentifier(), handle))
- return;
-
- send(Messages::WebProcess::UnblockAccessibilityServer(handle), 0);
- m_hasSentMessageToUnblockAccessibilityServer = true;
-}
-
} // namespace WebKit
#endif // PLATFORM(IOS_FAMILY)
Modified: trunk/Source/WebKit/WebProcess/WebProcess.cpp (243026 => 243027)
--- trunk/Source/WebKit/WebProcess/WebProcess.cpp 2019-03-15 23:45:55 UTC (rev 243026)
+++ trunk/Source/WebKit/WebProcess/WebProcess.cpp 2019-03-15 23:49:17 UTC (rev 243027)
@@ -1867,12 +1867,4 @@
PlatformKeyboardEvent::setCurrentModifierState({ });
}
-#if PLATFORM(IOS_FAMILY)
-void WebProcess::unblockAccessibilityServer(const SandboxExtension::Handle& handle)
-{
- bool ok = SandboxExtension::consumePermanently(handle);
- ASSERT_UNUSED(ok, ok);
-}
-#endif
-
} // namespace WebKit
Modified: trunk/Source/WebKit/WebProcess/WebProcess.h (243026 => 243027)
--- trunk/Source/WebKit/WebProcess/WebProcess.h 2019-03-15 23:45:55 UTC (rev 243026)
+++ trunk/Source/WebKit/WebProcess/WebProcess.h 2019-03-15 23:49:17 UTC (rev 243027)
@@ -245,8 +245,6 @@
#if PLATFORM(IOS_FAMILY)
void accessibilityProcessSuspendedNotification(bool);
-
- void unblockAccessibilityServer(const SandboxExtension::Handle&);
#endif
#if PLATFORM(IOS)
Modified: trunk/Source/WebKit/WebProcess/WebProcess.messages.in (243026 => 243027)
--- trunk/Source/WebKit/WebProcess/WebProcess.messages.in 2019-03-15 23:45:55 UTC (rev 243026)
+++ trunk/Source/WebKit/WebProcess/WebProcess.messages.in 2019-03-15 23:49:17 UTC (rev 243027)
@@ -157,8 +157,4 @@
#endif
ClearCurrentModifierStateForTesting()
-
-#if PLATFORM(IOS_FAMILY)
- UnblockAccessibilityServer(WebKit::SandboxExtension::Handle handle)
-#endif
}