Index: Source/core/frame/FrameView.cpp |
diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp |
index abb60add3edffd3c3e6247d03568c32d8be070da..aafead6a7374efcad6141d23cc40eb660e8dbdc0 100644 |
--- a/Source/core/frame/FrameView.cpp |
+++ b/Source/core/frame/FrameView.cpp |
@@ -3450,6 +3450,7 @@ void FrameView::computeScrollbarExistence(bool& newHasHorizontalScrollbar, bool& |
void FrameView::updateScrollbarGeometry() |
{ |
+ bool scrollbarExistenceChanged = false; |
pdr.
2014/10/14 22:02:21
Is the scrollbar existence changing, or just the s
|
if (m_horizontalScrollbar) { |
int clientWidth = visibleWidth(); |
IntRect oldRect(m_horizontalScrollbar->frameRect()); |
@@ -3461,6 +3462,7 @@ void FrameView::updateScrollbarGeometry() |
if (!m_scrollbarsSuppressed && oldRect != m_horizontalScrollbar->frameRect()) |
m_horizontalScrollbar->invalidate(); |
+ oldRect = m_horizontalScrollbar->frameRect(); |
pdr.
2014/10/14 22:02:21
Why do you need to store the oldRect here instead
|
if (m_scrollbarsSuppressed) |
m_horizontalScrollbar->setSuppressInvalidation(true); |
m_horizontalScrollbar->setEnabled(contentsWidth() > clientWidth); |
@@ -3468,6 +3470,8 @@ void FrameView::updateScrollbarGeometry() |
m_horizontalScrollbar->offsetDidChange(); |
if (m_scrollbarsSuppressed) |
m_horizontalScrollbar->setSuppressInvalidation(false); |
+ if (oldRect != m_horizontalScrollbar->frameRect()) |
+ scrollbarExistenceChanged = true; |
} |
if (m_verticalScrollbar) { |
@@ -3481,6 +3485,7 @@ void FrameView::updateScrollbarGeometry() |
if (!m_scrollbarsSuppressed && oldRect != m_verticalScrollbar->frameRect()) |
m_verticalScrollbar->invalidate(); |
+ oldRect = m_verticalScrollbar->frameRect(); |
if (m_scrollbarsSuppressed) |
m_verticalScrollbar->setSuppressInvalidation(true); |
m_verticalScrollbar->setEnabled(contentsHeight() > clientHeight); |
@@ -3488,7 +3493,12 @@ void FrameView::updateScrollbarGeometry() |
m_verticalScrollbar->offsetDidChange(); |
if (m_scrollbarsSuppressed) |
m_verticalScrollbar->setSuppressInvalidation(false); |
+ if (oldRect != m_verticalScrollbar->frameRect()) |
pdr.
2014/10/14 22:02:21
I don't understand the values we're seeing here. O
|
+ scrollbarExistenceChanged = true; |
} |
+ |
+ if (scrollbarExistenceChanged) |
+ scrollbarExistenceDidChange(); |
} |
IntRect FrameView::adjustScrollbarRectForResizer(const IntRect& rect, Scrollbar* scrollbar) |