Bug 62547 - kAXTextMarkerForPositionParameterizedAttribute does not work correctly in WK2
Summary: kAXTextMarkerForPositionParameterizedAttribute does not work correctly in WK2
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: chris fleizach
Keywords: InRadar
Depends on:
Reported: 2011-06-13 10:18 PDT by chris fleizach
Modified: 2011-06-13 12:10 PDT (History)
2 users (show)

See Also:

patch (11.07 KB, patch)
2011-06-13 10:26 PDT, chris fleizach
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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
Comment 2 chris fleizach 2011-06-13 10:26:44 PDT
Created attachment 96969 [details]
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]

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