Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.cpp

Issue 1655153003: Fire an accessible click event when a web node is clicked on. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fire_clicked_event
Patch Set: Added test for tap Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2014, Google Inc. All rights reserved. 2 * Copyright (C) 2014, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 904 matching lines...) Expand 10 before | Expand all | Expand 10 after
915 915
916 m_modificationCount++; 916 m_modificationCount++;
917 917
918 // Create the AXObject if it didn't yet exist - that's always safe at the en d of a layout, and it 918 // Create the AXObject if it didn't yet exist - that's always safe at the en d of a layout, and it
919 // allows an AX notification to be sent when a page has its first layout, ra ther than when the 919 // allows an AX notification to be sent when a page has its first layout, ra ther than when the
920 // document first loads. 920 // document first loads.
921 if (AXObject* obj = getOrCreate(layoutObject)) 921 if (AXObject* obj = getOrCreate(layoutObject))
922 postNotification(obj, AXLayoutComplete); 922 postNotification(obj, AXLayoutComplete);
923 } 923 }
924 924
925 void AXObjectCacheImpl::handleClicked(Node* node)
926 {
927 if (AXObject* obj = getOrCreate(node))
928 postNotification(obj, AXClicked);
929 }
930
925 void AXObjectCacheImpl::handleAriaExpandedChange(Node* node) 931 void AXObjectCacheImpl::handleAriaExpandedChange(Node* node)
926 { 932 {
927 if (AXObject* obj = getOrCreate(node)) 933 if (AXObject* obj = getOrCreate(node))
928 obj->handleAriaExpandedChanged(); 934 obj->handleAriaExpandedChanged();
929 } 935 }
930 936
931 void AXObjectCacheImpl::handleAriaSelectedChanged(Node* node) 937 void AXObjectCacheImpl::handleAriaSelectedChanged(Node* node)
932 { 938 {
933 AXObject* obj = get(node); 939 AXObject* obj = get(node);
934 if (!obj) 940 if (!obj)
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
1242 visitor->trace(m_nodeObjectMapping); 1248 visitor->trace(m_nodeObjectMapping);
1243 #endif 1249 #endif
1244 1250
1245 visitor->trace(m_objects); 1251 visitor->trace(m_objects);
1246 visitor->trace(m_notificationsToPost); 1252 visitor->trace(m_notificationsToPost);
1247 1253
1248 AXObjectCache::trace(visitor); 1254 AXObjectCache::trace(visitor);
1249 } 1255 }
1250 1256
1251 } // namespace blink 1257 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698