Skip to content

Commit

Permalink
Remove ENABLE_ACCESSIBILITY directive
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=266971

Reviewed by Michael Catanzaro.

It is finally enabled everywhere.

* Source/WTF/wtf/Platform.h:
* Source/WTF/wtf/PlatformEnable.h:
* Source/WebCore/accessibility/AXCoreObject.h:
(WebCore::AXCoreObject::detachWrapper):
* Source/WebCore/accessibility/AXObjectCache.cpp:
* Source/WebCore/accessibility/AXObjectCache.h:
(WebCore::AXComputedObjectAttributeCache::getIgnored const): Deleted.
(WebCore::AccessibilityReplacedText::AccessibilityReplacedText): Deleted.
(WebCore::AccessibilityReplacedText::postTextStateChangeNotification): Deleted.
(WebCore::AXComputedObjectAttributeCache::setIgnored): Deleted.
(WebCore::AXObjectCache::AXObjectCache): Deleted.
(WebCore::AXObjectCache::~AXObjectCache): Deleted.
(WebCore::AXObjectCache::get): Deleted.
(WebCore::AXObjectCache::getOrCreate): Deleted.
(WebCore::AXObjectCache::create): Deleted.
(WebCore::AXObjectCache::rootObject): Deleted.
(WebCore::AXObjectCache::rootObjectForFrame): Deleted.
(WebCore::AXObjectCache::focusedObjectForPage): Deleted.
(WebCore::AXObjectCache::enableAccessibility): Deleted.
(WebCore::AXObjectCache::setForceDeferredSpellChecking): Deleted.
(WebCore::AXObjectCache::disableAccessibility): Deleted.
(WebCore::AXObjectCache::setEnhancedUserInterfaceAccessibility): Deleted.
(WebCore::nodeHasRole): Deleted.
(WebCore::nodeHasGridRole): Deleted.
(WebCore::nodeHasCellRole): Deleted.
(WebCore::AXObjectCache::startCachingComputedObjectAttributesUntilTreeMutates): Deleted.
(WebCore::AXObjectCache::stopCachingComputedObjectAttributes): Deleted.
(WebCore::isNodeAriaVisible): Deleted.
(WebCore::AXObjectCache::rootAXEditableElement): Deleted.
(WebCore::AXObjectCache::modalNode): Deleted.
(WebCore::AXObjectCache::attachWrapper): Deleted.
(WebCore::AXObjectCache::checkedStateChanged): Deleted.
(WebCore::AXObjectCache::autofillTypeChanged): Deleted.
(WebCore::AXObjectCache::childrenChanged): Deleted.
(WebCore::AXObjectCache::onSelectedChanged): Deleted.
(WebCore::AXObjectCache::onTextSecurityChanged): Deleted.
(WebCore::AXObjectCache::onTitleChange): Deleted.
(WebCore::AXObjectCache::onValidityChange): Deleted.
(WebCore::AXObjectCache::onTextCompositionChange): Deleted.
(WebCore::AXObjectCache::valueChanged): Deleted.
(WebCore::AXObjectCache::onFocusChange): Deleted.
(WebCore::AXObjectCache::onPageActivityStateChange): Deleted.
(WebCore::AXObjectCache::onPopoverToggle): Deleted.
(WebCore::AXObjectCache::onScrollbarFrameRectChange): Deleted.
(WebCore::AXObjectCache::onWidgetVisibilityChanged): Deleted.
(WebCore::AXObjectCache::deferRecomputeIsIgnoredIfNeeded): Deleted.
(WebCore::AXObjectCache::deferRecomputeIsIgnored): Deleted.
(WebCore::AXObjectCache::deferTextChangedIfNeeded): Deleted.
(WebCore::AXObjectCache::deferSelectedChildrenChangedIfNeeded): Deleted.
(WebCore::AXObjectCache::deferTextReplacementNotificationForTextControl): Deleted.
(WebCore::AXObjectCache::deferRecomputeTableCellSlots): Deleted.
(WebCore::AXObjectCache::deferRowspanChange): Deleted.
(WebCore::AXObjectCache::detachWrapper): Deleted.
(WebCore::AXObjectCache::focusCurrentModal): Deleted.
(WebCore::AXObjectCache::performCacheUpdateTimerFired): Deleted.
(WebCore::AXObjectCache::frameLoadingEventNotification): Deleted.
(WebCore::AXObjectCache::frameLoadingEventPlatformNotification): Deleted.
(WebCore::AXObjectCache::handleAriaExpandedChange): Deleted.
(WebCore::AXObjectCache::deferModalChange): Deleted.
(WebCore::AXObjectCache::handleAllDeferredChildrenChanged): Deleted.
(WebCore::AXObjectCache::handleRoleChanged): Deleted.
(WebCore::AXObjectCache::deferAttributeChangeIfNeeded): Deleted.
(WebCore::AXObjectCache::handleAttributeChange): Deleted.
(WebCore::AXObjectCache::shouldProcessAttributeChange): Deleted.
(WebCore::AXObjectCache::handleFocusedUIElementChanged): Deleted.
(WebCore::AXObjectCache::handleScrollbarUpdate): Deleted.
(WebCore::AXObjectCache::onScrollbarUpdate): Deleted.
(WebCore::AXObjectCache::handleScrolledToAnchor): Deleted.
(WebCore::AXObjectCache::liveRegionChangedNotificationPostTimerFired): Deleted.
(WebCore::AXObjectCache::notificationPostTimerFired): Deleted.
(WebCore::AXObjectCache::passwordNotificationPostTimerFired): Deleted.
(WebCore::AXObjectCache::performDeferredCacheUpdate): Deleted.
(WebCore::AXObjectCache::postLiveRegionChangeNotification): Deleted.
(WebCore::AXObjectCache::postNotification): Deleted.
(WebCore::AXObjectCache::announce): Deleted.
(WebCore::AXObjectCache::postTextReplacementNotification): Deleted.
(WebCore::AXObjectCache::postTextReplacementNotificationForTextControl): Deleted.
(WebCore::AXObjectCache::postTextStateChangeNotification): Deleted.
(WebCore::AXObjectCache::recomputeIsIgnored): Deleted.
(WebCore::AXObjectCache::handleTextChanged): Deleted.
(WebCore::AXObjectCache::handleRecomputeCellSlots): Deleted.
(WebCore::AXObjectCache::onRendererCreated): Deleted.
(WebCore::AXObjectCache::updateLoadingProgress): Deleted.
(WebCore::AXObjectCache::rangeForNodeContents): Deleted.
(WebCore::AXObjectCache::relatedObjectIDsFor): Deleted.
(WebCore::AXObjectCache::updateRelations): Deleted.
(WebCore::AXObjectCache::remove): Deleted.
(WebCore::AXObjectCache::selectedChildrenChanged): Deleted.
(WebCore::AXObjectCache::setIsSynchronizingSelection): Deleted.
(WebCore::AXObjectCache::setTextSelectionIntent): Deleted.
(WebCore::AXObjectCache::rangeForUnorderedCharacterOffsets): Deleted.
(WebCore::AXObjectCache::absoluteCaretBoundsForCharacterOffset): Deleted.
(WebCore::AXObjectCache::characterOffsetForIndex): Deleted.
(WebCore::AXObjectCache::startOrEndCharacterOffsetForRange): Deleted.
(WebCore::AXObjectCache::endCharacterOffsetOfLine): Deleted.
(WebCore::AXObjectCache::nextCharacterOffset): Deleted.
(WebCore::AXObjectCache::previousCharacterOffset): Deleted.
(WebCore::AXObjectCache::textMarkerDataForVisiblePosition): Deleted.
(WebCore::AXObjectCache::textMarkerDataForCharacterOffset): Deleted.
(WebCore::AXObjectCache::visiblePositionForTextMarkerData): Deleted.
(WebCore::AXObjectCache::visiblePositionFromCharacterOffset): Deleted.
(WebCore::AXObjectCache::postTextStateChangePlatformNotification): Deleted.
(WebCore::AXObjectCache::postTextReplacementPlatformNotification): Deleted.
(WebCore::AXObjectCache::textChangeForEditType): Deleted.
(WebCore::AXObjectCache::nodeTextChangePlatformNotification): Deleted.
(WebCore::AXObjectCache::treeData): Deleted.
(WebCore::AXAttributeCacheEnabler::AXAttributeCacheEnabler): Deleted.
(WebCore::AXAttributeCacheEnabler::~AXAttributeCacheEnabler): Deleted.
* Source/WebCore/accessibility/AccessibilityMenuList.cpp:
(WebCore::AccessibilityMenuList::didUpdateActiveOption):
* Source/WebCore/accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::isDetached const):
(WebCore::AccessibilityObject::lineForPosition const):
(WebCore::AccessibilityObject::updateBackingStore):
(WebCore::AccessibilityObject::children):
(WebCore::AccessibilityObject::localizedActionVerb const):
* Source/WebCore/accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::previousLineStartPosition const):
(WebCore::AccessibilityObject::accessibilityIgnoreAttachment const): Deleted.
(WebCore::AccessibilityObject::accessibilityPlatformIncludesObject const): Deleted.
(WebCore::AccessibilityObject::children): Deleted.
(WebCore::AccessibilityObject::localizedActionVerb const): Deleted.
(WebCore::AccessibilityObject::actionVerb const): Deleted.
(WebCore::AccessibilityObject::lineForPosition const): Deleted.
(WebCore::AccessibilityObject::updateBackingStore): Deleted.
(WebCore::AccessibilityObject::detachPlatformWrapper): Deleted.
* Source/WebCore/accessibility/cocoa/AccessibilityObjectCocoa.mm:
* Source/WebCore/accessibility/ios/AXObjectCacheIOS.mm:
* Source/WebCore/accessibility/ios/AccessibilityObjectIOS.mm:
* Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.h:
* Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
* Source/WebCore/accessibility/mac/AXObjectCacheMac.mm:
* Source/WebCore/accessibility/mac/AccessibilityObjectMac.mm:
* Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
* Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
* Source/WebCore/accessibility/playstation/AXObjectCachePlayStation.cpp:
* Source/WebCore/accessibility/playstation/AccessibilityObjectPlayStation.cpp:
* Source/WebCore/accessibility/win/AccessibilityObjectWin.cpp:
* Source/WebCore/accessibility/win/AccessibilityObjectWrapperWin.cpp:
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::updateTitle):
(WebCore::Document::willBeRemovedFromFrame):
* Source/WebCore/editing/FrameSelection.h:
* Source/WebCore/editing/TextCheckingHelper.cpp:
(WebCore::platformOrClientDrivenTextCheckerEnabled):
* Source/WebCore/html/HTMLElement.cpp:
(WebCore::HTMLElement::showPopover):
(WebCore::HTMLElement::hidePopoverInternal):
* Source/WebCore/html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::setInnerTextValue):
* Source/WebCore/testing/Internals.cpp:
(WebCore::Internals::resetToConsistentState):
* Source/WebKit/PlatformWPE.cmake:
* Source/WebKit/UIProcess/API/glib/WebKitWebViewAccessible.cpp:
* Source/WebKit/UIProcess/API/glib/WebKitWebViewAccessible.h:
* Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseDispose):
(webkit_web_view_base_class_init):
* Source/WebKit/UIProcess/API/wpe/PageClientImpl.cpp:
(WebKit::PageClientImpl::accessible):
* Source/WebKit/UIProcess/API/wpe/PageClientImpl.h:
* Source/WebKit/UIProcess/API/wpe/WPEWebView.cpp:
(WKWPE::m_backend):
(WKWPE::View::~View):
(WKWPE::View::accessible const):
* Source/WebKit/UIProcess/API/wpe/WPEWebView.h:
* Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp:
(WebKit::bindA11y):
(WebKit::bubblewrapSpawn):
* Source/WebKit/UIProcess/Launcher/glib/XDGDBusProxy.cpp:
(WebKit::XDGDBusProxy::accessibilityProxy):
* Source/WebKit/UIProcess/wpe/WebPageProxyWPE.cpp:
(WebKit::WebPageProxy::bindAccessibilityTree):
* Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKAccessibilityEnable):
(WKAccessibilityRootObject):
(WKAccessibilityFocusedObject):
(WKAccessibilityFocusedUIElement):
(WKAccessibilityAnnounce):
(WKAccessibilityEnableEnhancedAccessibility):
(WKAccessibilityEnhancedAccessibilityEnabled):
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
* Source/WebKitLegacy/mac/WebView/WebFrame.mm:
(-[WebFrame setAccessibleName:]):
(-[WebFrame enhancedAccessibilityEnabled]):
(-[WebFrame setEnhancedAccessibility:]):
(-[WebFrame accessibilityRoot]):
* Source/cmake/OptionsGTK.cmake:
* Source/cmake/OptionsPlayStation.cmake:
* Source/cmake/OptionsWPE.cmake:
* Source/cmake/WebKitFeatures.cmake:
* Tools/DumpRenderTree/AccessibilityController.cpp:
(AccessibilityController::resetToConsistentState):
* Tools/DumpRenderTree/AccessibilityUIElement.cpp:
(AccessibilityUIElement::getJSClass):
* Tools/MiniBrowser/wpe/main.cpp:
(activate):
* Tools/TestWebKitAPI/glib/PlatformGTK.cmake:
* Tools/WebKitTestRunner/InjectedBundle/AccessibilityController.cpp:
* Tools/WebKitTestRunner/InjectedBundle/AccessibilityController.h:
(WTR::AccessibilityController::rootElement): Deleted.
(WTR::AccessibilityController::focusedElement): Deleted.
* Tools/WebKitTestRunner/InjectedBundle/AccessibilityTextMarker.cpp:
* Tools/WebKitTestRunner/InjectedBundle/AccessibilityTextMarkerRange.cpp:
* Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
* Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityController.idl:
* Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityTextMarker.idl:
* Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityTextMarkerRange.idl:
* Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::beginTesting):
(WTR::InjectedBundle::done):
* Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h:
(WTR::InjectedBundle::textInputController):
(WTR::InjectedBundle::accessibilityController):
* Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::didClearWindowForFrame):
* Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
* Tools/WebKitTestRunner/InjectedBundle/win/AccessibilityControllerWin.cpp:
* Tools/WebKitTestRunner/InjectedBundle/win/AccessibilityUIElementWin.cpp:
* Tools/wpe/backends/PlatformWPE.cmake:
* Tools/wpe/backends/ViewBackend.cpp:
(WPEToolingBackends::ViewBackend::dispatchInputKeyboardEvent):
(WPEToolingBackends::ViewBackend::initializeAccessibility): Deleted.
(WPEToolingBackends::ViewBackend::updateAccessibilityState): Deleted.
* Tools/wpe/backends/ViewBackend.h:
* Tools/wpe/backends/atk/ViewBackendAtk.cpp:
* Tools/wpe/backends/atk/WebKitAccessibleApplication.cpp:
(webkitAccessibleApplicationSetChild):
* Tools/wpe/backends/atk/WebKitAccessibleApplication.h:

