Fire AX notifications on list box options. (issue 1034493005 by dmazzoni@chromium.org)

0 views
Skip to first unread message

dmaz...@chromium.org

unread,
Mar 30, 2015, 11:11:43 AM3/30/15
to je_jul...@samsung.com, mk...@chromium.org, blink-...@chromium.org, je_jul...@samsung.com, abox...@chromium.org, sigb...@opera.com, eae+bli...@chromium.org, dglazko...@chromium.org, blink-re...@chromium.org, nek...@chromium.org, blink-rev...@chromium.org, rob....@samsung.com
Reviewers: je_julie, Mike West,

Description:
Fire AX notifications on list box options.

Previously we just sent a single notification on the
list box when the selection changed, now we send
separate notifications on each option that changes
state too.

BUG=323462

Please review this at https://codereview.chromium.org/1034493005/

Base URL:
https://chromium.googlesource.com/chromium/blink.git@menu_list_more

Affected files (+141, -20 lines):
A LayoutTests/accessibility/listbox-focus.html
M Source/core/dom/AXObjectCache.h
M Source/core/html/HTMLOptionElement.cpp
M Source/core/html/HTMLSelectElement.cpp
M Source/modules/accessibility/AXListBox.h
M Source/modules/accessibility/AXListBox.cpp
M Source/modules/accessibility/AXListBoxOption.h
M Source/modules/accessibility/AXObject.h
M Source/modules/accessibility/AXObjectCacheImpl.h
M Source/modules/accessibility/AXObjectCacheImpl.cpp


mk...@chromium.org

unread,
Mar 30, 2015, 2:44:04 PM3/30/15
to dmaz...@chromium.org, je_jul...@samsung.com, abox...@chromium.org, blink-...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, dglazko...@chromium.org, dmaz...@chromium.org, eae+bli...@chromium.org, je_jul...@samsung.com, nek...@chromium.org, rob....@samsung.com, sigb...@opera.com

dmaz...@chromium.org

unread,
Mar 30, 2015, 3:32:45 PM3/30/15
to mk...@chromium.org, je_jul...@samsung.com, abox...@chromium.org, blink-...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, dglazko...@chromium.org, eae+bli...@chromium.org, je_jul...@samsung.com, nek...@chromium.org, rob....@samsung.com, sigb...@opera.com
I just jumped the gun on "git cl try", it's based on top of the previous
patch.
Rebasing now...


https://codereview.chromium.org/1034493005/

je_jul...@samsung.com

unread,
Mar 30, 2015, 11:51:04 PM3/30/15
to dmaz...@chromium.org, mk...@chromium.org, abox...@chromium.org, blink-...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, dglazko...@chromium.org, dmaz...@chromium.org, eae+bli...@chromium.org, nek...@chromium.org, rob....@samsung.com, sigb...@opera.com
Nice change!
There is no expected result.


https://codereview.chromium.org/1034493005/diff/40001/Source/core/html/HTMLOptionElement.cpp
File Source/core/html/HTMLOptionElement.cpp (right):

