Index: Source/core/rendering/RenderListBox.cpp |
diff --git a/Source/core/rendering/RenderListBox.cpp b/Source/core/rendering/RenderListBox.cpp |
index 6ebf5ef11adc88b1d929470a72ab6eb3e649c998..7ff31f489b7bc41a83257c33b7d57e651692be36 100644 |
--- a/Source/core/rendering/RenderListBox.cpp |
+++ b/Source/core/rendering/RenderListBox.cpp |
@@ -624,7 +624,7 @@ void RenderListBox::valueChanged(unsigned listIndex) |
int RenderListBox::scrollSize(ScrollbarOrientation orientation) const |
{ |
- return ((orientation == VerticalScrollbar) && m_vBar) ? (m_vBar->totalSize() - m_vBar->visibleSize()) : 0; |
+ return orientation == VerticalScrollbar ? (numItems() - numVisibleItems()) : 0; |
} |
int RenderListBox::scrollPosition(Scrollbar*) const |
@@ -632,6 +632,13 @@ int RenderListBox::scrollPosition(Scrollbar*) const |
return m_indexOffset; |
} |
+IntPoint RenderListBox::scrollPosition() const |
+{ |
+ int x = 0; |
+ int y = m_indexOffset; |
+ return IntPoint(x, y); |
+} |
+ |
void RenderListBox::setScrollOffset(const IntPoint& offset) |
{ |
scrollTo(offset.y()); |