Unreviewed, rolling out r258047.
authorcfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 7 Mar 2020 08:17:21 +0000 (08:17 +0000)
committercfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 7 Mar 2020 08:17:21 +0000 (08:17 +0000)
Referenced SPI not yet available for Safari builders.

Reverted changeset:

"Implementation of AccessibilitySupport AXSIsolatedTreeMode."
https://bugs.webkit.org/show_bug.cgi?id=208691
https://trac.webkit.org/changeset/258047

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258066 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 files changed:
Source/WebCore/ChangeLog
Source/WebCore/PAL/ChangeLog
Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj
Source/WebCore/PAL/pal/PlatformMac.cmake
Source/WebCore/PAL/pal/spi/cocoa/AccessibilitySupportSPI.h [deleted file]
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/accessibility/AXObjectCache.cpp
Source/WebCore/accessibility/AXObjectCache.h
Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperBase.mm
Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm
Source/WebKit/ChangeLog
Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm

index 33a8479..98ffdc6 100644 (file)
@@ -1,3 +1,15 @@
+2020-03-07  chris fleizach  <cfleizach@apple.com>
+
+        Unreviewed, rolling out r258047.
+
+        Referenced SPI not yet available for Safari builders.
+
+        Reverted changeset:
+
+        "Implementation of AccessibilitySupport AXSIsolatedTreeMode."
+        https://bugs.webkit.org/show_bug.cgi?id=208691
+        https://trac.webkit.org/changeset/258047
+
 2020-03-06  David Kilzer  <ddkilzer@apple.com>
 
         REGRESSION (r258051): WinCairo/WPE/GTK build failures
index bcd015b..c5e36db 100644 (file)
@@ -1,3 +1,15 @@
+2020-03-07  chris fleizach  <cfleizach@apple.com>
+
+        Unreviewed, rolling out r258047.
+
+        Referenced SPI not yet available for Safari builders.
+
+        Reverted changeset:
+
+        "Implementation of AccessibilitySupport AXSIsolatedTreeMode."
+        https://bugs.webkit.org/show_bug.cgi?id=208691
+        https://trac.webkit.org/changeset/258047
+
 2020-03-06  Andres Gonzalez  <andresg_22@apple.com>
 
         Implementation of AccessibilitySupport AXSIsolatedTreeMode.