https://codereview.chromium.org/1034493005/diff/40001/Source/core/html/HTMLOptionElement.cpp#newcode272
Source/core/html/HTMLOptionElement.cpp:272: if (!select->layoutObject()
|| select->layoutObject()->isListBox()) {
((there is no layoutObject) or (layoutObject is ListBox))
Do you intent to check whether it has no layoutobject and the
layoutobject is listbox if it has layoutobject?

https://codereview.chromium.org/1034493005/diff/40001/Source/modules/accessibility/AXListBox.cpp
File Source/modules/accessibility/AXListBox.cpp (right):

https://codereview.chromium.org/1034493005/diff/40001/Source/modules/accessibility/AXListBox.cpp#newcode68
Source/modules/accessibility/AXListBox.cpp:68: if (!node() ||
!isHTMLSelectElement(node()))
When we use isHTMLXXXElement(const Node* node), we don't need to check
null for node because it checks null inside it.
So, I think we can remove '!node()' condition.

https://codereview.chromium.org/1034493005/diff/40001/Source/modules/accessibility/AXListBox.cpp#newcode83
Source/modules/accessibility/AXListBox.cpp:83: if (!node() ||
!isHTMLSelectElement(node()))
Ditto.

https://codereview.chromium.org/1034493005/

mk...@chromium.org

unread,
Mar 31, 2015, 1:20:52 AM3/31/15
to dmaz...@chromium.org, je_jul...@samsung.com, abox...@chromium.org, blink-...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, dglazko...@chromium.org, dmaz...@chromium.org, eae+bli...@chromium.org, je_jul...@samsung.com, nek...@chromium.org, rob....@samsung.com, sigb...@opera.com
The rebase seems to have failed. Now _all_ the bots are red. ;)

https://codereview.chromium.org/1034493005/

dmaz...@chromium.org

unread,
Mar 31, 2015, 2:57:38 AM3/31/15
to mk...@chromium.org, je_jul...@samsung.com, abox...@chromium.org, blink-...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, dglazko...@chromium.org, eae+bli...@chromium.org, je_jul...@samsung.com, nek...@chromium.org, rob....@samsung.com, sigb...@opera.com

https://codereview.chromium.org/1034493005/diff/40001/Source/core/html/HTMLOptionElement.cpp
File Source/core/html/HTMLOptionElement.cpp (right):

