Bug 185742 - AX: [macOS] Expose the primary screen height through AX API
Summary: AX: [macOS] Expose the primary screen height through AX API
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-05-17 13:41 PDT by Nan Wang
Modified: 2018-05-17 18:27 PDT (History)
12 users (show)

See Also:


Attachments
patch (9.47 KB, patch)
2018-05-17 13:45 PDT, Nan Wang
ews: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews103 for mac-sierra (2.51 MB, application/zip)
2018-05-17 14:53 PDT, Build Bot
no flags Details
patch (12.46 KB, patch)
2018-05-17 15:37 PDT, Nan Wang
no flags Details | Formatted Diff | Diff
patch (16.96 KB, patch)
2018-05-17 16:44 PDT, Nan Wang
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nan Wang 2018-05-17 13:41:15 PDT
Connecting to WindowServer to get the screen size is not allowed, so that we should expose the value through AXAPI.

<rdar://problem/40265269>
Comment 1 Nan Wang 2018-05-17 13:45:43 PDT
Created attachment 340632 [details]
patch
Comment 2 chris fleizach 2018-05-17 14:51:39 PDT
Comment on attachment 340632 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=340632&action=review

> Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:1831
> +    FloatRect screenRect = screenRectForPrimaryScreen();

will this still work if the window is on a 2nd monitor?

> Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:50
> +#ifndef NSAccessibilityPrimaryScreenHeightAttribute

there must be one place in WebCore that we can put this string.
Comment 3 Build Bot 2018-05-17 14:53:17 PDT
Comment on attachment 340632 [details]
patch

Attachment 340632 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/7714803

New failing tests:
accessibility/plugin.html
accessibility/mac/bounds-for-range.html
accessibility/table-attributes.html
accessibility/mac/aria-columnrowheaders.html
accessibility/mac/primary-screen-height.html
accessibility/mac/document-links.html
accessibility/table-with-rules.html
accessibility/math-multiscript-attributes.html
accessibility/table-one-cell.html
accessibility/table-cells.html
accessibility/table-sections.html
accessibility/mac/internal-link-anchors.html
accessibility/table-cell-spans.html
accessibility/image-map2.html
accessibility/lists.html
accessibility/transformed-element.html
media/modern-media-controls/scrubber-support/scrubber-support-drag.html
accessibility/internal-link-anchors2.html
accessibility/image-link.html
Comment 4 Build Bot 2018-05-17 14:53:18 PDT
Created attachment 340652 [details]
Archive of layout-test-results from ews103 for mac-sierra

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews103  Port: mac-sierra  Platform: Mac OS X 10.12.6
Comment 5 Nan Wang 2018-05-17 14:54:36 PDT
Comment on attachment 340632 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=340632&action=review

Will also looking at the test failures

>> Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:1831
>> +    FloatRect screenRect = screenRectForPrimaryScreen();
> 
> will this still work if the window is on a 2nd monitor?

Yes. It will always return the primary screen height

>> Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:50
>> +#ifndef NSAccessibilityPrimaryScreenHeightAttribute
> 
> there must be one place in WebCore that we can put this string.

Ok looking
Comment 6 Nan Wang 2018-05-17 15:37:58 PDT
Created attachment 340662 [details]
patch

updated from review and fixed failing tests
Comment 7 chris fleizach 2018-05-17 16:15:54 PDT
Comment on attachment 340662 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=340662&action=review

> Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:73
> +    static Class cls = objc_getClass("WebAccessibilityObjectWrapper");

I was thinking something in an exported header

like

#include <WebCore/AccessibilityObject.h>

or maybe we can export a Mac header for this one...
Comment 8 Nan Wang 2018-05-17 16:44:04 PDT
Created attachment 340667 [details]
patch

update
Comment 9 WebKit Commit Bot 2018-05-17 18:27:54 PDT
Comment on attachment 340667 [details]
patch

Clearing flags on attachment: 340667

Committed r231937: <https://trac.webkit.org/changeset/231937>
Comment 10 WebKit Commit Bot 2018-05-17 18:27:55 PDT
All reviewed patches have been landed.  Closing bug.