Bug 101748 - [WK2][GTK][EFL] Share WebKit2-GTK's WebProcess Accessibility implementation with other WebKit ports.
Summary: [WK2][GTK][EFL] Share WebKit2-GTK's WebProcess Accessibility implementation w...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit EFL (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 99578
Blocks: 98895
  Show dependency treegraph
 
Reported: 2012-11-09 05:52 PST by Krzysztof Czech
Modified: 2012-11-16 08:02 PST (History)
8 users (show)

See Also:


Attachments
[EFL] Share WebKit2-GTK's Accessibility implementation with other WebKit ports. (21.49 KB, patch)
2012-11-09 06:23 PST, Krzysztof Czech
no flags Details | Formatted Diff | Diff
[WK2] Share WebKit2-GTK's Accessibility implementation with other WebKit ports. (21.49 KB, patch)
2012-11-13 07:25 PST, Krzysztof Czech
no flags Details | Formatted Diff | Diff
[WK2][GTK][EFL] Share WebKit2-GTK's Accessibility implementation with other WebKit ports. (21.51 KB, patch)
2012-11-14 08:29 PST, Krzysztof Czech
mrobinson: review+
mrobinson: commit-queue-
Details | Formatted Diff | Diff
[WK2][GTK][EFL] Share WebKit2-GTK's Accessibility implementation with other WebKit ports. (74 bytes, text/plain)
2012-11-16 03:33 PST, Krzysztof Czech
no flags Details
[WK2][GTK][EFL] Share WebKit2-GTK's Accessibility implementation with other WebKit ports. (20.08 KB, patch)
2012-11-16 03:37 PST, Krzysztof Czech
no flags Details | Formatted Diff | Diff
[WK2][GTK][EFL] Share WebKit2-GTK's WebProcess Accessibility implementation with other WebKit ports. (20.17 KB, patch)
2012-11-16 07:10 PST, Krzysztof Czech
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Krzysztof Czech 2012-11-09 05:52:50 PST
Remove and rename files related to Accessibility from WebPage/gtk to WebPage/atk.
Comment 1 Krzysztof Czech 2012-11-09 06:23:06 PST
Created attachment 173293 [details]
[EFL] Share WebKit2-GTK's Accessibility implementation with other WebKit ports.
Comment 2 Krzysztof Czech 2012-11-09 06:30:55 PST
Sharing the WebCore's Accessibility, I thought that, some bits from WebProcess part can also be shared.
Comment 3 Gyuyoung Kim 2012-11-11 23:55:06 PST
Comment on attachment 173293 [details]
[EFL] Share WebKit2-GTK's Accessibility implementation with other WebKit ports.

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

> Source/WebKit2/ChangeLog:3
> +        [EFL] Share WebKit2-GTK's Accessibility implementation with other WebKit ports.