Canonical link: https://commits.webkit.org/273021@main
  • Loading branch information
annevk committed Jan 14, 2024
1 parent 0f59c6a commit e49f608
Show file tree
Hide file tree
Showing 71 changed files with 55 additions and 464 deletions.
2 changes: 1 addition & 1 deletion Source/WTF/wtf/Platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,6 @@
#endif

/* FIXME: This is used to "turn on a specific feature of WebKit", so should be converted to an ENABLE macro. */
#if (PLATFORM(COCOA) || PLATFORM(GTK) || PLATFORM(WPE)) && ENABLE(ACCESSIBILITY)
#if PLATFORM(COCOA) || PLATFORM(GTK) || PLATFORM(WPE)
#define USE_ACCESSIBILITY_CONTEXT_MENUS 1
#endif
4 changes: 0 additions & 4 deletions Source/WTF/wtf/PlatformEnable.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,6 @@
#define ENABLE_3D_TRANSFORMS 0
#endif

#if !defined(ENABLE_ACCESSIBILITY)
#define ENABLE_ACCESSIBILITY 1
#endif

#if !defined(ENABLE_ACCESSIBILITY_ANIMATION_CONTROL)
#define ENABLE_ACCESSIBILITY_ANIMATION_CONTROL 0
#endif
Expand Down
8 changes: 0 additions & 8 deletions Source/WebCore/accessibility/AXCoreObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -1355,15 +1355,9 @@ class AXCoreObject : public ThreadSafeRefCountedAndCanMakeThreadSafeWeakPtr<AXCo
virtual void mathPrescripts(AccessibilityMathMultiscriptPairs&) = 0;
virtual void mathPostscripts(AccessibilityMathMultiscriptPairs&) = 0;

