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

Side by Side Diff: Source/core/accessibility/AccessibilityNodeObject.cpp

Issue 22331005: Clean up accessibility enums for use in Chromium. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: reupload Created 7 years, 4 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) 2012, Google Inc. All rights reserved. 2 * Copyright (C) 2012, 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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 if (!node()) 168 if (!node())
169 return UnknownRole; 169 return UnknownRole;
170 170
171 m_ariaRole = determineAriaRoleAttribute(); 171 m_ariaRole = determineAriaRoleAttribute();
172 172
173 AccessibilityRole ariaRole = ariaRoleAttribute(); 173 AccessibilityRole ariaRole = ariaRoleAttribute();
174 if (ariaRole != UnknownRole) 174 if (ariaRole != UnknownRole)
175 return ariaRole; 175 return ariaRole;
176 176
177 if (node()->isLink()) 177 if (node()->isLink())
178 return WebCoreLinkRole; 178 return LinkRole;
179 if (node()->isTextNode()) 179 if (node()->isTextNode())
180 return StaticTextRole; 180 return StaticTextRole;
181 if (node()->hasTagName(buttonTag)) 181 if (node()->hasTagName(buttonTag))
182 return buttonRoleType(); 182 return buttonRoleType();
183 if (node()->hasTagName(inputTag)) { 183 if (node()->hasTagName(inputTag)) {
184 HTMLInputElement* input = toHTMLInputElement(node()); 184 HTMLInputElement* input = toHTMLInputElement(node());
185 if (input->isCheckbox()) 185 if (input->isCheckbox())
186 return CheckBoxRole; 186 return CheckBoxRole;
187 if (input->isRadioButton()) 187 if (input->isRadioButton())
188 return RadioButtonRole; 188 return RadioButtonRole;
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 return false; 517 return false;
518 518
519 if (roleValue() == ButtonRole && node->hasTagName(inputTag)) 519 if (roleValue() == ButtonRole && node->hasTagName(inputTag))
520 return toHTMLInputElement(node)->isImageButton(); 520 return toHTMLInputElement(node)->isImageButton();
521 521
522 return false; 522 return false;
523 } 523 }
524 524
525 bool AccessibilityNodeObject::isLink() const 525 bool AccessibilityNodeObject::isLink() const
526 { 526 {
527 return roleValue() == WebCoreLinkRole; 527 return roleValue() == LinkRole;
528 } 528 }
529 529
530 bool AccessibilityNodeObject::isMenu() const 530 bool AccessibilityNodeObject::isMenu() const
531 { 531 {
532 return roleValue() == MenuRole; 532 return roleValue() == MenuRole;
533 } 533 }
534 534
535 bool AccessibilityNodeObject::isMenuButton() const 535 bool AccessibilityNodeObject::isMenuButton() const
536 { 536 {
537 return roleValue() == MenuButtonRole; 537 return roleValue() == MenuButtonRole;
(...skipping 1132 matching lines...) Expand 10 before | Expand all | Expand 10 after
1670 useTextUnderElement = true; 1670 useTextUnderElement = true;
1671 1671
1672 if (useTextUnderElement) { 1672 if (useTextUnderElement) {
1673 String text = textUnderElement(); 1673 String text = textUnderElement();
1674 if (!text.isEmpty()) 1674 if (!text.isEmpty())
1675 textOrder.append(AccessibilityText(text, ChildrenText)); 1675 textOrder.append(AccessibilityText(text, ChildrenText));
1676 } 1676 }
1677 } 1677 }
1678 1678
1679 } // namespace WebCore 1679 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698