[WPE][GTK] Bump minimum versions of GLib, GTK, libsoup, ATK, GStreamer, and Cairo
[WebKit-https.git] / Source / WebCore / accessibility / atk / WebKitAccessible.cpp
index 63b0382..f47efc5 100644 (file)
@@ -532,14 +532,14 @@ static AtkAttributeSet* webkitAccessibleGetAttributes(AtkObject* object)
     if (auto liveContainer = coreObject->liveRegionAncestor(false)) {
         String liveStatus = liveContainer->liveRegionStatus();
         String relevant = liveContainer->liveRegionRelevant();
-        bool isAtomic = liveContainer->liveRegionAtomic();
+        bool isAtom = liveContainer->liveRegionAtomic();
         String liveRole = roleString.isEmpty() ? computedRoleString : roleString;
 
         // According to the Core AAM, we need to expose the above properties with "container-" prefixed
         // object attributes regardless of whether the container is this object, or an ancestor of it.
         attributeSet = addToAtkAttributeSet(attributeSet, "container-live", liveStatus.utf8().data());
         attributeSet = addToAtkAttributeSet(attributeSet, "container-relevant", relevant.utf8().data());
-        if (isAtomic)
+        if (isAtom)
             attributeSet = addToAtkAttributeSet(attributeSet, "container-atomic", "true");
         if (!liveRole.isEmpty())
             attributeSet = addToAtkAttributeSet(attributeSet, "container-live-role", liveRole.utf8().data());
@@ -549,9 +549,9 @@ static AtkAttributeSet* webkitAccessibleGetAttributes(AtkObject* object)
         if (liveContainer == coreObject) {
             attributeSet = addToAtkAttributeSet(attributeSet, "live", liveStatus.utf8().data());
             attributeSet = addToAtkAttributeSet(attributeSet, "relevant", relevant.utf8().data());
-            if (isAtomic)
+            if (isAtom)
                 attributeSet = addToAtkAttributeSet(attributeSet, "atomic", "true");
-        } else if (!isAtomic && coreObject->liveRegionAtomic())
+        } else if (!isAtom && coreObject->liveRegionAtomic())
             attributeSet = addToAtkAttributeSet(attributeSet, "atomic", "true");
     }
 
@@ -566,7 +566,7 @@ static AtkAttributeSet* webkitAccessibleGetAttributes(AtkObject* object)
         attributeSet = addToAtkAttributeSet(attributeSet, "grabbed", "false");
 
     // The Core AAM states the author-provided value should be exposed as-is.
-    const AtomicString& keyShortcuts = coreObject->keyShortcutsValue();
+    const AtomString& keyShortcuts = coreObject->keyShortcutsValue();
     if (!keyShortcuts.isEmpty())
         attributeSet = addToAtkAttributeSet(attributeSet, "keyshortcuts", keyShortcuts.string().utf8().data());
 
@@ -586,14 +586,9 @@ static AtkRole atkRole(AccessibilityObject* coreObject)
     case AccessibilityRole::Unknown:
         return ATK_ROLE_UNKNOWN;
     case AccessibilityRole::Audio:
-#if ATK_CHECK_VERSION(2, 11, 3)
         return ATK_ROLE_AUDIO;
-#endif
     case AccessibilityRole::Video:
-#if ATK_CHECK_VERSION(2, 11, 3)
         return ATK_ROLE_VIDEO;
-#endif
-        return ATK_ROLE_EMBEDDED;
     case AccessibilityRole::Button:
         return ATK_ROLE_PUSH_BUTTON;
     case AccessibilityRole::Switch:
@@ -613,11 +608,7 @@ static AtkRole atkRole(AccessibilityObject* coreObject)
     case AccessibilityRole::SearchField:
         return ATK_ROLE_ENTRY;
     case AccessibilityRole::StaticText:
-#if ATK_CHECK_VERSION(2, 15, 2)
         return ATK_ROLE_STATIC;
-#else
-        return ATK_ROLE_TEXT;
-#endif
     case AccessibilityRole::Outline:
     case AccessibilityRole::Tree:
         return ATK_ROLE_TREE;
@@ -658,8 +649,8 @@ static AtkRole atkRole(AccessibilityObject* coreObject)
         return ATK_ROLE_SPLIT_PANE;
     case AccessibilityRole::Splitter:
         return ATK_ROLE_SEPARATOR;
-    case AccessibilityRole::ColorWell:
 #if PLATFORM(GTK)
+    case AccessibilityRole::ColorWell:
         // ATK_ROLE_COLOR_CHOOSER is defined as a dialog (i.e. it's what appears when you push the button).
         return ATK_ROLE_PUSH_BUTTON;
 #endif
