Source/JavaScriptCore:
[WebKit-https.git] / Source / WebCore / accessibility / AccessibilityObject.h
index 47d5da7..f7fb413 100644 (file)
@@ -29,6 +29,7 @@
 
 #pragma once
 
+#include "AccessibilityObjectInterface.h"
 #include "FloatQuad.h"
 #include "HTMLTextFormControlElement.h"
 #include "LayoutRect.h"
@@ -89,157 +90,6 @@ class ScrollableArea;
 class ScrollView;
 class Widget;
 
-typedef unsigned AXID;
-
-enum class AccessibilityRole {
-    Annotation = 1,
-    Application,
-    ApplicationAlert,
-    ApplicationAlertDialog,
-    ApplicationDialog,
-    ApplicationGroup,
-    ApplicationLog,
-    ApplicationMarquee,
-    ApplicationStatus,
-    ApplicationTextGroup,
-    ApplicationTimer,
-    Audio,
-    Blockquote,
-    Browser,
-    BusyIndicator,
-    Button,
-    Canvas,
-    Caption,
-    Cell,
-    CheckBox,
-    ColorWell,
-    Column,
-    ColumnHeader,
-    ComboBox,
-    Definition,
-    DescriptionList,
-    DescriptionListTerm,
-    DescriptionListDetail,
-    Details,
-    Directory,
-    DisclosureTriangle,
-    Div,
-    Document,
-    DocumentArticle,
-    DocumentMath,
-    DocumentNote,
-    Drawer,
-    EditableText,
-    Feed,
-    Figure,
-    Footer,
-    Footnote,
-    Form,
-    GraphicsDocument,
-    GraphicsObject,
-    GraphicsSymbol,
-    Grid,
-    GridCell,
-    Group,
-    GrowArea,
-    Heading,
-    HelpTag,
-    HorizontalRule,
-    Ignored,
-    Inline,
-    Image,
-    ImageMap,
-    ImageMapLink,
-    Incrementor,
-    Label,
-    LandmarkBanner,
-    LandmarkComplementary,
-    LandmarkContentInfo,
-    LandmarkDocRegion,
-    LandmarkMain,
-    LandmarkNavigation,
-    LandmarkRegion,
-    LandmarkSearch,
-    Legend,
-    Link,
-    List,
-    ListBox,
-    ListBoxOption,
-    ListItem,
-    ListMarker,
-    Mark,
-    MathElement,
-    Matte,
-    Menu,
-    MenuBar,
-    MenuButton,
-    MenuItem,
-    MenuItemCheckbox,
-    MenuItemRadio,
-    MenuListPopup,
-    MenuListOption,
-    Outline,
-    Paragraph,
-    PopUpButton,
-    Pre,
-    Presentational,
-    ProgressIndicator,
-    RadioButton,
-    RadioGroup,
-    RowHeader,
-    Row,
-    RowGroup,
-    RubyBase,
-    RubyBlock,
-    RubyInline,
-    RubyRun,
-    RubyText,
-    Ruler,
-    RulerMarker,
-    ScrollArea,
-    ScrollBar,
-    SearchField,
-    Sheet,
-    Slider,
-    SliderThumb,
-    SpinButton,
-    SpinButtonPart,
-    SplitGroup,
-    Splitter,
-    StaticText,
-    Summary,
-    Switch,
-    SystemWide,
-    SVGRoot,
-    SVGText,
-    SVGTSpan,
-    SVGTextPath,
-    TabGroup,
-    TabList,
-    TabPanel,
-    Tab,
-    Table,
-    TableHeaderContainer,
-    TextArea,
-    TextGroup,
-    Term,
-    Time,
-    Tree,
-    TreeGrid,
-    TreeItem,
-    TextField,
-    ToggleButton,
-    Toolbar,
-    Unknown,
-    UserInterfaceTooltip,
-    ValueIndicator,
-    Video,
-    WebApplication,
-    WebArea,
-    WebCoreLink,
-    Window,
-};
-
 enum class AccessibilityTextSource {
     Alternative,
     Children,
@@ -491,7 +341,7 @@ enum class AccessibilityCurrentState { False, True, Page, Step, Location, Date,
     
 bool nodeHasPresentationRole(Node*);
     
-class AccessibilityObject : public RefCounted<AccessibilityObject> {
+class AccessibilityObject : public RefCounted<AccessibilityObject>, public AccessibilityObjectInterface {
 protected:
     AccessibilityObject() = default;
     
@@ -731,7 +581,7 @@ public:
     virtual bool supportsARIADragging() const { return false; }
     virtual bool isARIAGrabbed() { return false; }
     virtual void setARIAGrabbed(bool) { }
-    virtual void determineARIADropEffects(Vector<String>&) { }
+    virtual Vector<String> determineARIADropEffects() { return { }; }
     
     // Called on the root AX object to return the deepest available element.
     virtual AccessibilityObject* accessibilityHitTest(const IntPoint&) const { return nullptr; }
@@ -1120,7 +970,7 @@ public:
     AccessibilityObjectInclusion accessibilityPlatformIncludesObject() const { return AccessibilityObjectInclusion::DefaultBehavior; }
 #endif
 
-#if PLATFORM(IOS)
+#if PLATFORM(IOS_FAMILY)
     int accessibilityPasswordFieldLength();
     bool hasTouchEventListener() const;
     bool isInputTypePopupButton() const;
@@ -1136,7 +986,7 @@ public:
     void setPreventKeyboardDOMEventDispatch(bool);
 #endif
     
-#if PLATFORM(COCOA) && !PLATFORM(IOS)
+#if PLATFORM(COCOA) && !PLATFORM(IOS_FAMILY)
     bool caretBrowsingEnabled() const;
     void setCaretBrowsingEnabled(bool);
 #endif
@@ -1159,7 +1009,10 @@ protected:
     AccessibilityIsIgnoredFromParentData m_isIgnoredFromParentData { };
     bool m_childrenDirty { false };
     bool m_subtreeDirty { false };
-
+#if ENABLE(ACCESSIBILITY_ISOLATED_TREE)
+    bool m_isolatedTreeNodeInitialized { false };
+#endif
+    
     void setIsIgnoredFromParentData(AccessibilityIsIgnoredFromParentData& data) { m_isIgnoredFromParentData = data; }
 
     virtual bool computeAccessibilityIsIgnored() const { return true; }