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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 86 | 86 |
| 87 if (isHTMLInputElement(*node)) | 87 if (isHTMLInputElement(*node)) |
| 88 return toHTMLInputElement(*node).value(); | 88 return toHTMLInputElement(*node).value(); |
| 89 | 89 |
| 90 if (node->isHTMLElement()) { | 90 if (node->isHTMLElement()) { |
| 91 const AtomicString& alt = toHTMLElement(node)->getAttribute(altAttr); | 91 const AtomicString& alt = toHTMLElement(node)->getAttribute(altAttr); |
| 92 if (!alt.isEmpty()) | 92 if (!alt.isEmpty()) |
| 93 return alt; | 93 return alt; |
| 94 } | 94 } |
| 95 | 95 |
| 96 if (node->isHTMLElement()) { | |
|
dmazzoni
2015/01/27 06:40:46
Just combine this into the block above:
if (node-
| |
| 97 const AtomicString& title = toHTMLElement(node)->getAttribute(titleAttr) ; | |
| 98 if (!title.isEmpty()) | |
| 99 return title; | |
| 100 } | |
| 101 | |
| 96 return String(); | 102 return String(); |
| 97 } | 103 } |
| 98 | 104 |
| 99 String AXNodeObject::accessibilityDescriptionForElements(WillBeHeapVector<RawPtr WillBeMember<Element> > &elements) const | 105 String AXNodeObject::accessibilityDescriptionForElements(WillBeHeapVector<RawPtr WillBeMember<Element> > &elements) const |
| 100 { | 106 { |
| 101 StringBuilder builder; | 107 StringBuilder builder; |
| 102 unsigned size = elements.size(); | 108 unsigned size = elements.size(); |
| 103 for (unsigned i = 0; i < size; ++i) { | 109 for (unsigned i = 0; i < size; ++i) { |
| 104 Element* idElement = elements[i]; | 110 Element* idElement = elements[i]; |
| 105 | 111 |
| (...skipping 1838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1944 float range = maxValueForRange() - minValueForRange(); | 1950 float range = maxValueForRange() - minValueForRange(); |
| 1945 float value = valueForRange(); | 1951 float value = valueForRange(); |
| 1946 | 1952 |
| 1947 value += range * (percentChange / 100); | 1953 value += range * (percentChange / 100); |
| 1948 setValue(String::number(value)); | 1954 setValue(String::number(value)); |
| 1949 | 1955 |
| 1950 axObjectCache()->postNotification(node(), AXObjectCacheImpl::AXValueChanged, true); | 1956 axObjectCache()->postNotification(node(), AXObjectCacheImpl::AXValueChanged, true); |
| 1951 } | 1957 } |
| 1952 | 1958 |
| 1953 } // namespace blink | 1959 } // namespace blink |
| OLD | NEW |