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

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

Issue 753663003: Input type file should return ButtonRole. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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 | « no previous file | Source/modules/accessibility/AXObject.h » ('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) 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 1516 matching lines...) Expand 10 before | Expand all | Expand 10 after
1527 } 1527 }
1528 1528
1529 Element* AXNodeObject::actionElement() const 1529 Element* AXNodeObject::actionElement() const
1530 { 1530 {
1531 Node* node = this->node(); 1531 Node* node = this->node();
1532 if (!node) 1532 if (!node)
1533 return 0; 1533 return 0;
1534 1534
1535 if (isHTMLInputElement(*node)) { 1535 if (isHTMLInputElement(*node)) {
1536 HTMLInputElement& input = toHTMLInputElement(*node); 1536 HTMLInputElement& input = toHTMLInputElement(*node);
1537 if (!input.isDisabledFormControl() && (isCheckboxOrRadio() || input.isTe xtButton())) 1537 if (!input.isDisabledFormControl() && (isCheckboxOrRadio() || input.isTe xtButton()
1538 || input.type() == InputTypeNames::file))
1538 return &input; 1539 return &input;
1539 } else if (isHTMLButtonElement(*node)) { 1540 } else if (isHTMLButtonElement(*node)) {
1540 return toElement(node); 1541 return toElement(node);
1541 } 1542 }
1542 1543
1543 if (isFileUploadButton())
1544 return toElement(node);
1545
1546 if (AXObject::isARIAInput(ariaRoleAttribute())) 1544 if (AXObject::isARIAInput(ariaRoleAttribute()))
1547 return toElement(node); 1545 return toElement(node);
1548 1546
1549 if (isImageButton()) 1547 if (isImageButton())
1550 return toElement(node); 1548 return toElement(node);
1551 1549
1552 if (isHTMLSelectElement(*node)) 1550 if (isHTMLSelectElement(*node))
1553 return toElement(node); 1551 return toElement(node);
1554 1552
1555 switch (roleValue()) { 1553 switch (roleValue()) {
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
1825 float range = maxValueForRange() - minValueForRange(); 1823 float range = maxValueForRange() - minValueForRange();
1826 float value = valueForRange(); 1824 float value = valueForRange();
1827 1825
1828 value += range * (percentChange / 100); 1826 value += range * (percentChange / 100);
1829 setValue(String::number(value)); 1827 setValue(String::number(value));
1830 1828
1831 axObjectCache()->postNotification(node(), AXObjectCacheImpl::AXValueChanged, true); 1829 axObjectCache()->postNotification(node(), AXObjectCacheImpl::AXValueChanged, true);
1832 } 1830 }
1833 1831
1834 } // namespace blink 1832 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/modules/accessibility/AXObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698