AXIsolatedObject implementation of the title method.
authorandresg_22@apple.com <andresg_22@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Mar 2020 17:51:59 +0000 (17:51 +0000)
committerandresg_22@apple.com <andresg_22@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Mar 2020 17:51:59 +0000 (17:51 +0000)
https://bugs.webkit.org/show_bug.cgi?id=209291

Reviewed by Chris Fleizach.

- Implements AXIsolatedObgject::title.
- Modified implementation of AXIsolatedObject::titleAttributeValue to
use its appropriate key.

* accessibility/isolatedtree/AXIsolatedObject.cpp:
(WebCore::AXIsolatedObject::initializeAttributeData):
(WebCore::AXIsolatedObject::title const): Deleted.
* accessibility/isolatedtree/AXIsolatedObject.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@258712 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp
Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h

index 8913c09..ec2f0b5 100644 (file)
@@ -1,3 +1,19 @@
+2020-03-19  Andres Gonzalez  <andresg_22@apple.com>
+
+        AXIsolatedObject implementation of the title method.
+        https://bugs.webkit.org/show_bug.cgi?id=209291
+
+        Reviewed by Chris Fleizach.
+
+        - Implements AXIsolatedObgject::title.
+        - Modified implementation of AXIsolatedObject::titleAttributeValue to
+        use its appropriate key.
+
+        * accessibility/isolatedtree/AXIsolatedObject.cpp:
+        (WebCore::AXIsolatedObject::initializeAttributeData):
+        (WebCore::AXIsolatedObject::title const): Deleted.
+        * accessibility/isolatedtree/AXIsolatedObject.h:
+
 2020-03-19  Chris Fleizach  <cfleizach@apple.com>
 
         AX: VO and safari: can't press the play button
index 8d64eed..c6816a6 100644 (file)
@@ -128,8 +128,9 @@ void AXIsolatedObject::initializeAttributeData(AXCoreObject& object, bool isRoot
     setProperty(AXPropertyName::RolePlatformString, object.rolePlatformString().isolatedCopy());
     setProperty(AXPropertyName::RoleValue, static_cast<int>(object.roleValue()));
     setProperty(AXPropertyName::SpeechHint, object.speechHintAttributeValue().isolatedCopy());
-    setProperty(AXPropertyName::Title, object.titleAttributeValue().isolatedCopy());
     setProperty(AXPropertyName::SupportsDatetimeAttribute, object.supportsDatetimeAttribute());
+    setProperty(AXPropertyName::Title, object.title().isolatedCopy());
+    setProperty(AXPropertyName::TitleAttributeValue, object.titleAttributeValue().isolatedCopy());
     setProperty(AXPropertyName::DatetimeAttributeValue, object.datetimeAttributeValue());
     setProperty(AXPropertyName::CanSetFocusAttribute, object.canSetFocusAttribute());
     setProperty(AXPropertyName::CanSetTextRangeAttributes, object.canSetTextRangeAttributes());
@@ -1479,12 +1480,6 @@ String AXIsolatedObject::accessibilityDescription() const
     return String();
 }
 
-String AXIsolatedObject::title() const
-{
-    ASSERT_NOT_REACHED();
-    return String();
-}
-
 String AXIsolatedObject::helpText() const
 {
     ASSERT_NOT_REACHED();
index 77a22a2..ba638b5 100644 (file)
@@ -321,6 +321,7 @@ private:
         TagName,
         TextLength,
         Title,
+        TitleAttributeValue,
         TitleUIElement,
         URL,
         ValueAutofillButtonType,
@@ -582,7 +583,7 @@ private:
     String speechHintAttributeValue() const override { return stringAttributeValue(AXPropertyName::SpeechHint); }
     String descriptionAttributeValue() const override { return stringAttributeValue(AXPropertyName::Description); }
     String helpTextAttributeValue() const override { return stringAttributeValue(AXPropertyName::HelpText); }
-    String titleAttributeValue() const override { return stringAttributeValue(AXPropertyName::Title); }
+    String titleAttributeValue() const override { return stringAttributeValue(AXPropertyName::TitleAttributeValue); }
 #if PLATFORM(COCOA) && !PLATFORM(IOS_FAMILY)
     bool caretBrowsingEnabled() const override { return boolAttributeValue(AXPropertyName::CaretBrowsingEnabled); }
 #endif
@@ -807,7 +808,7 @@ private:
     void setAccessibleName(const AtomString&) override;
     bool hasAttributesRequiredForInclusion() const override;
     String accessibilityDescription() const override;
-    String title() const override;
+    String title() const override { return stringAttributeValue(AXPropertyName::Title); }
     String helpText() const override;
     bool isARIAStaticText() const override;
     String text() const override;