index 183bf24..83fc5f4 100644 (file)
                A3AB6E631F3D217F009C14B1 /* SystemSleepListenerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SystemSleepListenerMac.mm; sourceTree = "<group>"; };
                A3C66CDA1F462D6A009E6EE9 /* SessionID.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SessionID.cpp; sourceTree = "<group>"; };
                A3C66CDB1F462D6A009E6EE9 /* SessionID.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SessionID.h; sourceTree = "<group>"; };
-               C037494124127CCB00D9A36E /* AccessibilitySupportSPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AccessibilitySupportSPI.h; sourceTree = "<group>"; };
                C15CBB3223F34A1200300CC7 /* NSUserDefaultsSPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NSUserDefaultsSPI.h; sourceTree = "<group>"; };
                C2147A4A1EFD0AA600056FA5 /* CopyPALHeaders.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = CopyPALHeaders.xcconfig; sourceTree = "<group>"; };
                CDACB35E23873E480018D7CE /* MediaToolboxSoftLink.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = MediaToolboxSoftLink.cpp; sourceTree = "<group>"; };
                0C2DA1201F3BE9E700DBC317 /* cocoa */ = {
                        isa = PBXGroup;
                        children = (
-                               C037494124127CCB00D9A36E /* AccessibilitySupportSPI.h */,
                                576CA9D522B854AB0030143C /* AppSSOSPI.h */,
                                2D02E93B2056FAA700A13797 /* AudioToolboxSPI.h */,
                                572A107722B456F500F410C8 /* AuthKitSPI.h */,
index 80e8735..d24aae2 100644 (file)
@@ -20,7 +20,6 @@ list(APPEND PAL_PUBLIC_HEADERS
     spi/cg/CoreGraphicsSPI.h
     spi/cg/ImageIOSPI.h
 
-    spi/cocoa/AccessibilitySupportSPI.h
     spi/cocoa/AppSSOSPI.h
     spi/cocoa/AuthKitSPI.h
     spi/cocoa/AVKitSPI.h
diff --git a/Source/WebCore/PAL/pal/spi/cocoa/AccessibilitySupportSPI.h b/Source/WebCore/PAL/pal/spi/cocoa/AccessibilitySupportSPI.h
deleted file mode 100644 (file)
index a0fbe28..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (C) 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. ``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
- * 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
-
-#if HAVE(ACCESSIBILITY_SUPPORT)
-
-#if USE(APPLE_INTERNAL_SDK)
-
-#include <AccessibilitySupport.h>
-
-#else
-
-WTF_EXTERN_C_BEGIN
-
-#if ENABLE(ACCESSIBILITY_ISOLATED_TREE)
-typedef CF_ENUM(int32_t, AXSIsolatedTreeMode)
-{
-    AXSIsolatedTreeModeOff = 0,
-    AXSIsolatedTreeModeMainThread,
-    AXSIsolatedTreeModeSecondaryThread,
-};
-
-AXSIsolatedTreeMode _AXSIsolatedTreeMode(void);
-#endif // ENABLE(ACCESSIBILITY_ISOLATED_TREE)
-
-WTF_EXTERN_C_END
-
-#endif // USE(APPLE_INTERNAL_SDK)
-
-#endif // HAVE(ACCESSIBILITY_SUPPORT)
index e31fc37..4af9550 100644 (file)
                C0C054CB1118C8E400CE2636 /* CodeGenerator.pm in Headers */ = {isa = PBXBuildFile; fileRef = 93F8B3050A300FE100F61AB8 /* CodeGenerator.pm */; settings = {ATTRIBUTES = (Private, ); }; };
                C0C054CC1118C8E400CE2636 /* generate-bindings.pl in Headers */ = {isa = PBXBuildFile; fileRef = 93F8B3070A300FEA00F61AB8 /* generate-bindings.pl */; settings = {ATTRIBUTES = (Private, ); }; };
                C0C054CD1118C8E400CE2636 /* IDLParser.pm in Headers */ = {isa = PBXBuildFile; fileRef = 14813BF309EDF88E00F757E1 /* IDLParser.pm */; settings = {ATTRIBUTES = (Private, ); }; };
-               C0E2F3272412BF29009C73EC /* libAccessibility.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = C0E2F3252412BF29009C73EC /* libAccessibility.tbd */; };
                C0F2A44113869AAB0066C534 /* preprocessor.pm in Headers */ = {isa = PBXBuildFile; fileRef = C0F2A43F13869A280066C534 /* preprocessor.pm */; settings = {ATTRIBUTES = (Private, ); }; };
                C105DA640F3AA6B8001DD44F /* TextEncodingDetector.h in Headers */ = {isa = PBXBuildFile; fileRef = C105DA630F3AA6B8001DD44F /* TextEncodingDetector.h */; };
                C11A9ECE21403A5C00CFB20A /* SwitchingGPUClient.h in Headers */ = {isa = PBXBuildFile; fileRef = C11A9ECD21403A5C00CFB20A /* SwitchingGPUClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
                BEF29EEA1715DD0900C4B4C9 /* VideoTrackPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VideoTrackPrivate.h; sourceTree = "<group>"; };
                C046E1AB1208A9FE00BA2CF7 /* LocalizedStrings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LocalizedStrings.cpp; sourceTree = "<group>"; };
                C078376023DF253E00C9C5C8 /* AXIsolatedObjectMac.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = AXIsolatedObjectMac.mm; path = mac/AXIsolatedObjectMac.mm; sourceTree = "<group>"; };
-               C0E2F3252412BF29009C73EC /* libAccessibility.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libAccessibility.tbd; path = usr/lib/libAccessibility.tbd; sourceTree = SDKROOT; };
                C0F2A43F13869A280066C534 /* preprocessor.pm */ = {isa = PBXFileReference; lastKnownFileType = text.script.perl; name = preprocessor.pm; path = scripts/preprocessor.pm; sourceTree = "<group>"; };
                C105DA610F3AA68F001DD44F /* TextEncodingDetectorICU.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TextEncodingDetectorICU.cpp; sourceTree = "<group>"; };
                C105DA630F3AA6B8001DD44F /* TextEncodingDetector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextEncodingDetector.h; sourceTree = "<group>"; };
                                FD2DBF1312B048A300ED98C6 /* AudioToolbox.framework in Frameworks */,
                                1AB33DA512551E320024457A /* IOKit.framework in Frameworks */,
                                93F19B1608245E59001E9ABC /* JavaScriptCore.framework in Frameworks */,
-                               C0E2F3272412BF29009C73EC /* libAccessibility.tbd in Frameworks */,
                                1C022F0022CFED68006DF01B /* libcompression.tbd in Frameworks */,
                                93F19B1708245E59001E9ABC /* libicucore.dylib in Frameworks */,
                                1CFAE3230A6D6A3F0032593D /* libobjc.dylib in Frameworks */,
                                A15E6BF01E212A6A0080AF34 /* Foundation.framework */,
                                1AB33DA412551E320024457A /* IOKit.framework */,
                                F8216299029F4FB501000131 /* JavaScriptCore.framework */,
-                               C0E2F3252412BF29009C73EC /* libAccessibility.tbd */,
                                1C8D26D022C09CDE00D125F3 /* libcompression.tbd */,
                                93F1D31A0558CC5C00821BC0 /* libicucore.dylib */,
                                1CFAE3220A6D6A3F0032593D /* libobjc.dylib */,
index 2e08330..7aeb9e3 100644 (file)
 #include "TextIterator.h"
 
 #if ENABLE(ACCESSIBILITY_ISOLATED_TREE) && PLATFORM(MAC)
-#include <pal/spi/cocoa/AccessibilitySupportSPI.h>
 #include <pal/spi/mac/HIServicesSPI.h>
 #endif
 
@@ -393,8 +392,7 @@ AXCoreObject* AXObjectCache::isolatedTreeFocusedObject(Document& document)
         tree = generateIsolatedTree(*pageID, document);
         // Now that we have created our tree, initialize the secondary thread,
         // so future requests come in on the other thread.
-        if (_AXSIsolatedTreeMode() == AXSIsolatedTreeModeSecondaryThread)
-            _AXUIElementUseSecondaryAXThread(true);
+        _AXUIElementUseSecondaryAXThread(true);
     }
 
     if (tree)
@@ -432,7 +430,7 @@ AXCoreObject* AXObjectCache::focusedUIElementForPage(const Page* page)
     focusedDocument->updateStyleIfNeeded();
 
 #if ENABLE(ACCESSIBILITY_ISOLATED_TREE)
-    if (isIsolatedTreeEnabled())
+    if (clientSupportsIsolatedTree())
         return isolatedTreeFocusedObject(*focusedDocument);
 #endif
 
@@ -728,11 +726,6 @@ bool AXObjectCache::clientSupportsIsolatedTree()
     return type == kAXClientTypeVoiceOver
         || type == kAXClientTypeUnknown;
 }
-
-bool AXObjectCache::isIsolatedTreeEnabled()
-{
-    return _AXSIsolatedTreeMode() != AXSIsolatedTreeModeOff && clientSupportsIsolatedTree();
-}
 #endif
 
 AXCoreObject* AXObjectCache::rootObject()
@@ -741,7 +734,7 @@ AXCoreObject* AXObjectCache::rootObject()
         return nullptr;
 
 #if ENABLE(ACCESSIBILITY_ISOLATED_TREE)
-    if (isIsolatedTreeEnabled())
+    if (clientSupportsIsolatedTree())
         return isolatedTreeRootObject();
 #endif
 
@@ -762,8 +755,7 @@ AXCoreObject* AXObjectCache::isolatedTreeRootObject()
 
         // Now that we have created our tree, initialize the secondary thread,
         // so future requests come in on the other thread.
-        if (_AXSIsolatedTreeMode() == AXSIsolatedTreeModeSecondaryThread)
-            _AXUIElementUseSecondaryAXThread(true);
+        _AXUIElementUseSecondaryAXThread(true);
     }
 
     if (tree)
