| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). | 2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
| 3 * | 3 * |
| 4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
| 6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
| 7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
| 8 * | 8 * |
| 9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 | 47 |
| 48 bool AXProgressIndicator::ComputeAccessibilityIsIgnored( | 48 bool AXProgressIndicator::ComputeAccessibilityIsIgnored( |
| 49 IgnoredReasons* ignored_reasons) const { | 49 IgnoredReasons* ignored_reasons) const { |
| 50 return AccessibilityIsIgnoredByDefault(ignored_reasons); | 50 return AccessibilityIsIgnoredByDefault(ignored_reasons); |
| 51 } | 51 } |
| 52 | 52 |
| 53 float AXProgressIndicator::ValueForRange() const { | 53 float AXProgressIndicator::ValueForRange() const { |
| 54 if (HasAttribute(aria_valuenowAttr)) | 54 if (HasAttribute(aria_valuenowAttr)) |
| 55 return GetAttribute(aria_valuenowAttr).ToFloat(); | 55 return GetAttribute(aria_valuenowAttr).ToFloat(); |
| 56 | 56 |
| 57 if (GetElement()->position() >= 0) | 57 if (GetProgressElement()->position() >= 0) |
| 58 return clampTo<float>(GetElement()->value()); | 58 return clampTo<float>(GetProgressElement()->value()); |
| 59 // Indeterminate progress bar should return 0. | 59 // Indeterminate progress bar should return 0. |
| 60 return 0.0f; | 60 return 0.0f; |
| 61 } | 61 } |
| 62 | 62 |
| 63 float AXProgressIndicator::MaxValueForRange() const { | 63 float AXProgressIndicator::MaxValueForRange() const { |
| 64 if (HasAttribute(aria_valuemaxAttr)) | 64 if (HasAttribute(aria_valuemaxAttr)) |
| 65 return GetAttribute(aria_valuemaxAttr).ToFloat(); | 65 return GetAttribute(aria_valuemaxAttr).ToFloat(); |
| 66 | 66 |
| 67 return clampTo<float>(GetElement()->max()); | 67 return clampTo<float>(GetProgressElement()->max()); |
| 68 } | 68 } |
| 69 | 69 |
| 70 float AXProgressIndicator::MinValueForRange() const { | 70 float AXProgressIndicator::MinValueForRange() const { |
| 71 if (HasAttribute(aria_valueminAttr)) | 71 if (HasAttribute(aria_valueminAttr)) |
| 72 return GetAttribute(aria_valueminAttr).ToFloat(); | 72 return GetAttribute(aria_valueminAttr).ToFloat(); |
| 73 | 73 |
| 74 return 0.0f; | 74 return 0.0f; |
| 75 } | 75 } |
| 76 | 76 |
| 77 HTMLProgressElement* AXProgressIndicator::GetElement() const { | 77 HTMLProgressElement* AXProgressIndicator::GetProgressElement() const { |
| 78 return ToLayoutProgress(layout_object_)->ProgressElement(); | 78 return ToLayoutProgress(layout_object_)->ProgressElement(); |
| 79 } | 79 } |
| 80 | 80 |
| 81 } // namespace blink | 81 } // namespace blink |
| OLD | NEW |