| Index: Source/WebCore/platform/Scrollbar.cpp
|
| ===================================================================
|
| --- Source/WebCore/platform/Scrollbar.cpp (revision 78504)
|
| +++ Source/WebCore/platform/Scrollbar.cpp (working copy)
|
| @@ -196,7 +196,7 @@
|
| }
|
|
|
| // Handle the arrows and track.
|
| - if (scrollableArea()->scroll(pressedPartScrollDirection(), pressedPartScrollGranularity()))
|
| + if (m_scrollableArea && m_scrollableArea->scroll(pressedPartScrollDirection(), pressedPartScrollGranularity()))
|
| startTimerIfNeeded(delay);
|
| }
|
|
|
| @@ -268,7 +268,8 @@
|
|
|
| if (delta) {
|
| float newPosition = static_cast<float>(thumbPos + delta) * maximum() / (trackLen - thumbLen);
|
| - scrollableArea()->scrollToOffsetWithoutAnimation(m_orientation, newPosition);
|
| + if (m_scrollableArea)
|
| + m_scrollableArea->scrollToOffsetWithoutAnimation(m_orientation, newPosition);
|
| }
|
| }
|
|
|
| @@ -300,9 +301,10 @@
|
| bool Scrollbar::mouseMoved(const PlatformMouseEvent& evt)
|
| {
|
| if (m_pressedPart == ThumbPart) {
|
| - if (theme()->shouldSnapBackToDragOrigin(this, evt))
|
| - scrollableArea()->scrollToOffsetWithoutAnimation(m_orientation, m_dragOrigin);
|
| - else {
|
| + if (theme()->shouldSnapBackToDragOrigin(this, evt)) {
|
| + if (m_scrollableArea)
|
| + m_scrollableArea->scrollToOffsetWithoutAnimation(m_orientation, m_dragOrigin);
|
| + } else {
|
| moveThumb(m_orientation == HorizontalScrollbar ?
|
| convertFromContainingWindow(evt.pos()).x() :
|
| convertFromContainingWindow(evt.pos()).y());
|
|
|