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

Unified Diff: Source/core/layout/LayerScrollableArea.cpp

Issue 949303002: Fix invalidation during painting of scrollbars (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: NeedsRebaseline Created 5 years, 10 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 | « Source/core/layout/LayerScrollableArea.h ('k') | Source/core/layout/LayoutBox.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayerScrollableArea.cpp
diff --git a/Source/core/layout/LayerScrollableArea.cpp b/Source/core/layout/LayerScrollableArea.cpp
index ca367a75a1394912d248218973fe38601df50925..ca81a656c3976c0156e07a8e9e1b4b0478d825f7 100644
--- a/Source/core/layout/LayerScrollableArea.cpp
+++ b/Source/core/layout/LayerScrollableArea.cpp
@@ -713,10 +713,8 @@ void LayerScrollableArea::updateAfterLayout()
bool hasOverflow = hasScrollableHorizontalOverflow() || hasScrollableVerticalOverflow();
updateScrollableAreaSet(hasOverflow);
- if (hasOverflow) {
- DisableCompositingQueryAsserts disabler;
- positionOverflowControls(IntSize());
- }
+ DisableCompositingQueryAsserts disabler;
+ positionOverflowControls();
}
bool LayerScrollableArea::hasHorizontalOverflow() const
@@ -1014,23 +1012,17 @@ int LayerScrollableArea::horizontalScrollbarHeight(OverlayScrollbarSizeRelevancy
return m_hBar->height();
}
-void LayerScrollableArea::positionOverflowControls(const IntSize& offsetFromRoot)
+void LayerScrollableArea::positionOverflowControls()
{
if (!hasScrollbar() && !box().canResize())
return;
const IntRect borderBox = box().pixelSnappedBorderBoxRect();
- if (Scrollbar* verticalScrollbar = this->verticalScrollbar()) {
- IntRect vBarRect = rectForVerticalScrollbar(borderBox);
- vBarRect.move(offsetFromRoot);
- verticalScrollbar->setFrameRect(vBarRect);
- }
+ if (Scrollbar* verticalScrollbar = this->verticalScrollbar())
+ verticalScrollbar->setFrameRect(rectForVerticalScrollbar(borderBox));
- if (Scrollbar* horizontalScrollbar = this->horizontalScrollbar()) {
- IntRect hBarRect = rectForHorizontalScrollbar(borderBox);
- hBarRect.move(offsetFromRoot);
- horizontalScrollbar->setFrameRect(hBarRect);
- }
+ if (Scrollbar* horizontalScrollbar = this->horizontalScrollbar())
+ horizontalScrollbar->setFrameRect(rectForHorizontalScrollbar(borderBox));
const IntRect& scrollCorner = scrollCornerRect();
if (m_scrollCorner)
@@ -1043,7 +1035,7 @@ void LayerScrollableArea::positionOverflowControls(const IntSize& offsetFromRoot
// controls get correctly positioned on a compositor update. For now, conservatively
// leaving this unchanged.
if (layer()->hasCompositedLayerMapping())
- layer()->compositedLayerMapping()->positionOverflowControlsLayers(offsetFromRoot);
+ layer()->compositedLayerMapping()->positionOverflowControlsLayers();
}
void LayerScrollableArea::updateScrollCornerStyle()
« no previous file with comments | « Source/core/layout/LayerScrollableArea.h ('k') | Source/core/layout/LayoutBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698