#if ENABLE(ACCESSIBILITY)
AccessibilityObjectWrapper* wrapper() const { return m_wrapper.get(); }
void setWrapper(AccessibilityObjectWrapper* wrapper) { m_wrapper = wrapper; }
void detachWrapper(AccessibilityDetachmentType);
#else
AccessibilityObjectWrapper* wrapper() const { return nullptr; }
void setWrapper(AccessibilityObjectWrapper*) { }
void detachWrapper(AccessibilityDetachmentType) { }
#endif

#if PLATFORM(IOS_FAMILY)
virtual int accessibilitySecureFieldLength() = 0;
Expand Down Expand Up @@ -1493,13 +1487,11 @@ inline void AXCoreObject::detach(AccessibilityDetachmentType detachmentType)
detachRemoteParts(detachmentType);
}

#if ENABLE(ACCESSIBILITY)
inline void AXCoreObject::detachWrapper(AccessibilityDetachmentType detachmentType)
{
detachPlatformWrapper(detachmentType);
m_wrapper = nullptr;
}
#endif

inline Vector<AXID> AXCoreObject::childrenIDs(bool updateChildrenIfNecessary)
{
Expand Down
4 changes: 0 additions & 4 deletions Source/WebCore/accessibility/AXObjectCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@

#include "config.h"

#if ENABLE(ACCESSIBILITY)

#include "AXObjectCache.h"

#include "AXImage.h"
Expand Down Expand Up @@ -5069,5 +5067,3 @@ void AXObjectCache::onWidgetVisibilityChanged(RenderWidget* widget)
}

} // namespace WebCore