I think this is not related to [EFL] port patch. I think [WK2] is proper for this patch.
Comment 4 WebKit Review Bot 2012-11-12 07:11:31 PST
Attachment 173293 [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/WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.h:26:  #ifndef header guard has wrong style, please use: WebPageAccessibilityObjectAtk_h  [build/header_guard] [5]
Source/WebKit2/WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.h:56:  web_page_accessibility_object_get_type is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Source/WebKit2/WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp:107:  web_page_accessibility_object_init is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Source/WebKit2/WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp:111:  web_page_accessibility_object_class_init is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Total errors found: 4 in 7 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Krzysztof Czech 2012-11-13 07:25:56 PST
Created attachment 173889 [details]
[WK2] Share WebKit2-GTK's Accessibility implementation with other WebKit ports.
Comment 6 WebKit Review Bot 2012-11-13 07:30:25 PST
Attachment 173889 [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/WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.h:26:  #ifndef header guard has wrong style, please use: WebPageAccessibilityObjectAtk_h  [build/header_guard] [5]
Source/WebKit2/WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.h:56:  web_page_accessibility_object_get_type is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Source/WebKit2/WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp:107:  web_page_accessibility_object_init is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Source/WebKit2/WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp:111:  web_page_accessibility_object_class_init is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Total errors found: 4 in 7 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 7 Grzegorz Czajkowski 2012-11-13 07:50:00 PST
This patch touches WK2-GTK implementation. How about changing the title to: [WK2][GTK][EFL] ..

There is style error which is connected witch the proposed changes:
#ifndef header guard has wrong style, please use: WebPageAccessibilityObjectAtk_h

IMHO, other style errors could be fixed in this bug according to WebKit coding style (only 3 left). It will encourage the reviewers to take a look at the patch.
Comment 8 Krzysztof Czech 2012-11-14 08:29:18 PST
(In reply to comment #7)
> This patch touches WK2-GTK implementation. How about changing the title to: [WK2][GTK][EFL] ..
I think is sounds reasonable. Done
> 
> There is style error which is connected witch the proposed changes:
> #ifndef header guard has wrong style, please use: WebPageAccessibilityObjectAtk_h
Done.
> 
> IMHO, other style errors could be fixed in this bug according to WebKit coding style (only 3 left). It will encourage the reviewers to take a look at the patch.

I think it is glib's ecosystem naming convention so probably it should be left as it is.
Comment 9 Krzysztof Czech 2012-11-14 08:29:56 PST
Created attachment 174168 [details]
[WK2][GTK][EFL] Share WebKit2-GTK's Accessibility implementation with other WebKit ports.
Comment 10 Martin Robinson 2012-11-14 08:30:46 PST
(In reply to comment #8)

> I think it is glib's ecosystem naming convention so probably it should be left as it is.

At some point the GTK+ port switched to only using GLib naming conventions in public headers.
Comment 11 WebKit Review Bot 2012-11-14 08:34:14 PST
Attachment 174168 [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/WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.h:56:  web_page_accessibility_object_get_type is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Source/WebKit2/WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp:107:  web_page_accessibility_object_init is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Source/WebKit2/WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp:111:  web_page_accessibility_object_class_init is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [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 12 Grzegorz Czajkowski 2012-11-14 23:27:07 PST
(In reply to comment #10)
> (In reply to comment #8)
> 
> > I think it is glib's ecosystem naming convention so probably it should be left as it is.
> 
> At some point the GTK+ port switched to only using GLib naming conventions in public headers.

Thanks for the clarifications. LGTM.
Comment 13 Krzysztof Czech 2012-11-15 09:27:01 PST
This patch eliminates some code duplication in terms of Accessibility (see 99578)

Ping reviewers ?.
Comment 14 Martin Robinson 2012-11-15 09:44:19 PST
Comment on attachment 174168 [details]
[WK2][GTK][EFL] Share WebKit2-GTK's Accessibility implementation with other WebKit ports.

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

> Source/WebKit2/GNUmakefile.list.am:1148
> +    Source/WebKit2/WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.h \
> +    Source/WebKit2/WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp \

It seems to maintain the alphabetical ordering, these should go above Source/WebKit2/WebProcess/WebPage/gtk/WebInspectorGtk.cpp.

> Source/WebKit2/WebProcess/WebPage/gtk/WebPageGtk.cpp:33
> +#include "WebPageAccessibilityObjectAtk.h"

It makes sense to keep the header name as WebPageAccessibilityObject.h since that's the name of GObject.
Comment 15 Krzysztof Czech 2012-11-16 03:33:33 PST
Created attachment 174637 [details]
[WK2][GTK][EFL] Share WebKit2-GTK's Accessibility implementation with other WebKit ports.

[WK2][GTK][EFL] Share WebKit2-GTK's Accessibility implementation with other WebKit ports.
Comment 16 Krzysztof Czech 2012-11-16 03:37:48 PST
Created attachment 174638 [details]
[WK2][GTK][EFL] Share WebKit2-GTK's Accessibility implementation with other WebKit ports.
Comment 17 Krzysztof Czech 2012-11-16 03:38:21 PST
(In reply to comment #14)
> (From update of attachment 174168 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=174168&action=review
> 
> > Source/WebKit2/GNUmakefile.list.am:1148
> > +    Source/WebKit2/WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.h \
> > +    Source/WebKit2/WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp \
> 
> It seems to maintain the alphabetical ordering, these should go above Source/WebKit2/WebProcess/WebPage/gtk/WebInspectorGtk.cpp.
Done.
> 
> > Source/WebKit2/WebProcess/WebPage/gtk/WebPageGtk.cpp:33
> > +#include "WebPageAccessibilityObjectAtk.h"
> 
> It makes sense to keep the header name as WebPageAccessibilityObject.h since that's the name of GObject.
Done.
Comment 18 WebKit Review Bot 2012-11-16 03:41:13 PST
Attachment 174638 [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/WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp:107:  web_page_accessibility_object_init is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Source/WebKit2/WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp:111:  web_page_accessibility_object_class_init is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Source/WebKit2/WebProcess/WebPage/atk/WebPageAccessibilityObject.h:56:  web_page_accessibility_object_get_type is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Total errors found: 3 in 5 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 19 Mario Sanchez Prada 2012-11-16 04:26:32 PST
Comment on attachment 174638 [details]
[WK2][GTK][EFL] Share WebKit2-GTK's Accessibility implementation with other WebKit ports.

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

The changes look good to me. Actually the only comment I can make about them is about fixing an issue with naming I'm guilty of :/

Additionally, besides the code in this patch (which is about the AtkPlug part in the Web process only), I wonder if it could be possible to share the bits in WebKit2/UIProcess/API/gtk/WebKitWebViewBaseAccessible.[cpp|h] as well, as they implement the other side of this thing (the AtkSocket part in the UI process).

Or maybe you were already thinking of doing that in a separate bug?

> Source/WebKit2/WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp:60
> +    Page* page = accessible->m_page->corePage();
> +    if (!page)
> +        return 0;
> +
> +    Frame* core = page->mainFrame();
> +    if (!core || !core->document())
> +        return 0;
> +
> +    AccessibilityObject* root = core->document()->axObjectCache()->rootObject();
> +    if (!root)
> +        return 0;
> +
> +    AtkObject* axRoot = root->wrapper();

I know I'm the one to blame for this in the first place, but perhaps this patch is a good moment to use more meaningful names here :)

  page -> corePage
  core -> coreFrame
  root -> coreRootObject
  axRoot -> rootObject (to be consistent with the rest of this file)

... or something like that.
Comment 20 Krzysztof Czech 2012-11-16 06:46:47 PST
(In reply to comment #19)
> (From update of attachment 174638 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=174638&action=review
> 
> The changes look good to me. Actually the only comment I can make about them is about fixing an issue with naming I'm guilty of :/
> 
> Additionally, besides the code in this patch (which is about the AtkPlug part in the Web process only), I wonder if it could be possible to share the bits in WebKit2/UIProcess/API/gtk/WebKitWebViewBaseAccessible.[cpp|h] as well, as they implement the other side of this thing (the AtkSocket part in the UI process).
> 
> Or maybe you were already thinking of doing that in a separate bug?
> 
> > Source/WebKit2/WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp:60
> > +    Page* page = accessible->m_page->corePage();
> > +    if (!page)
> > +        return 0;
> > +
> > +    Frame* core = page->mainFrame();
> > +    if (!core || !core->document())
> > +        return 0;
> > +
> > +    AccessibilityObject* root = core->document()->axObjectCache()->rootObject();
> > +    if (!root)
> > +        return 0;
> > +
> > +    AtkObject* axRoot = root->wrapper();
> 
> I know I'm the one to blame for this in the first place, but perhaps this patch is a good moment to use more meaningful names here :)
> 
>   page -> corePage
>   core -> coreFrame
>   root -> coreRootObject
>   axRoot -> rootObject (to be consistent with the rest of this file)
> 
> ... or something like that.
Sounds good to me. I will change those names.

Thank you for review.
I was also thinking about sharing WebKitWebViewBaseAccessible.[cpp|h] from UIProcess part. I think it's feasible. Let's have a separate bug on this.
Comment 21 Krzysztof Czech 2012-11-16 06:53:45 PST
(In reply to comment #20)
> (In reply to comment #19)
> > (From update of attachment 174638 [details] [details])
> > View in context: https://bugs.webkit.org/attachment.cgi?id=174638&action=review
> > 
> > The changes look good to me. Actually the only comment I can make about them is about fixing an issue with naming I'm guilty of :/
> > 
> > Additionally, besides the code in this patch (which is about the AtkPlug part in the Web process only), I wonder if it could be possible to share the bits in WebKit2/UIProcess/API/gtk/WebKitWebViewBaseAccessible.[cpp|h] as well, as they implement the other side of this thing (the AtkSocket part in the UI process).
> > 
> > Or maybe you were already thinking of doing that in a separate bug?
> > 
> > > Source/WebKit2/WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp:60
> > > +    Page* page = accessible->m_page->corePage();
> > > +    if (!page)
> > > +        return 0;
> > > +
> > > +    Frame* core = page->mainFrame();
> > > +    if (!core || !core->document())
> > > +        return 0;
> > > +
> > > +    AccessibilityObject* root = core->document()->axObjectCache()->rootObject();
> > > +    if (!root)
> > > +        return 0;
> > > +
> > > +    AtkObject* axRoot = root->wrapper();
> > 
> > I know I'm the one to blame for this in the first place, but perhaps this patch is a good moment to use more meaningful names here :)
> > 
> >   page -> corePage
> >   core -> coreFrame
> >   root -> coreRootObject
> >   axRoot -> rootObject (to be consistent with the rest of this file)
> > 
> > ... or something like that.
> Sounds good to me. I will change those names.
> 
> Thank you for review.
> I was also thinking about sharing WebKitWebViewBaseAccessible.[cpp|h] from UIProcess part. I think it's feasible. Let's have a separate bug on this.

I have opened ticket for this, https://bugs.webkit.org/show_bug.cgi?id=102502
Comment 22 Krzysztof Czech 2012-11-16 07:10:31 PST
Created attachment 174677 [details]
[WK2][GTK][EFL] Share WebKit2-GTK's WebProcess Accessibility implementation with other WebKit ports.
Comment 23 WebKit Review Bot 2012-11-16 07:14:27 PST
Attachment 174677 [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/WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp:107:  web_page_accessibility_object_init is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Source/WebKit2/WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp:111:  web_page_accessibility_object_class_init is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Source/WebKit2/WebProcess/WebPage/atk/WebPageAccessibilityObject.h:56:  web_page_accessibility_object_get_type is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Total errors found: 3 in 5 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 24 WebKit Review Bot 2012-11-16 08:02:23 PST
Comment on attachment 174677 [details]
[WK2][GTK][EFL] Share WebKit2-GTK's WebProcess Accessibility implementation with other WebKit ports.

Clearing flags on attachment: 174677

Committed r134951: <http://trac.webkit.org/changeset/134951>
Comment 25 WebKit Review Bot 2012-11-16 08:02:31 PST
All reviewed patches have been landed.  Closing bug.