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

Unified Diff: Source/WebCore/rendering/RenderScrollbarPart.cpp

Issue 10875081: Merge 126591 - Crash in RenderTableCell::borderTop() due to custom scrollbars after r124168 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1229/
Patch Set: Created 8 years, 4 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/scrollbars/custom-scrollbar-table-cell-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « LayoutTests/scrollbars/custom-scrollbar-table-cell-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698