https://codereview.chromium.org/1034493005/diff/40001/Source/core/html/HTMLOptionElement.cpp#newcode272
Source/core/html/HTMLOptionElement.cpp:272: if (!select->layoutObject()
|| select->layoutObject()->isListBox()) {
On 2015/03/31 03:51:04, je_julie wrote:
> ((there is no layoutObject) or (layoutObject is ListBox))
> Do you intent to check whether it has no layoutobject and the
layoutobject is
> listbox if it has layoutobject?

I want to fire these notifications under two circumstances:
* If it does have a layout object (the most common case), I only want to
fire these notifications if it's a list box (and not a menu list).
* If it does not have a layout object (rare, maybe only inside of a
<canvas> subtree), I want to fire these notifications anyway, because it
won't be rendered on screen but will act to the user kind of like a
listbox.

I added a comment to clarify this.

https://codereview.chromium.org/1034493005/diff/40001/Source/modules/accessibility/AXListBox.cpp
File Source/modules/accessibility/AXListBox.cpp (right):

https://codereview.chromium.org/1034493005/diff/40001/Source/modules/accessibility/AXListBox.cpp#newcode68
Source/modules/accessibility/AXListBox.cpp:68: if (!node() ||
!isHTMLSelectElement(node()))
On 2015/03/31 03:51:04, je_julie wrote:
> When we use isHTMLXXXElement(const Node* node), we don't need to check
null for
> node because it checks null inside it.
> So, I think we can remove '!node()' condition.

Thanks!

https://codereview.chromium.org/1034493005/diff/40001/Source/modules/accessibility/AXListBox.cpp#newcode83
Source/modules/accessibility/AXListBox.cpp:83: if (!node() ||
!isHTMLSelectElement(node()))
On 2015/03/31 03:51:04, je_julie wrote:
> Ditto.

Done.

https://codereview.chromium.org/1034493005/

je_jul...@samsung.com

unread,
Mar 31, 2015, 10:54:53 AM3/31/15
to dmaz...@chromium.org, mk...@chromium.org, abox...@chromium.org, blink-...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, dglazko...@chromium.org, dmaz...@chromium.org, eae+bli...@chromium.org, nek...@chromium.org, rob....@samsung.com, sigb...@opera.com
On 2015/03/31 06:57:37, dmazzoni wrote:
> I want to fire these notifications under two circumstances:
> * If it does have a layout object (the most common case), I only want to
> fire
> these notifications if it's a list box (and not a menu list).
> * If it does not have a layout object (rare, maybe only inside of a
> <canvas>
> subtree), I want to fire these notifications anyway, because it won't be
> rendered on screen but will act to the user kind of like a listbox.

> I added a comment to clarify this.
Thanks!
BTW, don't we need expected result for the added layout test?


https://codereview.chromium.org/1034493005/

dmaz...@chromium.org

unread,
Mar 31, 2015, 11:03:47 AM3/31/15
to mk...@chromium.org, je_jul...@samsung.com, abox...@chromium.org, blink-...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, dglazko...@chromium.org, eae+bli...@chromium.org, nek...@chromium.org, rob....@samsung.com, sigb...@opera.com
> BTW, don't we need expected result for the added layout test?

No, if you use testharness.js you don't need an expectation file. Check out
the
comment at the top of LayoutTests/resources/testharness.js for details - it
was
new to me too.




https://codereview.chromium.org/1034493005/

je_jul...@samsung.com

unread,
Mar 31, 2015, 12:16:42 PM3/31/15
to dmaz...@chromium.org, mk...@chromium.org, abox...@chromium.org, blink-...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, dglazko...@chromium.org, eae+bli...@chromium.org, nek...@chromium.org, rob....@samsung.com, sigb...@opera.com
On 2015/03/31 15:03:47, dmazzoni wrote:
> > BTW, don't we need expected result for the added layout test?

> No, if you use testharness.js you don't need an expectation file. Check
> out
the
> comment at the top of LayoutTests/resources/testharness.js for details -
> it
was
> new to me too.

Ah, Thanks for letting me know.
LGTM!

https://codereview.chromium.org/1034493005/

dmaz...@chromium.org

unread,
Apr 1, 2015, 1:11:19 AM4/1/15
to mk...@chromium.org, je_jul...@samsung.com, abox...@chromium.org, blink-...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, dglazko...@chromium.org, eae+bli...@chromium.org, nek...@chromium.org, rob....@samsung.com, sigb...@opera.com
@mkwst, I fixed all of the errors and the try bots are happy now. Thanks!


https://codereview.chromium.org/1034493005/

dmaz...@chromium.org

unread,
Apr 1, 2015, 3:35:24 PM4/1/15
to mk...@chromium.org, je_jul...@samsung.com, tk...@chromium.org, abox...@chromium.org, blink-...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, dglazko...@chromium.org, eae+bli...@chromium.org, nek...@chromium.org, rob....@samsung.com, sigb...@opera.com
+tkent - would you mind reviewing the changes to Source/core/?


https://codereview.chromium.org/1034493005/

tk...@chromium.org

unread,
Apr 1, 2015, 7:52:29 PM4/1/15
to dmaz...@chromium.org, mk...@chromium.org, je_jul...@samsung.com, abox...@chromium.org, blink-...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, dglazko...@chromium.org, eae+bli...@chromium.org, nek...@chromium.org, rob....@samsung.com, sigb...@opera.com

commi...@chromium.org

unread,
Apr 1, 2015, 10:24:19 PM4/1/15
to dmaz...@chromium.org, mk...@chromium.org, je_jul...@samsung.com, tk...@chromium.org, abox...@chromium.org, blink-...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, dglazko...@chromium.org, eae+bli...@chromium.org, nek...@chromium.org, rob....@samsung.com, sigb...@opera.com

commi...@chromium.org

unread,
Apr 2, 2015, 1:37:38 AM4/2/15
to dmaz...@chromium.org, mk...@chromium.org, je_jul...@samsung.com, tk...@chromium.org, abox...@chromium.org, blink-...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, dglazko...@chromium.org, eae+bli...@chromium.org, nek...@chromium.org, rob....@samsung.com, sigb...@opera.com
Reply all
Reply to author
Forward
0 new messages