Bug 91073 - Add accessible for QWebView.
Summary: Add accessible for QWebView.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-12 04:30 PDT by Frederik Gladhorn
Modified: 2012-07-16 00:46 PDT (History)
2 users (show)

See Also:


Attachments
Patch (12.38 KB, patch)
2012-07-12 04:33 PDT, Frederik Gladhorn
no flags Details | Formatted Diff | Diff
Patch (12.46 KB, patch)
2012-07-12 05:53 PDT, Frederik Gladhorn
no flags Details | Formatted Diff | Diff
Patch (11.90 KB, patch)
2012-07-13 07:29 PDT, Frederik Gladhorn
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Frederik Gladhorn 2012-07-12 04:30:27 PDT
Add accessible for QWebView.
Comment 1 Frederik Gladhorn 2012-07-12 04:33:12 PDT
Created attachment 151908 [details]
Patch
Comment 2 WebKit Review Bot 2012-07-12 04:35:37 PDT
Attachment 151908 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebKit/ChangeLog', u'Source/WebKit/..." exit_code: 1
Source/WebKit/ChangeLog:1:  ChangeLog entry has no bug number  [changelog/bugnumber] [5]
Source/WebKit/qt/ChangeLog:1:  ChangeLog entry has no bug number  [changelog/bugnumber] [5]
Source/WebKit/qt/Api/qwebviewaccessible_p.h:23:  Alphabetical sorting problem.  [build/include_order] [4]
Total errors found: 3 in 7 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Frederik Gladhorn 2012-07-12 05:53:19 PDT
Created attachment 151926 [details]
Patch
Comment 4 Simon Hausmann 2012-07-13 04:22:51 PDT
Comment on attachment 151926 [details]
Patch

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

A few comments. I like the approach of doing this in small steps, this being the first one. Let's do one more round because of the coding style and the accesslbeInterfaceFactory function placement. I think ideally it should be static somewhere, alternatively it should be namespaced.

> Source/WebKit/qt/Api/qwebviewaccessible.cpp:28
> +QAccessibleInterface* accessibleInterfaceFactory(const QString& key, QObject* object)

Would it make perhaps sense to move this into qwebpage.cpp where it is called/used and make it a static function there?

> Source/WebKit/qt/Api/qwebviewaccessible.cpp:32
> +    if (QWebPage *page = qobject_cast<QWebPage*>(object))

Coding style nitpick, * placement :)

> Source/WebKit/qt/Api/qwebviewaccessible.cpp:35
> +    if (QWebView *view = qobject_cast<QWebView*>(object))

Ditto.

> Source/WebKit/qt/Api/qwebviewaccessible.cpp:38
> +    if (QWebFrame *frame = qobject_cast<QWebFrame*>(object))

Ditto.

> Source/WebKit/qt/Api/qwebviewaccessible.cpp:71
> +//    WebCore::Document* document = frame()->d->frame->document();
> +//    if (!document || !document->axObjectCache())
> +//        return 0;
> +//    WebCore::AccessibilityObject* rootAccessible = document->axObjectCache()->rootObject();
> +//    return rootAccessible ? 1 : 0;

We probably shouldn't land the code that is commented out.
Comment 5 Frederik Gladhorn 2012-07-13 07:29:39 PDT
Created attachment 152256 [details]
Patch
Comment 6 Frederik Gladhorn 2012-07-13 07:30:09 PDT
Thanks for the feedback :) I hope I've addressed the issues mentioned.
Comment 7 WebKit Review Bot 2012-07-16 00:46:04 PDT
Comment on attachment 152256 [details]
Patch

Clearing flags on attachment: 152256

Committed r122702: <http://trac.webkit.org/changeset/122702>
Comment 8 WebKit Review Bot 2012-07-16 00:46:08 PDT
All reviewed patches have been landed.  Closing bug.