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

Side by Side Diff: Source/modules/accessibility/AXObject.cpp

Issue 1045693002: Expose multiline attribute from blink (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: modifying ariaIsMultiline to isMultiline to support html textarea element Created 5 years, 8 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
« no previous file with comments | « Source/modules/accessibility/AXObject.h ('k') | Source/web/AssertMatchingEnums.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008, 2009, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2009, 2011 Apple 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 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 if (equalIgnoringCase(result, "mixed")) { 511 if (equalIgnoringCase(result, "mixed")) {
512 AccessibilityRole role = ariaRoleAttribute(); 512 AccessibilityRole role = ariaRoleAttribute();
513 if (role == RadioButtonRole || role == MenuItemRadioRole || role == Swit chRole) 513 if (role == RadioButtonRole || role == MenuItemRadioRole || role == Swit chRole)
514 return ButtonStateOff; 514 return ButtonStateOff;
515 return ButtonStateMixed; 515 return ButtonStateMixed;
516 } 516 }
517 517
518 return ButtonStateOff; 518 return ButtonStateOff;
519 } 519 }
520 520
521 bool AXObject::ariaIsMultiline() const 521 bool AXObject::isMultiline() const
dmazzoni 2015/03/30 06:17:54 Let's do two more things while you're at it so tha
shreeramk 2015/03/30 06:36:28 You mean to say this?? if (isNativeTextControl() &
522 { 522 {
523 Node* node = this->node();
524 if (!node)
525 return false;
526
527 if (isHTMLTextAreaElement(*node))
528 return true;
529
523 return equalIgnoringCase(getAttribute(aria_multilineAttr), "true"); 530 return equalIgnoringCase(getAttribute(aria_multilineAttr), "true");
524 } 531 }
525 532
526 bool AXObject::ariaPressedIsPresent() const 533 bool AXObject::ariaPressedIsPresent() const
527 { 534 {
528 return !getAttribute(aria_pressedAttr).isEmpty(); 535 return !getAttribute(aria_pressedAttr).isEmpty();
529 } 536 }
530 537
531 bool AXObject::supportsARIAAttributes() const 538 bool AXObject::supportsARIAAttributes() const
532 { 539 {
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
1121 } 1128 }
1122 1129
1123 const AtomicString& AXObject::roleName(AccessibilityRole role) 1130 const AtomicString& AXObject::roleName(AccessibilityRole role)
1124 { 1131 {
1125 static const Vector<AtomicString>* roleNameVector = createRoleNameVector(); 1132 static const Vector<AtomicString>* roleNameVector = createRoleNameVector();
1126 1133
1127 return roleNameVector->at(role); 1134 return roleNameVector->at(role);
1128 } 1135 }
1129 1136
1130 } // namespace blink 1137 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/accessibility/AXObject.h ('k') | Source/web/AssertMatchingEnums.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698