Modified: trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp (261486 => 261487)
--- trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp 2020-05-11 19:05:00 UTC (rev 261486)
+++ trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp 2020-05-11 19:37:14 UTC (rev 261487)
@@ -216,7 +216,10 @@
setProperty(AXPropertyName::LiveRegionStatus, object.liveRegionStatus());
setProperty(AXPropertyName::LiveRegionRelevant, object.liveRegionRelevant());
setProperty(AXPropertyName::LiveRegionAtomic, object.liveRegionAtomic());
-
+ setProperty(AXPropertyName::Path, object.elementPath());
+ setProperty(AXPropertyName::HasHighlighting, object.hasHighlighting());
+ setProperty(AXPropertyName::IsKeyboardFocusable, object.isKeyboardFocusable());
+
if (object.isTable()) {
setProperty(AXPropertyName::IsTable, true);
setProperty(AXPropertyName::IsExposable, object.isExposable());
@@ -786,6 +789,15 @@
);
}
+Path AXIsolatedObject::pathAttributeValue(AXPropertyName propertyName) const
+{
+ auto value = m_attributeMap.get(propertyName);
+ return WTF::switchOn(value,
+ [] (Path& typedValue) { return typedValue; },
+ [] (auto&) { return Path(); }
+ );
+}
+
Color AXIsolatedObject::colorAttributeValue(AXPropertyName propertyName) const
{
auto value = m_attributeMap.get(propertyName);
@@ -1106,12 +1118,6 @@
return false;
}
-bool AXIsolatedObject::isBlockquote() const
-{
- ASSERT_NOT_REACHED();
- return false;
-}
-
bool AXIsolatedObject::isFigureElement() const
{
ASSERT_NOT_REACHED();
@@ -1118,12 +1124,6 @@
return false;
}
-bool AXIsolatedObject::isKeyboardFocusable() const
-{
- ASSERT_NOT_REACHED();
- return false;
-}
-
bool AXIsolatedObject::isHovered() const
{
ASSERT_NOT_REACHED();
@@ -1232,12 +1232,6 @@
return false;
}
-bool AXIsolatedObject::hasHighlighting() const
-{
- ASSERT_NOT_REACHED();
- return false;
-}
-
Element* AXIsolatedObject::element() const
{
ASSERT_NOT_REACHED();
@@ -1544,12 +1538,6 @@
return nullptr;
}
-Path AXIsolatedObject::elementPath() const
-{
- ASSERT_NOT_REACHED();
- return Path();
-}
-
TextIteratorBehavior AXIsolatedObject::textIteratorBehaviorForTextRange() const
{
ASSERT_NOT_REACHED();
Modified: trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h (261486 => 261487)
--- trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h 2020-05-11 19:05:00 UTC (rev 261486)
+++ trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h 2020-05-11 19:37:14 UTC (rev 261487)
@@ -148,6 +148,7 @@
HasARIAValueNow,
HasApplePDFAnnotationAttribute,
HasChildren,
+ HasHighlighting,
HasPopup,
HeaderContainer,
HeadingLevel,
@@ -187,6 +188,7 @@
IsInsideLiveRegion,
IsHeading,
IsHovered,
+ IsKeyboardFocusable,
IsLandmark,
IsLink,
IsLinked,
@@ -276,6 +278,7 @@
MaxValueForRange,
MinValueForRange,
Orientation,
+ Path,
PlaceholderValue,
PressedIsPresent,
PopupValue,
@@ -338,7 +341,7 @@
AccessibilityTextSource textSource;
};
- using AttributeValueVariant = Variant<std::nullptr_t, String, bool, int, unsigned, double, float, uint64_t, Color, URL, LayoutRect, FloatRect, AXID, IntPoint, OptionSet<SpeakAs>, std::pair<unsigned, unsigned>, Vector<AccessibilityIsolatedTreeText>, Vector<AXID>, Vector<AccessibilityIsolatedTreeMathMultiscriptPair>, Vector<String>>;
+ using AttributeValueVariant = Variant<std::nullptr_t, String, bool, int, unsigned, double, float, uint64_t, Color, URL, LayoutRect, FloatRect, AXID, IntPoint, OptionSet<SpeakAs>, std::pair<unsigned, unsigned>, Vector<AccessibilityIsolatedTreeText>, Vector<AXID>, Vector<AccessibilityIsolatedTreeMathMultiscriptPair>, Vector<String>, Path>;
void setProperty(AXPropertyName, AttributeValueVariant&&, bool shouldRemove = false);
void setObjectProperty(AXPropertyName, AXCoreObject*);
void setObjectVectorProperty(AXPropertyName, const AccessibilityChildrenVector&);
@@ -355,6 +358,7 @@
Color colorAttributeValue(AXPropertyName) const;
URL urlAttributeValue(AXPropertyName) const;
uint64_t uint64AttributeValue(AXPropertyName) const;
+ Path pathAttributeValue(AXPropertyName) const;
template<typename T> T rectAttributeValue(AXPropertyName) const;
template<typename T> Vector<T> vectorAttributeValue(AXPropertyName) const;
template<typename T> OptionSet<T> optionSetAttributeValue(AXPropertyName) const;
@@ -390,7 +394,8 @@
bool isUnorderedList() const override { return boolAttributeValue(AXPropertyName::IsUnorderedList); }
bool isOrderedList() const override { return boolAttributeValue(AXPropertyName::IsOrderedList); }
bool isDescriptionList() const override { return boolAttributeValue(AXPropertyName::IsDescriptionList); }
-
+ bool isKeyboardFocusable() const override { return boolAttributeValue(AXPropertyName::IsKeyboardFocusable); }
+
// Table support.
bool isTable() const override { return boolAttributeValue(AXPropertyName::IsTable); }
bool isExposable() const override { return boolAttributeValue(AXPropertyName::IsExposable); }
@@ -741,9 +746,7 @@
bool isMediaObject() const override;
bool isARIATextControl() const override;
bool isNonNativeTextControl() const override;
- bool isBlockquote() const override;
bool isFigureElement() const override;
- bool isKeyboardFocusable() const override;
bool isHovered() const override;
bool isIndeterminate() const override;
bool isLoaded() const override { return boolAttributeValue(AXPropertyName::IsLoaded); }
@@ -763,7 +766,7 @@
bool hasSameFontColor(RenderObject*) const override;
bool hasSameStyle(RenderObject*) const override;
bool hasUnderline() const override;
- bool hasHighlighting() const override;
+ bool hasHighlighting() const override { return boolAttributeValue(AXPropertyName::HasHighlighting); }
Element* element() const override;
Node* node() const override;
RenderObject* renderer() const override;
@@ -818,7 +821,7 @@
AXObjectCache* axObjectCache() const override;
Element* anchorElement() const override;
Element* actionElement() const override;
- Path elementPath() const override;
+ Path elementPath() const override { return pathAttributeValue(AXPropertyName::Path); };
bool supportsPath() const override { return boolAttributeValue(AXPropertyName::SupportsPath); }
TextIteratorBehavior textIteratorBehaviorForTextRange() const override;
Widget* widget() const override;