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

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

Issue 178903004: RenderLayerScrollableArea::updateScrollCornerStyle shouldn't do work if we're using overlay scrollb… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix the test Created 6 years, 9 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 | « no previous file | Source/platform/scroll/ScrollableArea.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderLayerScrollableArea.cpp
diff --git a/Source/core/rendering/RenderLayerScrollableArea.cpp b/Source/core/rendering/RenderLayerScrollableArea.cpp
index 82ca8532c9a99d4b8449bf055e41d00f6aa71b64..9eae1fb6c6c18d68726b43b7b8b3203382d2101e 100644
--- a/Source/core/rendering/RenderLayerScrollableArea.cpp
+++ b/Source/core/rendering/RenderLayerScrollableArea.cpp
@@ -601,6 +601,9 @@ void RenderLayerScrollableArea::updateAfterLayout()
if (m_box->hasAutoVerticalScrollbar())
setHasVerticalScrollbar(hasVerticalOverflow);
+ if (hasVerticalOverflow || hasHorizontalOverflow)
+ updateScrollCornerStyle();
+
layer()->updateSelfPaintingLayer();
// Force an update since we know the scrollbars have changed things.
@@ -958,6 +961,11 @@ bool RenderLayerScrollableArea::scrollsOverflow() const
void RenderLayerScrollableArea::updateScrollCornerStyle()
{
+ if (!m_scrollCorner && !hasScrollbar())
+ return;
+ if (!m_scrollCorner && hasOverlayScrollbars())
+ return;
+
RenderObject* actualRenderer = rendererForScrollbar(m_box);
RefPtr<RenderStyle> corner = m_box->hasOverflowClip() ? actualRenderer->getUncachedPseudoStyle(PseudoStyleRequest(SCROLLBAR_CORNER), actualRenderer->style()) : PassRefPtr<RenderStyle>(nullptr);
if (corner) {
« no previous file with comments | « no previous file | Source/platform/scroll/ScrollableArea.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698