Add accessible for QWebView.
Created attachment 151908 [details]
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] 
Source/WebKit/qt/ChangeLog:1: ChangeLog entry has no bug number [changelog/bugnumber] 
Source/WebKit/qt/Api/qwebviewaccessible_p.h:23: Alphabetical sorting problem. [build/include_order] 
Total errors found: 3 in 7 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 151926 [details]
Comment on attachment 151926 [details]
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.
> +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?
> + if (QWebPage *page = qobject_cast<QWebPage*>(object))
Coding style nitpick, * placement :)
> + if (QWebView *view = qobject_cast<QWebView*>(object))
> + if (QWebFrame *frame = qobject_cast<QWebFrame*>(object))
> +// 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.
Created attachment 152256 [details]
Thanks for the feedback :) I hope I've addressed the issues mentioned.
Comment on attachment 152256 [details]
Clearing flags on attachment: 152256
Committed r122702: <http://trac.webkit.org/changeset/122702>
All reviewed patches have been landed. Closing bug.