Title: [269859] trunk/Source/WebCore
Revision
269859
Author
[email protected]
Date
2020-11-16 10:12:17 -0800 (Mon, 16 Nov 2020)

Log Message

Add logging of AXCoreObject outerHTML to AXLogger.
https://bugs.webkit.org/show_bug.cgi?id=218958

Reviewed by Chris Fleizach.

No change in functionality, debugging code.

* accessibility/AXLogger.cpp:
(WebCore::operator<<):
- Added logging of the outerHTML of the corresponding Element for AXCoreObjects.
- Added logging of the platform wrapper address for AXCoreObjects.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (269858 => 269859)


--- trunk/Source/WebCore/ChangeLog	2020-11-16 18:08:07 UTC (rev 269858)
+++ trunk/Source/WebCore/ChangeLog	2020-11-16 18:12:17 UTC (rev 269859)
@@ -1,3 +1,17 @@
+2020-11-16  Andres Gonzalez  <[email protected]>
+
+        Add logging of AXCoreObject outerHTML to AXLogger.
+        https://bugs.webkit.org/show_bug.cgi?id=218958
+
+        Reviewed by Chris Fleizach.
+
+        No change in functionality, debugging code.
+
+        * accessibility/AXLogger.cpp:
+        (WebCore::operator<<):
+        - Added logging of the outerHTML of the corresponding Element for AXCoreObjects.
+        - Added logging of the platform wrapper address for AXCoreObjects.
+
 2020-11-16  Antti Koivisto  <[email protected]>
 
         [LFC][Integration] Remove isLastTextRunOnLine/isLastTextRun from run iterator

Modified: trunk/Source/WebCore/accessibility/AXLogger.cpp (269858 => 269859)


--- trunk/Source/WebCore/accessibility/AXLogger.cpp	2020-11-16 18:08:07 UTC (rev 269858)
+++ trunk/Source/WebCore/accessibility/AXLogger.cpp	2020-11-16 18:12:17 UTC (rev 269859)
@@ -264,10 +264,22 @@
     TextStream::GroupScope groupScope(stream);
     stream << "objectID " << object.objectID();
     stream.dumpProperty("identifierAttribute", object.identifierAttribute());
-    stream.dumpProperty("roleValue", object.roleValue());
+    auto role = object.roleValue();
+    stream.dumpProperty("roleValue", role);
+
+    auto* objectWithInterestingHTML = role == AccessibilityRole::Button ? // Add here other roles of interest.
+        &object : nullptr;
+    auto* parent = object.parentObject();
+    if (role == AccessibilityRole::StaticText && parent)
+        objectWithInterestingHTML = parent;
+    if (objectWithInterestingHTML) {
+        if (auto* element = objectWithInterestingHTML->element())
+            stream.dumpProperty("outerHTML", element->outerHTML());
+    }
+
     stream.dumpProperty("address", &object);
+    stream.dumpProperty("wrapper", object.wrapper());
 
-    auto* parent = object.parentObject();
     stream.dumpProperty("parentObject", parent ? parent->objectID() : 0);
 #if PLATFORM(COCOA)
     stream.dumpProperty("remoteParentObject", object.remoteParentObject());
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to