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

Side by Side Diff: third_party/WebKit/LayoutTests/resources/accessibility-helper.js

Issue 2957733002: Only call TextChanged on existing AXObjects. This avoids triggering the code which calls UpdateDist… (Closed)
Patch Set: Created 3 years, 5 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 function buildAccessibilityTree(accessibilityObject, indent, allAttributesRequir ed, rolesToIgnore, targetObject, targetString) { 1 function buildAccessibilityTree(accessibilityObject, indent, allAttributesRequir ed, rolesToIgnore, targetObject, targetString) {
2 if (rolesToIgnore) { 2 if (rolesToIgnore) {
3 for (var i = 0; i < rolesToIgnore.length; i++) { 3 for (var i = 0; i < rolesToIgnore.length; i++) {
4 if (accessibilityObject.role == 'AXRole: ' + rolesToIgnore[i]) 4 if (accessibilityObject.role == 'AXRole: ' + rolesToIgnore[i])
5 return true; 5 return true;
6 } 6 }
7 } 7 }
8 8
9 var str = ""; 9 var str = "";
10 for (var i = 0; i < indent; i++) 10 for (var i = 0; i < indent; i++)
(...skipping 13 matching lines...) Expand all
24 return false; 24 return false;
25 25
26 var count = accessibilityObject.childrenCount; 26 var count = accessibilityObject.childrenCount;
27 for (var i = 0; i < count; i++) { 27 for (var i = 0; i < count; i++) {
28 if (!buildAccessibilityTree(accessibilityObject.childAtIndex(i), indent + 1, allAttributesRequired, rolesToIgnore, targetObject, targetString)) 28 if (!buildAccessibilityTree(accessibilityObject.childAtIndex(i), indent + 1, allAttributesRequired, rolesToIgnore, targetObject, targetString))
29 return false; 29 return false;
30 } 30 }
31 31
32 return true; 32 return true;
33 } 33 }
34
35 function traverseAccessibilityTree(accessibilityObject) {
36 var count = accessibilityObject.childrenCount;
37 for (var i = 0; i < count; i++)
38 traverseAccessibilityTree(accessibilityObject.childAtIndex(i));
39 }
40
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698