Index: Source/WebCore/rendering/RenderScrollbarPart.cpp |
=================================================================== |
--- Source/WebCore/rendering/RenderScrollbarPart.cpp (revision 126824) |
+++ Source/WebCore/rendering/RenderScrollbarPart.cpp (working copy) |
@@ -91,7 +91,9 @@ |
if (!m_scrollbar->owningRenderer()) |
return; |
RenderView* renderView = view(); |
- int visibleSize = m_scrollbar->owningRenderer()->width() - m_scrollbar->owningRenderer()->borderLeft() - m_scrollbar->owningRenderer()->borderRight(); |
+ // FIXME: We are querying layout information but nothing guarantees that it's up-to-date, especially since we are called at style change. |
+ // FIXME: Querying the style's border information doesn't work on table cells with collapsing borders. |
+ int visibleSize = m_scrollbar->owningRenderer()->width() - m_scrollbar->owningRenderer()->style()->borderLeftWidth() - m_scrollbar->owningRenderer()->style()->borderRightWidth(); |
int w = calcScrollbarThicknessUsing(MainOrPreferredSize, style()->width(), visibleSize, renderView); |
int minWidth = calcScrollbarThicknessUsing(MinSize, style()->minWidth(), visibleSize, renderView); |
int maxWidth = style()->maxWidth().isUndefined() ? w : calcScrollbarThicknessUsing(MaxSize, style()->maxWidth(), visibleSize, renderView); |
@@ -107,7 +109,9 @@ |
if (!m_scrollbar->owningRenderer()) |
return; |
RenderView* renderView = view(); |
- int visibleSize = m_scrollbar->owningRenderer()->height() - m_scrollbar->owningRenderer()->borderTop() - m_scrollbar->owningRenderer()->borderBottom(); |
+ // FIXME: We are querying layout information but nothing guarantees that it's up-to-date, especially since we are called at style change. |
+ // FIXME: Querying the style's border information doesn't work on table cells with collapsing borders. |
+ int visibleSize = m_scrollbar->owningRenderer()->height() - m_scrollbar->owningRenderer()->style()->borderTopWidth() - m_scrollbar->owningRenderer()->style()->borderBottomWidth(); |
int h = calcScrollbarThicknessUsing(MainOrPreferredSize, style()->height(), visibleSize, renderView); |
int minHeight = calcScrollbarThicknessUsing(MinSize, style()->minHeight(), visibleSize, renderView); |
int maxHeight = style()->maxHeight().isUndefined() ? h : calcScrollbarThicknessUsing(MaxSize, style()->maxHeight(), visibleSize, renderView); |