Bug 62547

Summary: kAXTextMarkerForPositionParameterizedAttribute does not work correctly in WK2
Product: WebKit Reporter: chris fleizach <cfleizach>
Component: AccessibilityAssignee: chris fleizach <cfleizach>
Status: RESOLVED FIXED    
Severity: Normal CC: darin, webkit.review.bot
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch darin: review+

Description chris fleizach 2011-06-13 10:18:26 PDT
With WK2 I am running into some serious issues with the AXTextMarker API. There seems to be a significant change in accessing webkit content. I used to grab the current paragraph of text below the cursor in a webkit view using this strategy: get kAXTextMarkerForPositionParametrizedAttribute, then kAXParagraphTextMarkerRangeForTextMarkerParametrizedAttribute followed by kAXStringForTextMarkerRangeParameterizedAttribute. This seems to give no string or text from a completely different part of the web site.
Comment 1 chris fleizach 2011-06-13 10:18:33 PDT
rdar://9555733
Comment 2 chris fleizach 2011-06-13 10:26:44 PDT
Created attachment 96969 [details]
patch
Comment 3 WebKit Review Bot 2011-06-13 10:30:01 PDT
Attachment 96969 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebKit2/ChangeLog', u'Source/WebKit..." exit_code: 1

Source/WebKit2/UIProcess/WebPageProxy.h:616:  The parameter name "point" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 1 in 16 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Darin Adler 2011-06-13 10:33:53 PDT
Comment on attachment 96969 [details]
patch

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

> Source/WebKit2/UIProcess/WebPageProxy.h:610
> +    void screenToWindow(const WebCore::IntPoint& point, WebCore::IntPoint& result);

The stylebot suggests leaving out the name “point” here, and I agree. Unless you want to call this screenPoint.

> Source/WebKit2/UIProcess/WebPageProxy.messages.in:55
> +    ScreenToWindow(WebCore::IntPoint point) -> (WebCore::IntPoint resultPoint)

I’d call these screenPoint and windowPoint rather than point and resultPoint.
Comment 5 chris fleizach 2011-06-13 12:10:36 PDT
http://trac.webkit.org/changeset/88669