Title: [261644] trunk/Source/WebCore
Revision
261644
Author
[email protected]
Date
2020-05-13 13:44:03 -0700 (Wed, 13 May 2020)

Log Message

Implementation of AXIsolatedObject::hasBoldFont and hasItalicFont.
https://bugs.webkit.org/show_bug.cgi?id=211858

Reviewed by Chris Fleizach.

Added hasBoldFont and hasItalicFont to the cached properties map.

* accessibility/isolatedtree/AXIsolatedObject.cpp:
(WebCore::AXIsolatedObject::initializeAttributeData): Added properties to cache.
(WebCore::AXIsolatedObject::hasBoldFont const): Deleted. Inlined in header.
(WebCore::AXIsolatedObject::hasItalicFont const): Deleted. Inlined in header.
* accessibility/isolatedtree/AXIsolatedObject.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (261643 => 261644)


--- trunk/Source/WebCore/ChangeLog	2020-05-13 20:40:29 UTC (rev 261643)
+++ trunk/Source/WebCore/ChangeLog	2020-05-13 20:44:03 UTC (rev 261644)
@@ -1,3 +1,18 @@
+2020-05-13  Andres Gonzalez  <[email protected]>
+
+        Implementation of AXIsolatedObject::hasBoldFont and hasItalicFont.
+        https://bugs.webkit.org/show_bug.cgi?id=211858
+
+        Reviewed by Chris Fleizach.
+
+        Added hasBoldFont and hasItalicFont to the cached properties map.
+
+        * accessibility/isolatedtree/AXIsolatedObject.cpp:
+        (WebCore::AXIsolatedObject::initializeAttributeData): Added properties to cache.
+        (WebCore::AXIsolatedObject::hasBoldFont const): Deleted. Inlined in header.
+        (WebCore::AXIsolatedObject::hasItalicFont const): Deleted. Inlined in header.
+        * accessibility/isolatedtree/AXIsolatedObject.h:
+
 2020-05-13  Tim Horton  <[email protected]>
 
         Add SPI for reverting to touch events for iPad trackpad interactions

Modified: trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp (261643 => 261644)


--- trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp	2020-05-13 20:40:29 UTC (rev 261643)
+++ trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp	2020-05-13 20:44:03 UTC (rev 261644)
@@ -218,6 +218,8 @@
     setProperty(AXPropertyName::LiveRegionAtomic, object.liveRegionAtomic());
     setProperty(AXPropertyName::Path, object.elementPath());
     setProperty(AXPropertyName::HasHighlighting, object.hasHighlighting());
+    setProperty(AXPropertyName::HasBoldFont, object.hasBoldFont());
+    setProperty(AXPropertyName::HasItalicFont, object.hasItalicFont());
     setProperty(AXPropertyName::IsKeyboardFocusable, object.isKeyboardFocusable());
     
     if (object.isTable()) {
@@ -1184,18 +1186,6 @@
     return false;
 }
 
-bool AXIsolatedObject::hasBoldFont() const
-{
-    ASSERT_NOT_REACHED();
-    return false;
-}
-
-bool AXIsolatedObject::hasItalicFont() const
-{
-    ASSERT_NOT_REACHED();
-    return false;
-}
-
 bool AXIsolatedObject::hasMisspelling() const
 {
     ASSERT_NOT_REACHED();

Modified: trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h (261643 => 261644)


--- trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h	2020-05-13 20:40:29 UTC (rev 261643)
+++ trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h	2020-05-13 20:44:03 UTC (rev 261644)
@@ -147,8 +147,10 @@
         FocusableAncestor,
         HasARIAValueNow,
         HasApplePDFAnnotationAttribute,
+        HasBoldFont,
         HasChildren,
         HasHighlighting,
+        HasItalicFont,
         HasPopup,
         HeaderContainer,
         HeadingLevel,
@@ -758,8 +760,8 @@
     bool isVisible() const override;
     bool isCollapsed() const override;
     bool isSelectedOptionActive() const override;
-    bool hasBoldFont() const override;
-    bool hasItalicFont() const override;
+    bool hasBoldFont() const override { return boolAttributeValue(AXPropertyName::HasBoldFont); }
+    bool hasItalicFont() const override { return boolAttributeValue(AXPropertyName::HasItalicFont); }
     bool hasMisspelling() const override;
     bool hasPlainText() const override;
     bool hasSameFont(RenderObject*) const override;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to