WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
129492
[ATK] Expose missing functionalities of AtkTableCell to AT.
https://bugs.webkit.org/show_bug.cgi?id=129492
Summary
[ATK] Expose missing functionalities of AtkTableCell to AT.
Krzysztof Czech
Reported
2014-02-28 09:32:59 PST
Implements, get_column_span, get_row_span, get_position, get_table.
Attachments
patch
(9.29 KB, patch)
2014-03-03 06:31 PST
,
Krzysztof Czech
no flags
Details
Formatted Diff
Diff
patch
(9.32 KB, patch)
2014-03-03 06:48 PST
,
Krzysztof Czech
no flags
Details
Formatted Diff
Diff
patch
(9.32 KB, patch)
2014-03-03 06:51 PST
,
Krzysztof Czech
no flags
Details
Formatted Diff
Diff
patch
(9.35 KB, patch)
2014-03-03 06:53 PST
,
Krzysztof Czech
no flags
Details
Formatted Diff
Diff
patch
(9.51 KB, patch)
2014-03-04 07:06 PST
,
Krzysztof Czech
no flags
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2014-02-28 09:33:36 PST
<
rdar://problem/16196432
>
Krzysztof Czech
Comment 2
2014-03-03 06:31:36 PST
Created
attachment 225646
[details]
patch
Krzysztof Czech
Comment 3
2014-03-03 06:48:36 PST
Created
attachment 225647
[details]
patch
Krzysztof Czech
Comment 4
2014-03-03 06:51:55 PST
Created
attachment 225648
[details]
patch
Krzysztof Czech
Comment 5
2014-03-03 06:53:18 PST
Created
attachment 225649
[details]
patch
Mario Sanchez Prada
Comment 6
2014-03-03 08:54:23 PST
Comment on
attachment 225649
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=225649&action=review
Thanks for doing this. The patch looks good to me in general, but still needs some changes IMHO (see below). Also, table cell is a pretty new thing to ATK so you probably want to use ATK_CHECK_VERSION in some places too.
> Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp:49 > + accessibilityObjectGetOrReturn(cell, axObject, nullptr); > > - AccessibilityObject* axObject = core(cell); > - if (!axObject || !axObject->isTableCell()) > + if (!axObject->isTableCell())
I'd rather keep the old idiom in place. This new macro is confusing IMHO, specially because of containing an out parameter, and thus decreases readability
> Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp:103 > +gboolean webkitAccessibleTableCellGetPosition(AtkTableCell* cell, gint *row, gint* column)
misplaced *
> Source/WebCore/accessibility/atk/WebKitAccessibleUtil.h:70 > + } while (0)
Because of the particular nature of this macro, you can not place the whole block inside G_STMT_START/END guards which, besides being probably not good enough for places where the compiler expects the macro to expand in only one line, looks a bit awkward, IMO This should go away if you go back to the old idiom, though
> Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:213 > + gint row = -1, column= -1, rowSpan = -1, columnSpan = -1;
Please declare each variable in a separate line and use int instead of gint.
chris fleizach
Comment 7
2014-03-03 08:57:49 PST
Comment on
attachment 225649
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=225649&action=review
> Source/WebCore/ChangeLog:8 > + Implemented missing API of AtkTableCell.
too many spaces after Implemented
> Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp:134 > + AtkObject* table = atk_object_get_parent(axObject->wrapper());
should you verify that this is actually the table element before returning?
> Source/WebCore/accessibility/atk/WebKitAccessibleUtil.h:63 > + AccessibilityObject* axObject = nullptr; \
It's a little non-intuitive that a local variable will be declared inside the macro, that you reference outside the macro. Maybe it would be better to write a function that does this same check AccessibilityObject* axObject = verifyAccessibilityObjectIsValid(...); if (!axObject) return;
Krzysztof Czech
Comment 8
2014-03-04 07:06:49 PST
Created
attachment 225773
[details]
patch
Krzysztof Czech
Comment 9
2014-03-04 07:07:56 PST
(In reply to
comment #6
)
> (From update of
attachment 225649
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=225649&action=review
> > Thanks for doing this. The patch looks good to me in general, but still needs some changes IMHO (see below). Also, table cell is a pretty new thing to ATK so you probably want to use ATK_CHECK_VERSION in some places too. > > > Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp:49 > > + accessibilityObjectGetOrReturn(cell, axObject, nullptr); > > > > - AccessibilityObject* axObject = core(cell); > > - if (!axObject || !axObject->isTableCell()) > > + if (!axObject->isTableCell()) > > I'd rather keep the old idiom in place. This new macro is confusing IMHO, specially because of containing an out parameter, and thus decreases readability
Done.
> > > Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp:103 > > +gboolean webkitAccessibleTableCellGetPosition(AtkTableCell* cell, gint *row, gint* column) > > misplaced *
Done
> > > Source/WebCore/accessibility/atk/WebKitAccessibleUtil.h:70 > > + } while (0) > > Because of the particular nature of this macro, you can not place the whole block inside G_STMT_START/END guards which, besides being probably not good enough for places where the compiler expects the macro to expand in only one line, looks a bit awkward, IMO > > This should go away if you go back to the old idiom, though > > > Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:213 > > + gint row = -1, column= -1, rowSpan = -1, columnSpan = -1; > > Please declare each variable in a separate line and use int instead of gint.
Done
Krzysztof Czech
Comment 10
2014-03-04 07:14:29 PST
(In reply to
comment #7
)
> (From update of
attachment 225649
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=225649&action=review
> > > Source/WebCore/ChangeLog:8 > > + Implemented missing API of AtkTableCell.
Done.
> > too many spaces after Implemented > > > Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp:134 > > + AtkObject* table = atk_object_get_parent(axObject->wrapper()); > > should you verify that this is actually the table element before returning?
Yes exactly, you are right. Thanks.
> > > Source/WebCore/accessibility/atk/WebKitAccessibleUtil.h:63 > > + AccessibilityObject* axObject = nullptr; \ > > It's a little non-intuitive that a local variable will be declared inside the macro, that you reference outside the macro. > > Maybe it would be better to write a function that does this same check
Yes, this sounds as good idea. We already have similar function that returns AccessibilityObject for respective AtkObject and it's called webkitAccessibleGetAccessibilityObject. I think it can be slightly extended for adding some additional checks. I think it should be modified in a separate patch because it touches many files that are not related to this changes.
> > AccessibilityObject* axObject = verifyAccessibilityObjectIsValid(...); > if (!axObject) > return;
Thanks
Mario Sanchez Prada
Comment 11
2014-03-05 06:15:36 PST
Comment on
attachment 225773
[details]
patch Looks good to me now. Thanks!
WebKit Commit Bot
Comment 12
2014-03-05 07:10:28 PST
Comment on
attachment 225773
[details]
patch Clearing flags on attachment: 225773 Committed
r165107
: <
http://trac.webkit.org/changeset/165107
>
WebKit Commit Bot
Comment 13
2014-03-05 07:10:34 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug