Title: [292271] trunk/Tools
- Revision
- 292271
- Author
- [email protected]
- Date
- 2022-04-02 14:52:58 -0700 (Sat, 02 Apr 2022)
Log Message
Add to MiniBrowser the ability to log a textual representation of the AX trees for the current page.
https://bugs.webkit.org/show_bug.cgi?id=238566
<rdar://problem/91059308>
Reviewed by Chris Fleizach and Simon Fraser.
MiniBrowser can now log a textual representation of the AX trees via
Debug > Log Accessibility Trees menu item, or pressing the keystroke
Cmd Opt A.
* MiniBrowser/mac/MainMenu.xib:
* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController logAccessibilityTrees:]):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (292270 => 292271)
--- trunk/Tools/ChangeLog 2022-04-02 21:03:18 UTC (rev 292270)
+++ trunk/Tools/ChangeLog 2022-04-02 21:52:58 UTC (rev 292271)
@@ -1,3 +1,19 @@
+2022-04-02 Andres Gonzalez <[email protected]>
+
+ Add to MiniBrowser the ability to log a textual representation of the AX trees for the current page.
+ https://bugs.webkit.org/show_bug.cgi?id=238566
+ <rdar://problem/91059308>
+
+ Reviewed by Chris Fleizach and Simon Fraser.
+
+ MiniBrowser can now log a textual representation of the AX trees via
+ Debug > Log Accessibility Trees menu item, or pressing the keystroke
+ Cmd Opt A.
+
+ * MiniBrowser/mac/MainMenu.xib:
+ * MiniBrowser/mac/WK2BrowserWindowController.m:
+ (-[WK2BrowserWindowController logAccessibilityTrees:]):
+
2022-04-02 Adrian Perez de Castro <[email protected]>
[GTK] Replace gtk-doc with gi-docgen
Modified: trunk/Tools/MiniBrowser/mac/MainMenu.xib (292270 => 292271)
--- trunk/Tools/MiniBrowser/mac/MainMenu.xib 2022-04-02 21:03:18 UTC (rev 292270)
+++ trunk/Tools/MiniBrowser/mac/MainMenu.xib 2022-04-02 21:52:58 UTC (rev 292271)
@@ -585,7 +585,7 @@
<modifierMask key="keyEquivalentModifierMask"/>
</menuItem>
<menuItem id="fYp-sh-nqB">
- <string key="title"> Default</string>
+ <string key="title"> Default</string>
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="makeBaseWritingDirectionNatural:" target="-1" id="z9r-Q0-zcU"/>
@@ -592,7 +592,7 @@
</connections>
</menuItem>
<menuItem id="7Kh-vB-DZW">
- <string key="title"> Left to Right</string>
+ <string key="title"> Left to Right</string>
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="makeBaseWritingDirectionLeftToRight:" target="-1" id="By6-Xc-sQg"/>
@@ -599,7 +599,7 @@
</connections>
</menuItem>
<menuItem id="Efq-zm-Iex">
- <string key="title"> Right to Left</string>
+ <string key="title"> Right to Left</string>
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="makeBaseWritingDirectionRightToLeft:" target="-1" id="J4w-YN-dtS"/>
@@ -610,7 +610,7 @@
<modifierMask key="keyEquivalentModifierMask"/>
</menuItem>
<menuItem id="m9Q-d8-VVx">
- <string key="title"> Default</string>
+ <string key="title"> Default</string>
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="makeTextWritingDirectionNatural:" target="-1" id="Ilo-c7-jCj"/>
@@ -617,7 +617,7 @@
</connections>
</menuItem>
<menuItem id="5Ym-OR-TV9">
- <string key="title"> Left to Right</string>
+ <string key="title"> Left to Right</string>
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="makeTextWritingDirectionLeftToRight:" target="-1" id="9ca-bt-cYl"/>
@@ -624,7 +624,7 @@
</connections>
</menuItem>
<menuItem id="blA-MU-vkf">
- <string key="title"> Right to Left</string>
+ <string key="title"> Right to Left</string>
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="makeTextWritingDirectionRightToLeft:" target="-1" id="0FR-dP-o2G"/>
@@ -781,6 +781,12 @@
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Debug" id="535">
<items>
+ <menuItem title="Save Accessibility Trees..." keyEquivalent="a" id="540">
+ <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
+ <connections>
+ <action selector="logAccessibilityTrees:" target="-1" id="541"/>
+ </connections>
+ </menuItem>
<menuItem title="Force Repaint" keyEquivalent="r" id="545">
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
<connections>
Modified: trunk/Tools/MiniBrowser/mac/WK2BrowserWindowController.m (292270 => 292271)
--- trunk/Tools/MiniBrowser/mac/WK2BrowserWindowController.m 2022-04-02 21:03:18 UTC (rev 292270)
+++ trunk/Tools/MiniBrowser/mac/WK2BrowserWindowController.m 2022-04-02 21:52:58 UTC (rev 292271)
@@ -306,6 +306,22 @@
[[SFCertificateTrustPanel sharedCertificateTrustPanel] beginSheetForWindow:self.window modalDelegate:nil didEndSelector:nil contextInfo:NULL trust:_webView.serverTrust message:@"TLS Certificate Details"];
}
+- (IBAction)logAccessibilityTrees:(id)sender
+{
+ NSSavePanel *panel = [NSSavePanel savePanel];
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ panel.allowedFileTypes = @[ @"axtree" ];
+#pragma clang diagnostic pop
+ [panel beginSheetModalForWindow:self.window completionHandler:^(NSInteger result) {
+ if (result == NSModalResponseOK) {
+ [_webView retrieveAccessibilityTreeData:^(NSData *data, NSError *error) {
+ [data writeToURL:[panel URL] options:0 error:nil];
+ }];
+ }
+ }];
+}
+
- (IBAction)forceRepaint:(id)sender
{
// FIXME: This doesn't actually force a repaint.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes