Changeset 257739 in webkit
- Timestamp:
- Mar 2, 2020 2:50:30 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r257738 r257739 1 2020-03-02 Andres Gonzalez <andresg_22@apple.com> 2 3 Fix for LayoutTests/accessibility/mac/search-text/search-text.html in IsolatedTree mode. 4 https://bugs.webkit.org/show_bug.cgi?id=208434 5 6 Reviewed by Chris Fleizach. 7 8 * accessibility/mac/aria-expanded-notifications.html: 9 With this change, we now get the FocusChanged notification when the 10 script sets focus to a tree item. 11 1 12 2020-03-02 Jason Lawrence <lawrence.j@apple.com> 2 13 -
trunk/LayoutTests/accessibility/mac/aria-expanded-notifications.html
r228279 r257739 31 31 // The order of notifications should be Row Count, Row Collapsed, Row Count, Row Expanded 32 32 function notifyCallback(element, notification) { 33 if (notification == "AXLoadComplete" || notification == "AXLayoutComplete") 33 if (notification == "AXLoadComplete" 34 || notification == "AXLayoutComplete" 35 || notification == "AXFocusChanged") 34 36 return; 35 37 notifyName = notification; -
trunk/Source/WebCore/ChangeLog
r257732 r257739 1 2020-03-02 Andres Gonzalez <andresg_22@apple.com> 2 3 Fix for LayoutTests/accessibility/mac/search-text/search-text.html in IsolatedTree mode. 4 https://bugs.webkit.org/show_bug.cgi?id=208434 5 6 Reviewed by Chris Fleizach. 7 8 Covered by LayoutTests/accessibility/mac/search-text/search-text.html 9 10 - Updates IsolatedTree for AXSelectedTextChanged notifications. 11 - Exposes webAreaObject through the AXCoreObject interface. 12 - AXIsolatedObject implementation for hasApplePDFAnnotationAttribute, 13 webAreaObject and stringForRange. 14 15 * accessibility/AXObjectCache.cpp: 16 (WebCore::AXObjectCache::postTextStateChangeNotification): 17 (WebCore::AXObjectCache::updateIsolatedTree): 18 (WebCore::AXObjectCache::rootWebArea): 19 * accessibility/AXObjectCache.h: 20 * accessibility/AccessibilityObject.h: 21 * accessibility/AccessibilityObjectInterface.h: 22 * accessibility/AccessibilityRenderObject.cpp: 23 (WebCore::AccessibilityRenderObject::isLoaded const): 24 (WebCore::AccessibilityRenderObject::accessKey const): 25 * accessibility/AccessibilityScrollView.h: 26 * accessibility/ios/AXObjectCacheIOS.mm: 27 (WebCore::AXObjectCache::postTextStateChangePlatformNotification): 28 (WebCore::AXObjectCache::postTextReplacementPlatformNotification): 29 (WebCore::AXObjectCache::postTextReplacementPlatformNotificationForTextControl): 30 * accessibility/isolatedtree/AXIsolatedObject.cpp: 31 (WebCore::AXIsolatedObject::initializeAttributeData): 32 (WebCore::AXIsolatedObject::stringForRange const): 33 (WebCore::AXIsolatedObject::hasApplePDFAnnotationAttribute const): Deleted. 34 * accessibility/isolatedtree/AXIsolatedObject.h: 35 * accessibility/isolatedtree/AXIsolatedTree.cpp: 36 (WebCore::AXIsolatedTree::removeNode): 37 (WebCore::AXIsolatedTree::applyPendingChanges): 38 * accessibility/mac/AXObjectCacheMac.mm: 39 (WebCore::AXObjectCache::postTextStateChangePlatformNotification): 40 (WebCore::addTextMarkerFor): 41 (WebCore::textReplacementChangeDictionary): 42 (WebCore::postUserInfoForChanges): 43 (WebCore::AXObjectCache::postTextReplacementPlatformNotification): 44 (WebCore::AXObjectCache::postTextReplacementPlatformNotificationForTextControl): 45 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: 46 (-[WebAccessibilityObjectWrapper textMarkerRangeFromVisiblePositions:endPosition:]): 47 (-[WebAccessibilityObjectWrapper associatedPluginParent]): 48 (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]): 49 (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]): 50 1 51 2020-03-02 Wenson Hsieh <wenson_hsieh@apple.com> 2 52 -
trunk/Source/WebCore/accessibility/AXObjectCache.cpp
r257292 r257739 1365 1365 } 1366 1366 1367 #if ENABLE(ACCESSIBILITY_ISOLATED_TREE) 1368 updateIsolatedTree(object, AXSelectedTextChanged); 1369 #endif 1370 1367 1371 postTextStateChangeNotification(object, intent, selection); 1368 1372 #else … … 3140 3144 case AXCheckedStateChanged: 3141 3145 case AXChildrenChanged: 3146 case AXSelectedTextChanged: 3142 3147 case AXValueChanged: { 3143 3148 tree->removeSubtree(object->objectID()); … … 3240 3245 } 3241 3246 3242 A ccessibilityObject* AXObjectCache::rootWebArea()3247 AXCoreObject* AXObjectCache::rootWebArea() 3243 3248 { 3244 3249 AXCoreObject* rootObject = this->rootObject(); 3245 3250 if (!rootObject || !rootObject->isAccessibilityScrollView()) 3246 3251 return nullptr; 3247 return downcast<AccessibilityScrollView>(*rootObject).webAreaObject();3252 return rootObject->webAreaObject(); 3248 3253 } 3249 3254 -
trunk/Source/WebCore/accessibility/AXObjectCache.h
r256442 r257739 369 369 370 370 #if PLATFORM(COCOA) 371 void postTextStateChangePlatformNotification(A ccessibilityObject*, const AXTextStateChangeIntent&, const VisibleSelection&);371 void postTextStateChangePlatformNotification(AXCoreObject*, const AXTextStateChangeIntent&, const VisibleSelection&); 372 372 void postTextStateChangePlatformNotification(AccessibilityObject*, AXTextEditType, const String&, const VisiblePosition&); 373 void postTextReplacementPlatformNotificationForTextControl(A ccessibilityObject*, const String& deletedText, const String& insertedText, HTMLTextFormControlElement&);374 void postTextReplacementPlatformNotification(A ccessibilityObject*, AXTextEditType, const String&, AXTextEditType, const String&, const VisiblePosition&);373 void postTextReplacementPlatformNotificationForTextControl(AXCoreObject*, const String& deletedText, const String& insertedText, HTMLTextFormControlElement&); 374 void postTextReplacementPlatformNotification(AXCoreObject*, AXTextEditType, const String&, AXTextEditType, const String&, const VisiblePosition&); 375 375 #else 376 376 static AXTextChange textChangeForEditType(AXTextEditType); … … 413 413 414 414 private: 415 A ccessibilityObject* rootWebArea();415 AXCoreObject* rootWebArea(); 416 416 417 417 static AccessibilityObject* focusedImageMapUIElement(HTMLAreaElement*); -
trunk/Source/WebCore/accessibility/AccessibilityObject.h
r257589 r257739 757 757 758 758 const AccessibilityScrollView* ancestorAccessibilityScrollView(bool includeSelf) const override; 759 AccessibilityObject* webAreaObject() const override { return nullptr; } 759 760 760 761 void clearIsIgnoredFromParentData() override { m_isIgnoredFromParentData = AccessibilityIsIgnoredFromParentData(); } -
trunk/Source/WebCore/accessibility/AccessibilityObjectInterface.h
r257589 r257739 1161 1161 1162 1162 virtual const AccessibilityScrollView* ancestorAccessibilityScrollView(bool includeSelf) const = 0; 1163 virtual AXCoreObject* webAreaObject() const = 0; 1163 1164 1164 1165 virtual void setIsIgnoredFromParentData(AccessibilityIsIgnoredFromParentData&) = 0; -
trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp
r257592 r257739 1493 1493 bool AccessibilityRenderObject::isLoaded() const 1494 1494 { 1495 return !m_renderer->document().parser();1495 return m_renderer ? !m_renderer->document().parser() : false; 1496 1496 } 1497 1497 … … 1573 1573 String AccessibilityRenderObject::accessKey() const 1574 1574 { 1575 if (!m_renderer) 1576 return String(); 1577 1575 1578 Node* node = m_renderer->node(); 1576 1579 if (!is<Element>(node)) 1577 return nullAtom(); 1580 return String(); 1581 1578 1582 return downcast<Element>(*node).attributeWithoutSynchronization(accesskeyAttr); 1579 1583 } -
trunk/Source/WebCore/accessibility/AccessibilityScrollView.h
r255167 r257739 42 42 virtual ~AccessibilityScrollView(); 43 43 44 AccessibilityObject* webAreaObject() const ;44 AccessibilityObject* webAreaObject() const override; 45 45 46 46 private: … … 72 72 AccessibilityObject* parentObject() const override; 73 73 AccessibilityObject* parentObjectIfExists() const override; 74 74 75 75 AccessibilityObject* firstChild() const override { return webAreaObject(); } 76 76 AccessibilityScrollbar* addChildScrollbar(Scrollbar*); -
trunk/Source/WebCore/accessibility/ios/AXObjectCacheIOS.mm
r255167 r257739 93 93 } 94 94 95 void AXObjectCache::postTextStateChangePlatformNotification(A ccessibilityObject* object, const AXTextStateChangeIntent&, const VisibleSelection&)95 void AXObjectCache::postTextStateChangePlatformNotification(AXCoreObject* object, const AXTextStateChangeIntent&, const VisibleSelection&) 96 96 { 97 97 postPlatformNotification(object, AXSelectedTextChanged); … … 103 103 } 104 104 105 void AXObjectCache::postTextReplacementPlatformNotification(A ccessibilityObject* object, AXTextEditType, const String&, AXTextEditType, const String&, const VisiblePosition&)105 void AXObjectCache::postTextReplacementPlatformNotification(AXCoreObject* object, AXTextEditType, const String&, AXTextEditType, const String&, const VisiblePosition&) 106 106 { 107 107 postPlatformNotification(object, AXValueChanged); 108 108 } 109 109 110 void AXObjectCache::postTextReplacementPlatformNotificationForTextControl(A ccessibilityObject* object, const String&, const String&, HTMLTextFormControlElement&)110 void AXObjectCache::postTextReplacementPlatformNotificationForTextControl(AXCoreObject* object, const String&, const String&, HTMLTextFormControlElement&) 111 111 { 112 112 postPlatformNotification(object, AXValueChanged); -
trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp
r257589 r257739 60 60 setProperty(AXPropertyName::Description, object.descriptionAttributeValue().isolatedCopy()); 61 61 setProperty(AXPropertyName::ElementRect, object.elementRect()); 62 setProperty(AXPropertyName::HasARIAValueNow, object.hasARIAValueNow()); 63 setProperty(AXPropertyName::HasApplePDFAnnotationAttribute, object.hasApplePDFAnnotationAttribute()); 62 64 setProperty(AXPropertyName::HelpText, object.helpTextAttributeValue().isolatedCopy()); 63 65 setProperty(AXPropertyName::IsAccessibilityIgnored, object.accessibilityIsIgnored()); … … 207 209 setProperty(AXPropertyName::Language, object.language()); 208 210 setProperty(AXPropertyName::CanHaveSelectedChildren, object.canHaveSelectedChildren()); 209 setProperty(AXPropertyName::HasARIAValueNow, object.hasARIAValueNow());210 211 setProperty(AXPropertyName::TagName, object.tagName().isolatedCopy()); 211 212 setProperty(AXPropertyName::SupportsLiveRegion, object.supportsLiveRegion()); … … 379 380 380 381 if (isRoot) { 382 setObjectProperty(AXPropertyName::WebArea, object.webAreaObject()); 381 383 setProperty(AXPropertyName::PreventKeyboardDOMEventDispatch, object.preventKeyboardDOMEventDispatch()); 382 384 setProperty(AXPropertyName::SessionID, object.sessionID()); … … 865 867 } 866 868 869 String AXIsolatedObject::stringForRange(RefPtr<Range> range) const 870 { 871 return Accessibility::retrieveValueFromMainThread<String>([&range, this] () -> String { 872 if (auto* object = associatedAXObject()) 873 return object->stringForRange(range); 874 return String(); 875 }); 876 } 877 867 878 Vector<RefPtr<Range>> AXIsolatedObject::findTextRanges(AccessibilitySearchTextCriteria const& criteria) const 868 879 { … … 1871 1882 } 1872 1883 1873 bool AXIsolatedObject::hasApplePDFAnnotationAttribute() const1874 {1875 ASSERT_NOT_REACHED();1876 return false;1877 }1878 1879 1884 const AccessibilityScrollView* AXIsolatedObject::ancestorAccessibilityScrollView(bool) const 1880 1885 { -
trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h
r257589 r257739 145 145 FocusableAncestor, 146 146 HasARIAValueNow, 147 HasApplePDFAnnotationAttribute, 147 148 HasChildren, 148 149 HasPopup, … … 329 330 VisibleChildren, 330 331 VisibleRows, 332 WebArea, 331 333 }; 332 334 … … 644 646 VisiblePositionRange lineRangeForPosition(const VisiblePosition&) const override { return VisiblePositionRange(); } 645 647 RefPtr<Range> rangeForPlainTextRange(const PlainTextRange&) const override { return nullptr; } 646 String stringForRange(RefPtr<Range>) const override { return String(); }648 String stringForRange(RefPtr<Range>) const override; 647 649 IntRect boundsForVisiblePositionRange(const VisiblePositionRange&) const override { return IntRect(); } 648 650 IntRect boundsForRange(const RefPtr<Range>) const override { return IntRect(); } … … 876 878 bool accessibilityIgnoreAttachment() const override; 877 879 AccessibilityObjectInclusion accessibilityPlatformIncludesObject() const override; 878 bool hasApplePDFAnnotationAttribute() const override ;880 bool hasApplePDFAnnotationAttribute() const override { return boolAttributeValue(AXPropertyName::HasApplePDFAnnotationAttribute); } 879 881 const AccessibilityScrollView* ancestorAccessibilityScrollView(bool includeSelf) const override; 882 AXCoreObject* webAreaObject() const override { return objectAttributeValue(AXPropertyName::WebArea); } 880 883 void setIsIgnoredFromParentData(AccessibilityIsIgnoredFromParentData&) override; 881 884 void clearIsIgnoredFromParentData() override; -
trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp
r257200 r257739 175 175 { 176 176 LockHolder locker { m_changeLogLock }; 177 ASSERT(m_readerThreadNodeMap.contains(axID));178 177 m_pendingRemovals.append(axID); 179 178 } … … 216 215 217 216 for (const auto& item : m_pendingAppends) { 218 ASSERT(!m_readerThreadNodeMap.contains(item.m_isolatedObject->objectID()) 219 || item.m_isolatedObject->objectID() == m_rootNodeID); 220 221 if (item.m_wrapper) 222 item.m_isolatedObject->attachPlatformWrapper(item.m_wrapper); 223 224 m_readerThreadNodeMap.add(item.m_isolatedObject->objectID(), item.m_isolatedObject.get()); 217 AXID axID = item.m_isolatedObject->objectID(); 218 219 if (m_readerThreadNodeMap.get(axID) != &item.m_isolatedObject.get()) { 220 // The new IsolatedObject is a replacement for an existing object 221 // as the result of an update. Thus detach the existing one before 222 // adding the new one. 223 if (auto object = nodeForID(axID)) 224 object->detach(AccessibilityDetachmentType::ElementDestroyed); 225 m_readerThreadNodeMap.remove(axID); 226 } 227 228 if (m_readerThreadNodeMap.add(axID, item.m_isolatedObject.get()) && item.m_wrapper) 229 m_readerThreadNodeMap.get(axID)->attachPlatformWrapper(item.m_wrapper); 230 225 231 // The reference count of the just added IsolatedObject must be 2 226 232 // because it is referenced by m_readerThreadNodeMap and m_pendingAppends. 227 233 // When m_pendingAppends is cleared, the object will be held only by m_readerThreadNodeMap. 228 ASSERT(m_readerThreadNodeMap.get( item.m_isolatedObject->objectID())->refCount() == 2);234 ASSERT(m_readerThreadNodeMap.get(axID)->refCount() == 2); 229 235 } 230 236 m_pendingAppends.clear(); -
trunk/Source/WebCore/accessibility/mac/AXObjectCacheMac.mm
r257200 r257739 365 365 } 366 366 367 void AXObjectCache::postTextStateChangePlatformNotification(A ccessibilityObject* object, const AXTextStateChangeIntent& intent, const VisibleSelection& selection)367 void AXObjectCache::postTextStateChangePlatformNotification(AXCoreObject* object, const AXTextStateChangeIntent& intent, const VisibleSelection& selection) 368 368 { 369 369 if (!object) … … 420 420 } 421 421 422 static void addTextMarkerFor(NSMutableDictionary* change, A ccessibilityObject& object, const VisiblePosition& position)422 static void addTextMarkerFor(NSMutableDictionary* change, AXCoreObject& object, const VisiblePosition& position) 423 423 { 424 424 if (position.isNull()) … … 428 428 } 429 429 430 static void addTextMarkerFor(NSMutableDictionary* change, A ccessibilityObject& object, HTMLTextFormControlElement& textControl)430 static void addTextMarkerFor(NSMutableDictionary* change, AXCoreObject& object, HTMLTextFormControlElement& textControl) 431 431 { 432 432 if (id textMarker = [object.wrapper() textMarkerForFirstPositionInTextControl:textControl]) … … 435 435 436 436 template <typename TextMarkerTargetType> 437 static NSDictionary *textReplacementChangeDictionary(A ccessibilityObject& object, AXTextEditType type, const String& string, TextMarkerTargetType& markerTarget)437 static NSDictionary *textReplacementChangeDictionary(AXCoreObject& object, AXTextEditType type, const String& string, TextMarkerTargetType& markerTarget) 438 438 { 439 439 NSString *text = (NSString *)string; … … 460 460 } 461 461 462 static void postUserInfoForChanges(A ccessibilityObject& rootWebArea, AccessibilityObject& object, NSMutableArray* changes)462 static void postUserInfoForChanges(AXCoreObject& rootWebArea, AXCoreObject& object, NSMutableArray* changes) 463 463 { 464 464 NSMutableDictionary *userInfo = [[NSMutableDictionary alloc] initWithCapacity:4]; … … 477 477 } 478 478 479 void AXObjectCache::postTextReplacementPlatformNotification(A ccessibilityObject* object, AXTextEditType deletionType, const String& deletedText, AXTextEditType insertionType, const String& insertedText, const VisiblePosition& position)479 void AXObjectCache::postTextReplacementPlatformNotification(AXCoreObject* object, AXTextEditType deletionType, const String& deletedText, AXTextEditType insertionType, const String& insertedText, const VisiblePosition& position) 480 480 { 481 481 if (!object) … … 494 494 } 495 495 496 void AXObjectCache::postTextReplacementPlatformNotificationForTextControl(A ccessibilityObject* object, const String& deletedText, const String& insertedText, HTMLTextFormControlElement& textControl)496 void AXObjectCache::postTextReplacementPlatformNotificationForTextControl(AXCoreObject* object, const String& deletedText, const String& insertedText, HTMLTextFormControlElement& textControl) 497 497 { 498 498 if (!object) -
trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm
r257589 r257739 1335 1335 - (id)textMarkerRangeFromVisiblePositions:(const VisiblePosition&)startPosition endPosition:(const VisiblePosition&)endPosition 1336 1336 { 1337 return textMarkerRangeFromVisiblePositions(self.axBackingObject->axObjectCache(), startPosition, endPosition); 1337 auto* backingObject = self.updateObjectBackingStore; 1338 if (!backingObject) 1339 return nil; 1340 1341 return textMarkerRangeFromVisiblePositions(backingObject->axObjectCache(), startPosition, endPosition); 1338 1342 } 1339 1343 … … 1956 1960 { 1957 1961 return Accessibility::retrieveAutoreleasedValueFromMainThread<id>([protectedSelf = RetainPtr<WebAccessibilityObjectWrapper>(self)] () -> RetainPtr<id> { 1958 if (!protectedSelf.get().axBackingObject || !protectedSelf.get().axBackingObject->hasApplePDFAnnotationAttribute()) 1962 auto* backingObject = protectedSelf.get().axBackingObject; 1963 if (!backingObject || !backingObject->hasApplePDFAnnotationAttribute()) 1959 1964 return nil; 1960 1961 if (! protectedSelf.get().axBackingObject->document()->isPluginDocument())1965 1966 if (!backingObject->document()->isPluginDocument()) 1962 1967 return nil; 1963 1964 Widget* pluginWidget = static_cast<PluginDocument*>( protectedSelf.get().axBackingObject->document())->pluginWidget();1968 1969 Widget* pluginWidget = static_cast<PluginDocument*>(backingObject->document())->pluginWidget(); 1965 1970 if (!pluginWidget || !pluginWidget->isPluginViewBase()) 1966 1971 return nil; 1967 1968 return static_cast<PluginViewBase*>(pluginWidget)->accessibilityAssociatedPluginParentForElement( protectedSelf.get().axBackingObject->element());1972 1973 return static_cast<PluginViewBase*>(pluginWidget)->accessibilityAssociatedPluginParentForElement(backingObject->element()); 1969 1974 }); 1970 1975 } … … 3072 3077 return [self baseAccessibilitySpeechHint]; 3073 3078 3074 // Used by DRTto find an accessible node by its element id.3079 // Used by TestRunner and DRT AccessibilityController to find an accessible node by its element id. 3075 3080 if ([attributeName isEqualToString:@"AXDRTElementIdAttribute"]) 3076 3081 return backingObject->identifierAttribute(); … … 3988 3993 3989 3994 if ([attribute isEqualToString:@"AXStringForTextMarkerRange"]) { 3990 RefPtr<Range> range = [self rangeForTextMarkerRange:textMarkerRange]; 3991 return backingObject->stringForRange(range); 3995 return Accessibility::retrieveValueFromMainThread<String>([&textMarkerRange, protectedSelf = RetainPtr<WebAccessibilityObjectWrapper>(self)] () -> String { 3996 RefPtr<Range> range = [protectedSelf rangeForTextMarkerRange:textMarkerRange]; 3997 auto* backingObject = protectedSelf.get().axBackingObject; 3998 return backingObject ? backingObject->stringForRange(range) : String(); 3999 }); 3992 4000 } 3993 4001 -
trunk/Source/WebKit/WebProcess/WebPage/atk/WebKitWebPageAccessibilityObject.cpp
r252417 r257739 56 56 static AccessibilityObjectWrapper* rootWebAreaWrapper(AXCoreObject& rootObject) 57 57 { 58 if (!rootObject.is AccessibilityScrollView())58 if (!rootObject.isScrollView()) 59 59 return nullptr; 60 60 61 if (auto* webAreaObject = downcast<AccessibilityScrollView>(rootObject).webAreaObject())61 if (auto* webAreaObject = rootObject.webAreaObject()) 62 62 return webAreaObject->wrapper(); 63 63 -
trunk/Tools/ChangeLog
r257726 r257739 1 2020-03-02 Andres Gonzalez <andresg_22@apple.com> 2 3 Fix for LayoutTests/accessibility/mac/search-text/search-text.html in IsolatedTree mode. 4 https://bugs.webkit.org/show_bug.cgi?id=208434 5 6 Reviewed by Chris Fleizach. 7 8 * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp: 9 (WTR::AccessibilityController::AccessibilityController): Initializes m_useAXThread. 10 (WTR::AccessibilityController::rootElement): No need to set m_useAXThread here since it is initialize in the constructor. 11 * WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm: 12 (WTR::AccessibilityController::accessibleElementById): Same as above. 13 1 14 2020-03-02 John Wilander <wilander@apple.com> 2 15 -
trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityController.cpp
r257688 r257739 47 47 AccessibilityController::AccessibilityController() 48 48 { 49 #if PLATFORM(COCOA) 50 m_useAXThread = WKAccessibilityCanUseSecondaryAXThread(InjectedBundle::singleton().page()->page()); 51 #endif 49 52 } 50 53 … … 78 81 WKBundlePageRef page = InjectedBundle::singleton().page()->page(); 79 82 PlatformUIElement root = static_cast<PlatformUIElement>(WKAccessibilityRootObject(page)); 80 81 // Now that we have a root and the isolated tree is generated, set82 // m_useAXThread to true for next request to be handled in the secondary thread.83 if (WKAccessibilityCanUseSecondaryAXThread(InjectedBundle::singleton().page()->page()))84 m_useAXThread = true;85 83 86 84 return AccessibilityUIElement::create(root); -
trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityController.h
r253565 r257739 97 97 // WebCore/accessibility via JavaScript without going through HIServices. 98 98 // Thus to simulate the behavior of HIServices, AccessibilityController is spawning a secondary thread to service the JavaScript requests. 99 // The following flag allows to run the very first request in the main100 // thread and all subsequent requests in the secondary thread. this is what101 // the behavior would be if using HIServices.102 // The first request has to be served in the main thread in order to build103 // the AXIsolatedTree.104 99 bool m_useAXThread { false }; 105 100 BinarySemaphore m_semaphore; -
trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm
r257688 r257739 104 104 }); 105 105 106 // Now that we have a root and the isolated tree is generated, set107 // m_useAXThread to true for next request to be handled in the secondary thread.108 if (WKAccessibilityCanUseSecondaryAXThread(InjectedBundle::singleton().page()->page()))109 m_useAXThread = true;110 111 106 id result; 112 107 executeOnAXThreadIfPossible([&root, &idAttribute, &result] {
Note: See TracChangeset
for help on using the changeset viewer.