Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 1233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1244 case MenuButtonRole: | 1244 case MenuButtonRole: |
| 1245 case MenuItemRole: | 1245 case MenuItemRole: |
| 1246 case MenuItemCheckBoxRole: | 1246 case MenuItemCheckBoxRole: |
| 1247 case MenuItemRadioRole: | 1247 case MenuItemRadioRole: |
| 1248 case RadioButtonRole: | 1248 case RadioButtonRole: |
| 1249 case TabRole: | 1249 case TabRole: |
| 1250 return textUnderElement(); | 1250 return textUnderElement(); |
| 1251 // SVGRoots should not use the text under itself as a title. That could incl ude the text of objects like <text>. | 1251 // SVGRoots should not use the text under itself as a title. That could incl ude the text of objects like <text>. |
| 1252 case SVGRootRole: | 1252 case SVGRootRole: |
| 1253 return String(); | 1253 return String(); |
| 1254 case FigureRole: | |
| 1255 for (AXObject* child = firstChild(); child; child = child->nextSibling() ) { | |
| 1256 Node* childNode = child->node(); | |
| 1257 if (childNode && childNode->hasTagName(figcaptionTag)) | |
| 1258 return child->textUnderElement(); | |
|
dmazzoni
2014/11/10 17:16:10
I think this should be child->title() or child->ac
je_julie(Not used)
2014/11/11 15:38:51
Thanks for your idea.
I took the 2nd suggestion be
| |
| 1259 } | |
| 1254 default: | 1260 default: |
| 1255 break; | 1261 break; |
| 1256 } | 1262 } |
| 1257 | 1263 |
| 1258 if (isHeading() || isLink()) | 1264 if (isHeading() || isLink()) |
| 1259 return textUnderElement(); | 1265 return textUnderElement(); |
| 1260 | 1266 |
| 1261 // If it's focusable but it's not content editable or a known control type, then it will appear to | 1267 // If it's focusable but it's not content editable or a known control type, then it will appear to |
| 1262 // the user as a single atomic object, so we should use its text as the defa ult title. | 1268 // the user as a single atomic object, so we should use its text as the defa ult title. |
| 1263 if (isGenericFocusableElement()) | 1269 if (isGenericFocusableElement()) |
| (...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1774 float range = maxValueForRange() - minValueForRange(); | 1780 float range = maxValueForRange() - minValueForRange(); |
| 1775 float value = valueForRange(); | 1781 float value = valueForRange(); |
| 1776 | 1782 |
| 1777 value += range * (percentChange / 100); | 1783 value += range * (percentChange / 100); |
| 1778 setValue(String::number(value)); | 1784 setValue(String::number(value)); |
| 1779 | 1785 |
| 1780 axObjectCache()->postNotification(node(), AXObjectCacheImpl::AXValueChanged, true); | 1786 axObjectCache()->postNotification(node(), AXObjectCacheImpl::AXValueChanged, true); |
| 1781 } | 1787 } |
| 1782 | 1788 |
| 1783 } // namespace blink | 1789 } // namespace blink |
| OLD | NEW |