#endif // ENABLE(ACCESSIBILITY)
133 changes: 0 additions & 133 deletions Source/WebCore/accessibility/AXObjectCache.h
Original file line number Diff line number Diff line change
Expand Up @@ -671,15 +671,9 @@ class AXObjectCache : public CanMakeWeakPtr<AXObjectCache>, public CanMakeChecke

std::unique_ptr<AXComputedObjectAttributeCache> m_computedObjectAttributeCache;

#if ENABLE(ACCESSIBILITY)
WEBCORE_EXPORT static bool gAccessibilityEnabled;
WEBCORE_EXPORT static bool gAccessibilityEnhancedUserInterfaceEnabled;
static bool gForceDeferredSpellChecking;
#else
static constexpr bool gAccessibilityEnabled { false };
static constexpr bool gAccessibilityEnhancedUserInterfaceEnabled { false };
static constexpr bool gForceDeferredSpellChecking { false };
#endif

HashSet<AXID> m_idsInUse;

Expand Down Expand Up @@ -761,11 +755,9 @@ class AXAttributeCacheEnabler
explicit AXAttributeCacheEnabler(AXObjectCache *cache);
~AXAttributeCacheEnabler();

#if ENABLE(ACCESSIBILITY)
private:
AXObjectCache* m_cache;
bool m_wasAlreadyCaching { false };
#endif
};