@@ -706,9 +697,7 @@ static AtkRole atkRole(AccessibilityObject* coreObject)
     case AccessibilityRole::ListMarker:
         return ATK_ROLE_TEXT;
     case AccessibilityRole::DocumentArticle:
-#if ATK_CHECK_VERSION(2, 11, 3)
         return ATK_ROLE_ARTICLE;
-#endif
     case AccessibilityRole::Document:
     case AccessibilityRole::GraphicsDocument:
         return ATK_ROLE_DOCUMENT_FRAME;
@@ -729,11 +718,9 @@ static AtkRole atkRole(AccessibilityObject* coreObject)
     case AccessibilityRole::Legend:
         return ATK_ROLE_LABEL;
     case AccessibilityRole::Blockquote:
-#if ATK_CHECK_VERSION(2, 11, 3)
         return ATK_ROLE_BLOCK_QUOTE;
-#endif
-    case AccessibilityRole::Footnote:
 #if ATK_CHECK_VERSION(2, 25, 2)
+    case AccessibilityRole::Footnote:
         return ATK_ROLE_FOOTNOTE;
 #endif
     case AccessibilityRole::ApplicationTextGroup:
@@ -745,10 +732,8 @@ static AtkRole atkRole(AccessibilityObject* coreObject)
     case AccessibilityRole::Footer:
         return ATK_ROLE_FOOTER;
     case AccessibilityRole::Form:
-#if ATK_CHECK_VERSION(2, 11, 3)
         if (coreObject->ariaRoleAttribute() != AccessibilityRole::Unknown)
             return ATK_ROLE_LANDMARK;
-#endif
         return ATK_ROLE_FORM;
     case AccessibilityRole::Canvas:
         return ATK_ROLE_CANVAS;
@@ -764,7 +749,6 @@ static AtkRole atkRole(AccessibilityObject* coreObject)
         return ATK_ROLE_DOCUMENT_WEB;
     case AccessibilityRole::WebApplication:
         return ATK_ROLE_EMBEDDED;
-#if ATK_CHECK_VERSION(2, 11, 3)
     case AccessibilityRole::ApplicationLog:
         return ATK_ROLE_LOG;
     case AccessibilityRole::ApplicationMarquee:
@@ -786,7 +770,6 @@ static AtkRole atkRole(AccessibilityObject* coreObject)
             return ATK_ROLE_TABLE_CELL;
         if (coreObject->isMathSubscriptSuperscript() || coreObject->isMathMultiscript())
             return ATK_ROLE_SECTION;
-#if ATK_CHECK_VERSION(2, 15, 4)
         if (coreObject->isMathFraction())
             return ATK_ROLE_MATH_FRACTION;
         if (coreObject->isMathSquareRoot() || coreObject->isMathRoot())
@@ -797,11 +780,8 @@ static AtkRole atkRole(AccessibilityObject* coreObject)
         if (coreObject->isMathScriptObject(AccessibilityMathScriptObjectType::Superscript)
             || coreObject->isMathMultiscriptObject(AccessibilityMathMultiscriptObjectType::PreSuperscript) || coreObject->isMathMultiscriptObject(AccessibilityMathMultiscriptObjectType::PostSuperscript))
             return ATK_ROLE_SUPERSCRIPT;
-#endif
-#if ATK_CHECK_VERSION(2, 15, 2)
         if (coreObject->isMathToken())
             return ATK_ROLE_STATIC;
-#endif
         return ATK_ROLE_UNKNOWN;
     case AccessibilityRole::LandmarkBanner:
     case AccessibilityRole::LandmarkComplementary:
@@ -812,8 +792,6 @@ static AtkRole atkRole(AccessibilityObject* coreObject)
     case AccessibilityRole::LandmarkRegion:
     case AccessibilityRole::LandmarkSearch:
         return ATK_ROLE_LANDMARK;
-#endif
-#if ATK_CHECK_VERSION(2, 11, 4)
     case AccessibilityRole::DescriptionList:
         return ATK_ROLE_DESCRIPTION_LIST;
     case AccessibilityRole::Term:
@@ -821,21 +799,16 @@ static AtkRole atkRole(AccessibilityObject* coreObject)
         return ATK_ROLE_DESCRIPTION_TERM;
     case AccessibilityRole::DescriptionListDetail:
         return ATK_ROLE_DESCRIPTION_VALUE;
-#endif
     case AccessibilityRole::Inline:
