Chromium Code Reviews| Index: Source/modules/accessibility/AXNodeObject.cpp |
| diff --git a/Source/modules/accessibility/AXNodeObject.cpp b/Source/modules/accessibility/AXNodeObject.cpp |
| index c9294b0ff1f2039b98b16582f4c5c83e50ccc39a..6b6281ad409623bda294794dd02f0029379dfcfe 100644 |
| --- a/Source/modules/accessibility/AXNodeObject.cpp |
| +++ b/Source/modules/accessibility/AXNodeObject.cpp |
| @@ -2081,8 +2081,12 @@ void AXNodeObject::changeValueByPercent(float percentChange) |
| { |
| float range = maxValueForRange() - minValueForRange(); |
| float value = valueForRange(); |
| + float step = range * (percentChange / 100); |
| - value += range * (percentChange / 100); |
|
dmazzoni
2015/04/09 15:11:24
i'm not sure I quite understand why this code didn
|
| + if (fabs(step) < 1) |
| + step = percentChange > 0 ? 1 : -1; |
| + |
| + value += step; |
| setValue(String::number(value)); |
| axObjectCache()->postNotification(node(), AXObjectCacheImpl::AXValueChanged); |