bool nodeHasRole(Node*, StringView role);
Expand All @@ -774,131 +766,6 @@ bool nodeHasCellRole(Node*);
// This will let you know if aria-hidden was explicitly set to false.
bool isNodeAriaVisible(Node*);

#if !ENABLE(ACCESSIBILITY)
inline AccessibilityObjectInclusion AXComputedObjectAttributeCache::getIgnored(AXID) const { return AccessibilityObjectInclusion::DefaultBehavior; }
inline AccessibilityReplacedText::AccessibilityReplacedText(const VisibleSelection&) { }
inline void AccessibilityReplacedText::postTextStateChangeNotification(AXObjectCache*, AXTextEditType, const String&, const VisibleSelection&) { }
inline void AXComputedObjectAttributeCache::setIgnored(AXID, AccessibilityObjectInclusion) { }
inline AXObjectCache::AXObjectCache(Document& document) : m_document(document), m_notificationPostTimer(*this, &AXObjectCache::notificationPostTimerFired), m_passwordNotificationPostTimer(*this, &AXObjectCache::passwordNotificationPostTimerFired), m_liveRegionChangedPostTimer(*this, &AXObjectCache::liveRegionChangedNotificationPostTimerFired), m_performCacheUpdateTimer(*this, &AXObjectCache::performCacheUpdateTimerFired) { }
inline AXObjectCache::~AXObjectCache() { }
inline AccessibilityObject* AXObjectCache::get(RenderObject*) { return nullptr; }
inline AccessibilityObject* AXObjectCache::get(Node*) { return nullptr; }
inline AccessibilityObject* AXObjectCache::get(Widget*) { return nullptr; }
inline AccessibilityObject* AXObjectCache::getOrCreate(RenderObject*) { return nullptr; }
inline AccessibilityObject* AXObjectCache::create(AccessibilityRole) { return nullptr; }
inline AccessibilityObject* AXObjectCache::getOrCreate(Node*, IsPartOfRelation) { return nullptr; }
inline AccessibilityObject* AXObjectCache::getOrCreate(Widget*) { return nullptr; }
inline AXCoreObject* AXObjectCache::rootObject() { return nullptr; }
inline AccessibilityObject* AXObjectCache::rootObjectForFrame(LocalFrame*) { return nullptr; }
inline AccessibilityObject* AXObjectCache::focusedObjectForPage(const Page*) { return nullptr; }
inline void AXObjectCache::enableAccessibility() { }
inline void AXObjectCache::setForceDeferredSpellChecking(bool) { }
inline void AXObjectCache::disableAccessibility() { }
inline void AXObjectCache::setEnhancedUserInterfaceAccessibility(bool) { }
inline bool nodeHasRole(Node*, StringView) { return false; }
inline bool nodeHasGridRole(Node*) { return false; }
inline bool nodeHasCellRole(Node*) { return false; }
inline void AXObjectCache::startCachingComputedObjectAttributesUntilTreeMutates() { }
inline void AXObjectCache::stopCachingComputedObjectAttributes() { }
inline bool isNodeAriaVisible(Node*) { return true; }
inline const Element* AXObjectCache::rootAXEditableElement(const Node*) { return nullptr; }
inline Node* AXObjectCache::modalNode() { return nullptr; }
inline void AXObjectCache::attachWrapper(AccessibilityObject*) { }
inline void AXObjectCache::checkedStateChanged(Node*) { }
inline void AXObjectCache::autofillTypeChanged(Node*) { }
inline void AXObjectCache::childrenChanged(Node*, Node*) { }
inline void AXObjectCache::childrenChanged(RenderObject*, RenderObject*) { }
inline void AXObjectCache::childrenChanged(AccessibilityObject*) { }
inline void AXObjectCache::onSelectedChanged(Node*) { }
inline void AXObjectCache::onTextSecurityChanged(HTMLInputElement&) { }
inline void AXObjectCache::onTitleChange(Document&) { }
inline void AXObjectCache::onValidityChange(Element&) { }
inline void AXObjectCache::onTextCompositionChange(Node&, CompositionState, bool, const String&, size_t, bool) { }
inline void AXObjectCache::valueChanged(Element*) { }
inline void AXObjectCache::onFocusChange(Node*, Node*) { }
inline void AXObjectCache::onPageActivityStateChange(OptionSet<ActivityState>) { }
inline void AXObjectCache::onPopoverToggle(const HTMLElement&) { }
inline void AXObjectCache::onScrollbarFrameRectChange(const Scrollbar&) { }
inline void AXObjectCache::onWidgetVisibilityChanged(RenderWidget*) { }
inline void AXObjectCache::deferRecomputeIsIgnoredIfNeeded(Element*) { }
inline void AXObjectCache::deferRecomputeIsIgnored(Element*) { }
inline void AXObjectCache::deferTextChangedIfNeeded(Node*) { }
inline void AXObjectCache::deferSelectedChildrenChangedIfNeeded(Element&) { }
inline void AXObjectCache::deferTextReplacementNotificationForTextControl(HTMLTextFormControlElement&, const String&) { }
inline void AXObjectCache::deferRecomputeTableCellSlots(AccessibilityTable&) { }
inline void AXObjectCache::deferRowspanChange(AccessibilityObject*) { }
#if !PLATFORM(COCOA) && !USE(ATSPI)
inline void AXObjectCache::detachWrapper(AXCoreObject*, AccessibilityDetachmentType) { }
#endif
inline void AXObjectCache::focusCurrentModal() { }
inline void AXObjectCache::performCacheUpdateTimerFired() { }
inline void AXObjectCache::frameLoadingEventNotification(LocalFrame*, AXLoadingEvent) { }
inline void AXObjectCache::frameLoadingEventPlatformNotification(AccessibilityObject*, AXLoadingEvent) { }
inline void AXObjectCache::handleAriaExpandedChange(Node*) { }
inline void AXObjectCache::deferModalChange(Element*) { }
inline void AXObjectCache::handleAllDeferredChildrenChanged() { }
inline void AXObjectCache::handleRoleChanged(AccessibilityObject*) { }
inline void AXObjectCache::deferAttributeChangeIfNeeded(Element*, const QualifiedName&, const AtomString&, const AtomString&) { }
inline void AXObjectCache::handleAttributeChange(Element*, const QualifiedName&, const AtomString&, const AtomString&) { }
inline bool AXObjectCache::shouldProcessAttributeChange(Element*, const QualifiedName&) { return false; }
inline void AXObjectCache::handleFocusedUIElementChanged(Node*, Node*, UpdateModal) { }
inline void AXObjectCache::handleScrollbarUpdate(ScrollView&) { }
inline void AXObjectCache::onScrollbarUpdate(ScrollView*) { }
inline void AXObjectCache::handleScrolledToAnchor(const Node*) { }
inline void AXObjectCache::liveRegionChangedNotificationPostTimerFired() { }
inline void AXObjectCache::notificationPostTimerFired() { }
inline void AXObjectCache::passwordNotificationPostTimerFired() { }
inline void AXObjectCache::performDeferredCacheUpdate() { }
inline void AXObjectCache::postLiveRegionChangeNotification(AccessibilityObject*) { }
inline void AXObjectCache::postNotification(AccessibilityObject*, Document*, AXNotification, PostTarget) { }
inline void AXObjectCache::postNotification(Node*, AXNotification, PostTarget) { }
inline void AXObjectCache::postNotification(RenderObject*, AXNotification, PostTarget) { }
inline void AXObjectCache::announce(const String&) { }
inline void AXObjectCache::postTextReplacementNotification(Node*, AXTextEditType, const String&, AXTextEditType, const String&, const VisiblePosition&) { }
inline void AXObjectCache::postTextReplacementNotificationForTextControl(HTMLTextFormControlElement&, const String&, const String&) { }
inline void AXObjectCache::postTextStateChangeNotification(Node*, AXTextEditType, const String&, const VisiblePosition&) { }
inline void AXObjectCache::postTextStateChangeNotification(Node*, const AXTextStateChangeIntent&, const VisibleSelection&) { }
inline void AXObjectCache::recomputeIsIgnored(RenderObject*) { }
inline void AXObjectCache::handleTextChanged(AccessibilityObject*) { }
inline void AXObjectCache::handleRecomputeCellSlots(AccessibilityTable&) { }
inline void AXObjectCache::onRendererCreated(Element&) { }
inline void AXObjectCache::updateLoadingProgress(double) { }
inline SimpleRange AXObjectCache::rangeForNodeContents(Node& node) { return makeRangeSelectingNodeContents(node); }
inline std::optional<ListHashSet<AXID>> AXObjectCache::relatedObjectIDsFor(const AXCoreObject&, AXRelationType) { return std::nullopt; }
inline void AXObjectCache::updateRelations(Element&, const QualifiedName&) { }
inline void AXObjectCache::remove(AXID) { }
inline void AXObjectCache::remove(RenderObject*) { }
inline void AXObjectCache::remove(Node&) { }
inline void AXObjectCache::remove(Widget*) { }
inline void AXObjectCache::selectedChildrenChanged(RenderObject*) { }
inline void AXObjectCache::selectedChildrenChanged(Node*) { }
inline void AXObjectCache::setIsSynchronizingSelection(bool) { }
inline void AXObjectCache::setTextSelectionIntent(const AXTextStateChangeIntent&) { }
inline std::optional<SimpleRange> AXObjectCache::rangeForUnorderedCharacterOffsets(const CharacterOffset&, const CharacterOffset&) { return std::nullopt; }
inline IntRect AXObjectCache::absoluteCaretBoundsForCharacterOffset(const CharacterOffset&) { return IntRect(); }
inline CharacterOffset AXObjectCache::characterOffsetForIndex(int, const AXCoreObject*) { return CharacterOffset(); }
inline CharacterOffset AXObjectCache::startOrEndCharacterOffsetForRange(const SimpleRange&, bool, bool) { return CharacterOffset(); }
inline CharacterOffset AXObjectCache::endCharacterOffsetOfLine(const CharacterOffset&) { return CharacterOffset(); }
inline CharacterOffset AXObjectCache::nextCharacterOffset(const CharacterOffset&, bool) { return CharacterOffset(); }
inline CharacterOffset AXObjectCache::previousCharacterOffset(const CharacterOffset&, bool) { return CharacterOffset(); }
inline std::optional<TextMarkerData> AXObjectCache::textMarkerDataForVisiblePosition(const VisiblePosition&) { return std::nullopt; }
inline TextMarkerData AXObjectCache::textMarkerDataForCharacterOffset(const CharacterOffset&) { return { }; }
inline VisiblePosition AXObjectCache::visiblePositionForTextMarkerData(const TextMarkerData&) { return { }; }
inline VisiblePosition AXObjectCache::visiblePositionFromCharacterOffset(const CharacterOffset&) { return { }; }
#if PLATFORM(COCOA)
inline void AXObjectCache::postTextStateChangePlatformNotification(AccessibilityObject*, const AXTextStateChangeIntent&, const VisibleSelection&) { }
inline void AXObjectCache::postTextStateChangePlatformNotification(AccessibilityObject*, AXTextEditType, const String&, const VisiblePosition&) { }
inline void AXObjectCache::postTextReplacementPlatformNotification(AccessibilityObject*, AXTextEditType, const String&, AXTextEditType, const String&, const VisiblePosition&) { }
#else
inline AXTextChange AXObjectCache::textChangeForEditType(AXTextEditType) { return AXTextInserted; }
inline void AXObjectCache::nodeTextChangePlatformNotification(AccessibilityObject*, AXTextChange, unsigned, const String&) { }
#endif
inline AXTreeData AXObjectCache::treeData() { return { }; }

