diff options
Diffstat (limited to 'WebCore/platform/Scrollbar.cpp')
-rw-r--r-- | WebCore/platform/Scrollbar.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/WebCore/platform/Scrollbar.cpp b/WebCore/platform/Scrollbar.cpp index 4eb2c4a..95f198e 100644 --- a/WebCore/platform/Scrollbar.cpp +++ b/WebCore/platform/Scrollbar.cpp @@ -26,6 +26,8 @@ #include "config.h" #include "Scrollbar.h" +#include "AccessibilityScrollbar.h" +#include "AXObjectCache.h" #include "EventHandler.h" #include "Frame.h" #include "FrameView.h" @@ -117,6 +119,18 @@ void Scrollbar::setSteps(int lineStep, int pageStep, int pixelsPerStep) bool Scrollbar::scroll(ScrollDirection direction, ScrollGranularity granularity, float multiplier) { +#if HAVE(ACCESSIBILITY) + if (AXObjectCache::accessibilityEnabled()) { + if (parent() && parent()->isFrameView()) { + Document* document = static_cast<FrameView*>(parent())->frame()->document(); + AXObjectCache* cache = document->axObjectCache(); + AccessibilityScrollbar* axObject = static_cast<AccessibilityScrollbar*>(cache->getOrCreate(ScrollBarRole)); + axObject->setScrollbar(this); + cache->postNotification(axObject, document, AXObjectCache::AXValueChanged, true); + } + } +#endif + float step = 0; if ((direction == ScrollUp && m_orientation == VerticalScrollbar) || (direction == ScrollLeft && m_orientation == HorizontalScrollbar)) step = -1; |