Title: [288953] trunk/Source/WebCore
Revision
288953
Author
[email protected]
Date
2022-02-02 08:43:14 -0800 (Wed, 02 Feb 2022)

Log Message

AX: Display startObject and anchorObject objectID when logging AccessibilitySearchCriteria from AXLogger
https://bugs.webkit.org/show_bug.cgi?id=235997

Reviewed by Chris Fleizach.

With this patch, logging AccessibilitySearchCriteria will look like:

(SearchCriteria 0x2a7d13a80
  (anchorObject 0x315ba9980, ID 492)
  (startObject 0x0, ID 0)
  ...truncated...

This will help us correlate the IDs of anchorObject and startObject with other
log statements.

* accessibility/AXLogger.cpp:
(WebCore::operator<<):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (288952 => 288953)


--- trunk/Source/WebCore/ChangeLog	2022-02-02 15:37:47 UTC (rev 288952)
+++ trunk/Source/WebCore/ChangeLog	2022-02-02 16:43:14 UTC (rev 288953)
@@ -1,3 +1,23 @@
+2022-02-02  Tyler Wilcock  <[email protected]>
+
+        AX: Display startObject and anchorObject objectID when logging AccessibilitySearchCriteria from AXLogger
+        https://bugs.webkit.org/show_bug.cgi?id=235997
+
+        Reviewed by Chris Fleizach.
+
+        With this patch, logging AccessibilitySearchCriteria will look like:
+
+        (SearchCriteria 0x2a7d13a80
+          (anchorObject 0x315ba9980, ID 492)
+          (startObject 0x0, ID 0)
+          ...truncated...
+
+        This will help us correlate the IDs of anchorObject and startObject with other
+        log statements.
+
+        * accessibility/AXLogger.cpp:
+        (WebCore::operator<<):
+
 2022-02-02  Youenn Fablet  <[email protected]>
 
         LibWebRTCCodecs should not need to create IOSurfaces

Modified: trunk/Source/WebCore/accessibility/AXLogger.cpp (288952 => 288953)


--- trunk/Source/WebCore/accessibility/AXLogger.cpp	2022-02-02 15:37:47 UTC (rev 288952)
+++ trunk/Source/WebCore/accessibility/AXLogger.cpp	2022-02-02 16:43:14 UTC (rev 288953)
@@ -328,9 +328,15 @@
 TextStream& operator<<(TextStream& stream, const AccessibilitySearchCriteria& criteria)
 {
     TextStream::GroupScope groupScope(stream);
+    auto streamCriteriaObject = [&stream] (String objectLabel, auto* axObject) {
+        stream.startGroup();
+        stream << objectLabel << " " << axObject << ", ID " << (axObject ? axObject->objectID() : AXID());
+        stream.endGroup();
+    };
+
     stream << "SearchCriteria " << &criteria;
-    stream.dumpProperty("anchorObject", criteria.anchorObject);
-    stream.dumpProperty("startObject", criteria.startObject);
+    streamCriteriaObject("anchorObject", criteria.anchorObject);
+    streamCriteriaObject("startObject", criteria.startObject);
     stream.dumpProperty("searchDirection", criteria.searchDirection);
 
     stream.nextLine();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to