inline AXAttributeCacheEnabler::AXAttributeCacheEnabler(AXObjectCache*) { }
inline AXAttributeCacheEnabler::~AXAttributeCacheEnabler() { }
#endif // !ENABLE(ACCESSIBILITY)

WTF::TextStream& operator<<(WTF::TextStream&, AXObjectCache::AXNotification);

} // namespace WebCore
2 changes: 0 additions & 2 deletions Source/WebCore/accessibility/AccessibilityMenuList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,8 @@ void AccessibilityMenuList::didUpdateActiveOption(int optionIndex)
downcast<AccessibilityMenuListPopup>(*childObjects[0]).didUpdateActiveOption(optionIndex);
}

#if ENABLE(ACCESSIBILITY)
if (auto* cache = document->axObjectCache())
cache->deferMenuListValueChange(element());
#endif
}

} // namespace WebCore
16 changes: 2 additions & 14 deletions Source/WebCore/accessibility/AccessibilityObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,7 @@ void AccessibilityObject::detachRemoteParts(AccessibilityDetachmentType detachme

bool AccessibilityObject::isDetached() const
{
#if ENABLE(ACCESSIBILITY)
return !wrapper();
#else
return true;
#endif
}

OptionSet<AXAncestorFlag> AccessibilityObject::computeAncestorFlags() const
Expand Down Expand Up @@ -1993,8 +1989,7 @@ bool AccessibilityObject::contentEditableAttributeIsEnabled(Element* element)
// Both "true" (case-insensitive) and the empty string count as true.
return contentEditableValue.isEmpty() || equalLettersIgnoringASCIICase(contentEditableValue, "true"_s);
}

