Changeset 269859 in webkit


Ignore:
Timestamp:
Nov 16, 2020 10:12:17 AM (3 years ago)
Author:
Andres Gonzalez
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.
Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r269852 r269859  
     12020-11-16  Andres Gonzalez  <andresg_22@apple.com>
     2
     3        Add logging of AXCoreObject outerHTML to AXLogger.
     4        https://bugs.webkit.org/show_bug.cgi?id=218958
     5
     6        Reviewed by Chris Fleizach.
     7
     8        No change in functionality, debugging code.
     9
     10        * accessibility/AXLogger.cpp:
     11        (WebCore::operator<<):
     12        - Added logging of the outerHTML of the corresponding Element for AXCoreObjects.
     13        - Added logging of the platform wrapper address for AXCoreObjects.
     14
    1152020-11-16  Antti Koivisto  <antti@apple.com>
    216
  • trunk/Source/WebCore/accessibility/AXLogger.cpp

    r267565 r269859  
    265265    stream << "objectID " << object.objectID();
    266266    stream.dumpProperty("identifierAttribute", object.identifierAttribute());
    267     stream.dumpProperty("roleValue", object.roleValue());
     267    auto role = object.roleValue();
     268    stream.dumpProperty("roleValue", role);
     269
     270    auto* objectWithInterestingHTML = role == AccessibilityRole::Button ? // Add here other roles of interest.
     271        &object : nullptr;
     272    auto* parent = object.parentObject();
     273    if (role == AccessibilityRole::StaticText && parent)
     274        objectWithInterestingHTML = parent;
     275    if (objectWithInterestingHTML) {
     276        if (auto* element = objectWithInterestingHTML->element())
     277            stream.dumpProperty("outerHTML", element->outerHTML());
     278    }
     279
    268280    stream.dumpProperty("address", &object);
    269 
    270     auto* parent = object.parentObject();
     281    stream.dumpProperty("wrapper", object.wrapper());
     282
    271283    stream.dumpProperty("parentObject", parent ? parent->objectID() : 0);
    272284#if PLATFORM(COCOA)
Note: See TracChangeset for help on using the changeset viewer.