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

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

Issue 2894983002: An unknown role is considered a bug, should never occur (Closed)
Patch Set: Remove useless comment Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
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 eb389e086c2e0d601ae68e914321c49eadd939c2..06bfa6b6b2dd27a62597a95f94e528a3e4d973e2 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
@@ -685,17 +685,7 @@ AccessibilityRole AXNodeObject::DetermineAccessibilityRole() {
return kStaticTextRole;
AccessibilityRole role = NativeAccessibilityRoleIgnoringAria();
- if (role != kUnknownRole)
- return role;
- if (GetNode()->IsElementNode()) {
- Element* element = ToElement(GetNode());
- // 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 kGenericContainerRole;
- }
- return kUnknownRole;
+ return role == kUnknownRole ? kGenericContainerRole : role;
}
AccessibilityRole AXNodeObject::DetermineAriaRoleAttribute() const {

Powered by Google App Engine
This is Rietveld 408576698