#if ENABLE(ACCESSIBILITY)

int AccessibilityObject::lineForPosition(const VisiblePosition& visiblePos) const
{
if (visiblePos.isNull() || !node())
Expand All @@ -2020,7 +2015,6 @@ int AccessibilityObject::lineForPosition(const VisiblePosition& visiblePos) cons

return lineCount;
}
#endif

// NOTE: Consider providing this utility method as AX API
CharacterRange AccessibilityObject::plainTextRangeForVisiblePositionRange(const VisiblePositionRange& positionRange) const
Expand Down Expand Up @@ -2062,7 +2056,6 @@ unsigned AccessibilityObject::doAXLineForIndex(unsigned index)
return lineForPosition(visiblePositionForIndex(index, false));
}

#if ENABLE(ACCESSIBILITY)
void AccessibilityObject::updateBackingStore()
{
if (!axObjectCache())
Expand All @@ -2080,7 +2073,6 @@ void AccessibilityObject::updateBackingStore()

updateChildrenIfNecessary();
}
#endif

const AccessibilityScrollView* AccessibilityObject::ancestorAccessibilityScrollView(bool includeSelf) const
{
Expand Down Expand Up @@ -2129,15 +2121,13 @@ LocalFrameView* AccessibilityObject::documentFrameView() const
return object->documentFrameView();
}

