+2011-10-06 Dan Bernstein <mitz@apple.com>
+
+ <rdar://problem/9717490> Flash of white when navigating daringfireball.net
+ https://bugs.webkit.org/show_bug.cgi?id=69581
+
+ Reviewed by Darin Adler.
+
+ * platform/ScrollView.cpp:
+ (WebCore::ScrollView::updateScrollbars): Moved the calls to Scrollbar::setEnabled() into the code
+ section where invalidation is suppressed if necessary, so that they do not trigger premature invalidation.
+
2011-10-06 Dan Bernstein <mitz@apple.com>
Added a comment explaining code added in r96834.
if (m_horizontalScrollbar) {
int clientWidth = visibleWidth();
- m_horizontalScrollbar->setEnabled(contentsWidth() > clientWidth);
int pageStep = max(max<int>(clientWidth * Scrollbar::minFractionToStepWhenPaging(), clientWidth - Scrollbar::maxOverlapBetweenPages()), 1);
IntRect oldRect(m_horizontalScrollbar->frameRect());
IntRect hBarRect = IntRect(0,
if (m_scrollbarsSuppressed)
m_horizontalScrollbar->setSuppressInvalidation(true);
+ m_horizontalScrollbar->setEnabled(contentsWidth() > clientWidth);
m_horizontalScrollbar->setSteps(Scrollbar::pixelsPerLineStep(), pageStep);
m_horizontalScrollbar->setProportion(clientWidth, contentsWidth());
if (m_scrollbarsSuppressed)
if (m_verticalScrollbar) {
int clientHeight = visibleHeight();
- m_verticalScrollbar->setEnabled(contentsHeight() > clientHeight);
int pageStep = max(max<int>(clientHeight * Scrollbar::minFractionToStepWhenPaging(), clientHeight - Scrollbar::maxOverlapBetweenPages()), 1);
IntRect oldRect(m_verticalScrollbar->frameRect());
IntRect vBarRect = IntRect(width() - m_verticalScrollbar->width(),
if (m_scrollbarsSuppressed)
m_verticalScrollbar->setSuppressInvalidation(true);
+ m_verticalScrollbar->setEnabled(contentsHeight() > clientHeight);
m_verticalScrollbar->setSteps(Scrollbar::pixelsPerLineStep(), pageStep);
m_verticalScrollbar->setProportion(clientHeight, contentsHeight());
if (m_scrollbarsSuppressed)