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

Unified Diff: Source/core/frame/FrameView.cpp

Issue 503583002: Fixed Inconsistent behaviour of custom-scrollbar (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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/fast/events/scale-document-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « LayoutTests/fast/events/scale-document-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698