-#if ATK_CHECK_VERSION(2, 15, 4)
         if (coreObject->isSubscriptStyleGroup())
             return ATK_ROLE_SUBSCRIPT;
         if (coreObject->isSuperscriptStyleGroup())
             return ATK_ROLE_SUPERSCRIPT;
-#endif
-#if ATK_CHECK_VERSION(2, 15, 2)
         return ATK_ROLE_STATIC;
     case AccessibilityRole::SVGTextPath:
     case AccessibilityRole::SVGTSpan:
     case AccessibilityRole::Time:
         return ATK_ROLE_STATIC;
-#endif
     default:
         return ATK_ROLE_UNKNOWN;
     }
@@ -898,10 +871,8 @@ static void setAtkStateSetFromCoreObject(AccessibilityObject* coreObject, AtkSta
     if (coreObject->isBusy())
         atk_state_set_add_state(stateSet, ATK_STATE_BUSY);
 
-#if ATK_CHECK_VERSION(2,11,2)
     if (coreObject->supportsChecked() && coreObject->canSetValueAttribute())
         atk_state_set_add_state(stateSet, ATK_STATE_CHECKABLE);
-#endif
 
     if (coreObject->isChecked())
         atk_state_set_add_state(stateSet, ATK_STATE_CHECKED);
@@ -963,10 +934,8 @@ static void setAtkStateSetFromCoreObject(AccessibilityObject* coreObject, AtkSta
     if (coreObject->isPressed())
         atk_state_set_add_state(stateSet, ATK_STATE_PRESSED);
 
-#if ATK_CHECK_VERSION(2,15,3)
     if (!coreObject->canSetValueAttribute() && (coreObject->supportsReadOnly()))
         atk_state_set_add_state(stateSet, ATK_STATE_READ_ONLY);
-#endif
 
     if (coreObject->isRequired())
         atk_state_set_add_state(stateSet, ATK_STATE_REQUIRED);
@@ -1112,9 +1081,7 @@ static const GInterfaceInfo atkInterfacesInitFunctions[] = {
     {reinterpret_cast<GInterfaceInitFunc>(reinterpret_cast<GCallback>(webkitAccessibleComponentInterfaceInit)), nullptr, nullptr},
     {reinterpret_cast<GInterfaceInitFunc>(reinterpret_cast<GCallback>(webkitAccessibleImageInterfaceInit)), nullptr, nullptr},
     {reinterpret_cast<GInterfaceInitFunc>(reinterpret_cast<GCallback>(webkitAccessibleTableInterfaceInit)), nullptr, nullptr},
-#if ATK_CHECK_VERSION(2,11,90)
     {reinterpret_cast<GInterfaceInitFunc>(reinterpret_cast<GCallback>(webkitAccessibleTableCellInterfaceInit)), nullptr, nullptr},
-#endif
     {reinterpret_cast<GInterfaceInitFunc>(reinterpret_cast<GCallback>(webkitAccessibleHypertextInterfaceInit)), nullptr, nullptr},
     {reinterpret_cast<GInterfaceInitFunc>(reinterpret_cast<GCallback>(webkitAccessibleHyperlinkImplInterfaceInit)), nullptr, nullptr},
     {reinterpret_cast<GInterfaceInitFunc>(reinterpret_cast<GCallback>(webkitAccessibleDocumentInterfaceInit)), nullptr, nullptr},
@@ -1129,9 +1096,7 @@ enum WAIType {
     WAIComponent,
     WAIImage,
     WAITable,
-#if ATK_CHECK_VERSION(2,11,90)
     WAITableCell,
-#endif
     WAIHypertext,
     WAIHyperlink,
     WAIDocument,
@@ -1155,10 +1120,8 @@ static GType atkInterfaceTypeFromWAIType(WAIType type)
         return ATK_TYPE_IMAGE;
     case WAITable:
         return ATK_TYPE_TABLE;
-#if ATK_CHECK_VERSION(2,11,90)
     case WAITableCell:
         return ATK_TYPE_TABLE_CELL;
-#endif
     case WAIHypertext:
         return ATK_TYPE_HYPERTEXT;
     case WAIHyperlink:
@@ -1249,10 +1212,8 @@ static guint16 interfaceMaskFromObject(AccessibilityObject* coreObject)
     if (coreObject->isTable())
         interfaceMask |= 1 << WAITable;
 
-#if ATK_CHECK_VERSION(2,11,90)
     if (role == AccessibilityRole::Cell || role == AccessibilityRole::GridCell || role == AccessibilityRole::ColumnHeader || role == AccessibilityRole::RowHeader)
         interfaceMask |= 1 << WAITableCell;
-#endif
 
     // Document
     if (role == AccessibilityRole::WebArea)