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

Unified Diff: third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp

Issue 2532023002: Avoid updateStyleAndLayoutTree in determineAccessibilityRole (Closed)
Patch Set: dmazzoni/tkent review Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
diff --git a/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp b/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
index 3b33943fe56ecf63894974dceb437db5bf7e95ac..c90228ee5c39ef0b3ae8dd8baac649df575cb213 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
@@ -527,11 +527,11 @@ AccessibilityRole AXNodeObject::determineAccessibilityRole() {
return role;
if (getNode()->isElementNode()) {
Element* element = toElement(getNode());
- if (element->isInCanvasSubtree()) {
- getDocument()->updateStyleAndLayoutTreeForNode(element);
- if (element->isFocusable())
- return GroupRole;
- }
+ // A generic element with tabIndex explicitly set gets GroupRole.
+ // The layout checks for focusability aren't critical here; a false
+ // positive would be harmless.
+ if (element->isInCanvasSubtree() && element->supportsFocus())
+ return GroupRole;
}
return UnknownRole;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698