#if ENABLE(ACCESSIBILITY)
const AccessibilityObject::AccessibilityChildrenVector& AccessibilityObject::children(bool updateChildrenIfNeeded)
{
if (updateChildrenIfNeeded)
updateChildrenIfNecessary();

return m_children;
}
#endif

void AccessibilityObject::updateChildrenIfNecessary()
{
Expand Down Expand Up @@ -2286,8 +2276,7 @@ const String AccessibilityObject::defaultLiveRegionStatusForRole(AccessibilityRo
return nullAtom();
}
}

#if ENABLE(ACCESSIBILITY)

String AccessibilityObject::localizedActionVerb() const
{
#if !PLATFORM(IOS_FAMILY)
Expand Down Expand Up @@ -2360,7 +2349,6 @@ String AccessibilityObject::actionVerb() const
#endif
return { };
}
#endif

bool AccessibilityObject::ariaIsMultiline() const
{
Expand Down
23 changes: 1 addition & 22 deletions Source/WebCore/accessibility/AccessibilityObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -702,15 +702,10 @@ class AccessibilityObject : public AXCoreObject, public CanMakeWeakPtr<Accessibi
void overrideAttachmentParent(AccessibilityObject*) { }
#endif

#if ENABLE(ACCESSIBILITY)
// A platform-specific method for determining if an attachment is ignored.
bool accessibilityIgnoreAttachment() const;
// Gives platforms the opportunity to indicate if an object should be included.
AccessibilityObjectInclusion accessibilityPlatformIncludesObject() const;
#else
bool accessibilityIgnoreAttachment() const { return true; }
AccessibilityObjectInclusion accessibilityPlatformIncludesObject() const { return AccessibilityObjectInclusion::DefaultBehavior; }
#endif

#if PLATFORM(IOS_FAMILY)
int accessibilitySecureFieldLength() override;
Expand Down Expand Up @@ -848,7 +843,6 @@ class AccessibilityObject : public AXCoreObject, public CanMakeWeakPtr<Accessibi
bool m_subtreeDirty { false };
};

#if ENABLE(ACCESSIBILITY)
inline bool AccessibilityObject::hasDisplayContents() const
{
return is<Element>(node()) && downcast<Element>(node())->hasDisplayContents();
Expand All @@ -869,23 +863,8 @@ inline VisiblePosition AccessibilityObject::previousLineStartPosition(const Visi
{
return previousLineStartPositionInternal(position).value_or(VisiblePosition());
}
#else
inline bool AccessibilityObject::hasDisplayContents() const { return false; }
inline void AccessibilityObject::recomputeIsIgnored() { }
inline std::optional<BoundaryPoint> AccessibilityObject::lastBoundaryPointContainedInRect(const Vector<BoundaryPoint>&, const BoundaryPoint&, const FloatRect&) const { return std::nullopt; }
inline VisiblePosition AccessibilityObject::previousLineStartPosition(const VisiblePosition&) const { return { }; }
#endif

#if !ENABLE(ACCESSIBILITY)
inline const AccessibilityObject::AccessibilityChildrenVector& AccessibilityObject::children(bool) { return m_children; }
inline String AccessibilityObject::localizedActionVerb() const { return emptyString(); }
inline String AccessibilityObject::actionVerb() const { return emptyString(); }
inline int AccessibilityObject::lineForPosition(const VisiblePosition&) const { return -1; }
inline void AccessibilityObject::updateBackingStore() { }
inline void AccessibilityObject::detachPlatformWrapper(AccessibilityDetachmentType) { }
#endif

#if !(ENABLE(ACCESSIBILITY) && USE(ATSPI))
#if !USE(ATSPI)
inline bool AccessibilityObject::allowsTextRanges() const { return true; }
inline unsigned AccessibilityObject::getLengthForTextRange() const { return text().length(); }
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#import "config.h"
#import "AccessibilityObject.h"

#if ENABLE(ACCESSIBILITY) && PLATFORM(COCOA)
#if PLATFORM(COCOA)

#import "AXObjectCache.h"
#import "TextIterator.h"
Expand Down Expand Up @@ -254,4 +254,4 @@ static void attributedStringAppendWrapper(NSMutableAttributedString *attrString,

} // namespace WebCore

#endif // ENABLE(ACCESSIBILITY) && PLATFORM(COCOA)
#endif // PLATFORM(COCOA)
4 changes: 2 additions & 2 deletions Source/WebCore/accessibility/ios/AXObjectCacheIOS.mm
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#import "config.h"
#import "AXObjectCache.h"

#if ENABLE(ACCESSIBILITY) && PLATFORM(IOS_FAMILY)
#if PLATFORM(IOS_FAMILY)

#import "AccessibilityObject.h"
#import "Chrome.h"
Expand Down Expand Up @@ -173,4 +173,4 @@

}

#endif // ENABLE(ACCESSIBILITY) && PLATFORM(IOS_FAMILY)
#endif // PLATFORM(IOS_FAMILY)
Loading

0 comments on commit e49f608

Please sign in to comment.