Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2010 Apple 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 63 { | 63 { |
| 64 AXObject* parent = parentObject(); | 64 AXObject* parent = parentObject(); |
| 65 if (!parent) | 65 if (!parent) |
| 66 return 0; | 66 return 0; |
| 67 return parent->document(); | 67 return parent->document(); |
| 68 } | 68 } |
| 69 | 69 |
| 70 AccessibilityOrientation AXScrollbar::orientation() const | 70 AccessibilityOrientation AXScrollbar::orientation() const |
| 71 { | 71 { |
| 72 if (!m_scrollbar) | 72 if (!m_scrollbar) |
| 73 return AccessibilityOrientationHorizontal; | 73 return AccessibilityOrientationHorizontal; |
|
dmazzoni
2014/11/26 18:51:47
I think this should be AccessibilityOrientationVer
| |
| 74 | 74 |
| 75 if (m_scrollbar->orientation() == HorizontalScrollbar) | 75 if (m_scrollbar->orientation() == HorizontalScrollbar) |
| 76 return AccessibilityOrientationHorizontal; | 76 return AccessibilityOrientationHorizontal; |
| 77 if (m_scrollbar->orientation() == VerticalScrollbar) | 77 if (m_scrollbar->orientation() == VerticalScrollbar) |
| 78 return AccessibilityOrientationVertical; | 78 return AccessibilityOrientationVertical; |
| 79 | 79 |
| 80 return AccessibilityOrientationHorizontal; | 80 return AccessibilityOrientationVertical; |
| 81 } | 81 } |
| 82 | 82 |
| 83 bool AXScrollbar::isEnabled() const | 83 bool AXScrollbar::isEnabled() const |
| 84 { | 84 { |
| 85 if (!m_scrollbar) | 85 if (!m_scrollbar) |
| 86 return false; | 86 return false; |
| 87 return m_scrollbar->enabled(); | 87 return m_scrollbar->enabled(); |
| 88 } | 88 } |
| 89 | 89 |
| 90 float AXScrollbar::valueForRange() const | 90 float AXScrollbar::valueForRange() const |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 101 return; | 101 return; |
| 102 | 102 |
| 103 if (!m_scrollbar->scrollableArea()) | 103 if (!m_scrollbar->scrollableArea()) |
| 104 return; | 104 return; |
| 105 | 105 |
| 106 float newValue = value * m_scrollbar->maximum(); | 106 float newValue = value * m_scrollbar->maximum(); |
| 107 m_scrollbar->scrollableArea()->scrollToOffsetWithoutAnimation(m_scrollbar->o rientation(), newValue); | 107 m_scrollbar->scrollableArea()->scrollToOffsetWithoutAnimation(m_scrollbar->o rientation(), newValue); |
| 108 } | 108 } |
| 109 | 109 |
| 110 } // namespace blink | 110 } // namespace blink |
| OLD | NEW |