[Webkit-unassigned] [Bug 236024] New: [WPE] Fix for non-unified builds with ACCESSIBILITY=OFF

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 2 09:31:07 PST 2022


https://bugs.webkit.org/show_bug.cgi?id=236024

            Bug ID: 236024
           Summary: [WPE] Fix for non-unified builds with
                    ACCESSIBILITY=OFF
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebCore Misc.
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: psaavedra at igalia.com

in the code you can see many blocks safeguarded by:

  #if ENABLE(ACCESSIBILITY) && USE(ATSPI)


But, at the same time, there is in many other places another variation of those checks without the ENABLE(ACCESSIBILITY) only checking the USE_ATSPI or USE_ATK values.


This generates inconsistencies because missing definitions when ACCESSIBILITY is OFF. For example here  where the definition of the "class AccessibilityObjectAtspi" is safeguarded in Source/WebCore/accessibility/atspi/AccessibilityObjectAtspi.h  with "#if ENABLE(ACCESSIBILITY) && USE(ATSPI)" but later in the   the Source/WebCore/accessibility/AccessibilityObjectInterface.h:

  #if PLATFORM(COCOA)
  OBJC_CLASS WebAccessibilityObjectWrapper;
  typedef WebAccessibilityObjectWrapper AccessibilityObjectWrapper;
  typedef struct _NSRange NSRange;
  typedef const struct __AXTextMarker* AXTextMarkerRef;
  typedef const struct __AXTextMarkerRange* AXTextMarkerRangeRef;
  #elif USE(ATSPI)
  typedef WebCore::AccessibilityObjectAtspi AccessibilityObjectWrapper; <<<<<<<<  Missing definition of WebCore::AccessibilityObjectAtspi
  #elif USE(ATK)
  typedef struct _WebKitAccessible WebKitAccessible;
  typedef struct _WebKitAccessible AccessibilityObjectWrapper;
  #else
  class AccessibilityObjectWrapper;
  #endif

The patch uploaded in this sets TRUE USE_ATK or USE_ATSPI as mutually exclusive  when ENABLE_ACCESSIBILITY=ON and forces both to FALSE if case of ENABLE_ACCESSIBILITY=OFF:


-if (ENABLE_ACCESSIBILITY AND NOT USE_ATSPI)
-    SET_AND_EXPOSE_TO_BUILD(USE_ATK TRUE)
+if (ENABLE_ACCESSIBILITY)
+    if (USE_ATSPI)
+        SET_AND_EXPOSE_TO_BUILD(USE_ATK FALSE)
+    else ()
+        SET_AND_EXPOSE_TO_BUILD(USE_ATK TRUE)
+    endif ()
+else ()
+    SET_AND_EXPOSE_TO_BUILD(USE_ATK FALSE)
+    SET_AND_EXPOSE_TO_BUILD(USE_ATSPI FALSE)


This simplifies the checks in the code since from now on a simple "#if USE(ATSPI)"  is equivalent to a "#if ENABLE(ACCESSIBILITY) && USE(ATSPI)"

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220202/79d9e877/attachment-0001.htm>


More information about the webkit-unassigned mailing list