Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: Source/modules/accessibility/AXScrollbar.cpp

Issue 730113003: Introduce new API orientation() to expose aria-orientation correctly. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: incorporating comments Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
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;
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698