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

Unified Diff: third_party/WebKit/Source/core/paint/PaintLayer.cpp

Issue 2467693002: Implement overlay scrollbar fade out for non-composited scrollers. (Closed)
Patch Set: skobes@ + dtapuska@ comments addressed Created 4 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: third_party/WebKit/Source/core/paint/PaintLayer.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayer.cpp b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
index 01825db216bfcbc45fe7b06d16d95043328839c5..246945079e83a231858196dcb2214309413a42c9 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
@@ -800,12 +800,15 @@ bool PaintLayer::update3DTransformedDescendantStatus() {
void PaintLayer::updateLayerPosition() {
LayoutPoint localPoint;
+ bool didResize = false;
if (layoutObject()->isInline() && layoutObject()->isLayoutInline()) {
LayoutInline* inlineFlow = toLayoutInline(layoutObject());
IntRect lineBox = enclosingIntRect(inlineFlow->linesBoundingBox());
m_size = lineBox.size();
} else if (LayoutBox* box = layoutBox()) {
- m_size = pixelSnappedIntSize(box->size(), box->location());
+ IntSize newSize = pixelSnappedIntSize(box->size(), box->location());
+ didResize = newSize != m_size;
+ m_size = newSize;
localPoint.moveBy(box->topLeftLocation());
}
@@ -863,6 +866,9 @@ void PaintLayer::updateLayerPosition() {
m_location = localPoint;
+ if (m_scrollableArea && didResize)
+ m_scrollableArea->visibleSizeChanged();
+
#if DCHECK_IS_ON()
m_needsPositionUpdate = false;
#endif

Powered by Google App Engine
This is Rietveld 408576698