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

Unified Diff: Source/core/rendering/RenderLayerScrollableArea.cpp

Issue 708283002: RLSA needsLayout on customscrollbar thickness change. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: RenderBlock child needsLayout Created 6 years, 1 month 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
Index: Source/core/rendering/RenderLayerScrollableArea.cpp
diff --git a/Source/core/rendering/RenderLayerScrollableArea.cpp b/Source/core/rendering/RenderLayerScrollableArea.cpp
index d61144d26f7814ff6db932f4099e431361ea5cfc..3997296bcbc8577f08cb031a6472b9878ce5ab3a 100644
--- a/Source/core/rendering/RenderLayerScrollableArea.cpp
+++ b/Source/core/rendering/RenderLayerScrollableArea.cpp
@@ -87,6 +87,8 @@ RenderLayerScrollableArea::RenderLayerScrollableArea(RenderLayer& layer)
, m_nextTopmostScrollChild(0)
, m_topmostScrollChild(0)
, m_needsCompositedScrolling(false)
+ , m_horizontalScrollbarChanged(false)
+ , m_verticalScrollbarChanged(false)
, m_scrollCorner(nullptr)
, m_resizer(nullptr)
{
@@ -753,16 +755,35 @@ void RenderLayerScrollableArea::updateAfterStyleChange(const RenderStyle* oldSty
}
// FIXME: Need to detect a swap from custom to native scrollbars (and vice versa).
- if (m_hBar)
+ if (m_hBar) {
+ IntRect oldHrect = m_hBar->frameRect();
m_hBar->styleChanged();
- if (m_vBar)
+ if ((oldHrect != m_hBar->frameRect()) && m_hBar->isCustomScrollbar())
+ m_horizontalScrollbarChanged = true;
+ }
+ if (m_vBar) {
+ IntRect oldVrect = m_vBar->frameRect();
m_vBar->styleChanged();
+ if ((oldVrect != m_vBar->frameRect()) && m_vBar->isCustomScrollbar())
+ m_verticalScrollbarChanged = true;
+ }
updateScrollCornerStyle();
updateResizerAreaSet();
updateResizerStyle();
}
+bool RenderLayerScrollableArea::didCustomScrollbarRectChanged()
+{
+ bool scrollbarRectChanged = false;
+ if (m_verticalScrollbarChanged || m_horizontalScrollbarChanged) {
+ scrollbarRectChanged = true;
+ m_verticalScrollbarChanged = false;
+ m_horizontalScrollbarChanged = false;
+ }
+ return scrollbarRectChanged;
+}
+
bool RenderLayerScrollableArea::updateAfterCompositingChange()
{
layer()->updateScrollingStateAfterCompositingChange();
« Source/core/rendering/RenderBlock.cpp ('K') | « Source/core/rendering/RenderLayerScrollableArea.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698