@@ -784,7 +776,7 @@ bool AXObjectCache::canUseSecondaryAXThread()
     // _AXUIElementRequestServicedBySecondaryAXThread returns false for
     // LayoutTests, but we still want to run LayoutTests using isolated tree on
     // a secondary thread to simulate the actual execution.
-    return _AXSIsolatedTreeMode() == AXSIsolatedTreeModeSecondaryThread && clientSupportsIsolatedTree();
+    return clientSupportsIsolatedTree();
 #else
     return false;
 #endif
index 76de890..2987eae 100644 (file)
@@ -352,9 +352,8 @@ public:
     RefPtr<Range> rangeMatchesTextNearRange(RefPtr<Range>, const String&);
 
 #if ENABLE(ACCESSIBILITY_ISOLATED_TREE)
-    WEBCORE_EXPORT static bool isIsolatedTreeEnabled();
+    WEBCORE_EXPORT static bool clientSupportsIsolatedTree();
 private:
-    static bool clientSupportsIsolatedTree();
     AXCoreObject* isolatedTreeRootObject();
     static AXCoreObject* isolatedTreeFocusedObject(Document&);
     void setIsolatedTreeFocusedObject(Node*);
index 1ae6aa9..8ce8a0e 100644 (file)
@@ -327,7 +327,7 @@ NSArray *convertToNSArray(const WebCore::AXCoreObject::AccessibilityChildrenVect
     _identifier = InvalidAXID;
 #if ENABLE(ACCESSIBILITY_ISOLATED_TREE)
     if (!isMainThread()) {
-        ASSERT(AXObjectCache::isIsolatedTreeEnabled());
+        ASSERT(AXObjectCache::clientSupportsIsolatedTree());
         [self detachIsolatedObject];
         return;
     }
@@ -366,7 +366,7 @@ NSArray *convertToNSArray(const WebCore::AXCoreObject::AccessibilityChildrenVect
 {
 #if ENABLE(ACCESSIBILITY_ISOLATED_TREE)
     if (!isMainThread()) {
-        ASSERT(AXObjectCache::isIsolatedTreeEnabled());
+        ASSERT(AXObjectCache::clientSupportsIsolatedTree());
         return m_isolatedObject;
     }
 #endif
index edd3023..153e98e 100644 (file)
@@ -1477,7 +1477,7 @@ ALLOW_DEPRECATED_IMPLEMENTATIONS_END
         [additional addObject:NSAccessibilityExpandedTextValueAttribute];
 
 #if ENABLE(ACCESSIBILITY_ISOLATED_TREE)
-    if (AXObjectCache::isIsolatedTreeEnabled() && _AXUIElementRequestServicedBySecondaryAXThread())
+    if (_AXUIElementRequestServicedBySecondaryAXThread() && AXObjectCache::clientSupportsIsolatedTree())
         [additional addObject:NSAccessibilityRelativeFrameAttribute];
 #endif
     
index 8befd65..5efe8a7 100644 (file)
@@ -1,3 +1,15 @@
+2020-03-07  chris fleizach  <cfleizach@apple.com>
+
+        Unreviewed, rolling out r258047.
+
+        Referenced SPI not yet available for Safari builders.
+
+        Reverted changeset:
+
+        "Implementation of AccessibilitySupport AXSIsolatedTreeMode."
+        https://bugs.webkit.org/show_bug.cgi?id=208691
+        https://trac.webkit.org/changeset/258047
+
 2020-03-06  Per Arne Vollan  <pvollan@apple.com>
 
         [Cocoa] Re-enable CFPrefs direct mode
index e8c0bcf..4ec3e45 100644 (file)
@@ -253,7 +253,8 @@ ALLOW_DEPRECATED_DECLARATIONS_BEGIN
 
         // Isolated tree frames have the offset encoded into them so we don't need to undo here.
 #if ENABLE(ACCESSIBILITY_ISOLATED_TREE)
-        applyContentOffset = !WebCore::AXObjectCache::isIsolatedTreeEnabled() || !_AXUIElementRequestServicedBySecondaryAXThread();
+        bool queryingIsolatedTree = WebCore::AXObjectCache::clientSupportsIsolatedTree() && _AXUIElementRequestServicedBySecondaryAXThread();
+        applyContentOffset = !queryingIsolatedTree;
 #endif
         if (auto pluginView = WebKit::WebPage::pluginViewForFrame(protectedSelf->m_page->mainFrame()))
             applyContentOffset = !pluginView->plugin()->pluginHandlesContentOffsetForAccessibilityHitTest();