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

Unified Diff: Source/core/paint/BlockPainter.cpp

Issue 654713003: Fix slimming paint clipping and add a debug fill color (Closed) Base URL: svn://svn.chromium.org/blink/trunk
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 | « no previous file | Source/core/paint/LineBoxListPainter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/BlockPainter.cpp
diff --git a/Source/core/paint/BlockPainter.cpp b/Source/core/paint/BlockPainter.cpp
index 86c024af508d0d679fa5a624830c35995eb6dda6..b92e7b3e5549a8e0a76197024be600725dcff16c 100644
--- a/Source/core/paint/BlockPainter.cpp
+++ b/Source/core/paint/BlockPainter.cpp
@@ -72,7 +72,7 @@ void BlockPainter::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
// z-index. We paint after we painted the background/border, so that the scrollbars will
// sit above the background/border.
if (m_renderBlock.hasOverflowClip() && m_renderBlock.style()->visibility() == VISIBLE && (phase == PaintPhaseBlockBackground || phase == PaintPhaseChildBlockBackground) && paintInfo.shouldPaintWithinRoot(&m_renderBlock) && !paintInfo.paintRootBackgroundOnly()) {
- PaintCommandRecorder recorder(paintInfo.context, &m_renderBlock, paintInfo.phase, m_renderBlock.visualOverflowRect());
+ PaintCommandRecorder recorder(paintInfo.context, &m_renderBlock, paintInfo.phase, pixelSnappedIntRect(adjustedPaintOffset, m_renderBlock.visualOverflowRect().size()));
m_renderBlock.layer()->scrollableArea()->paintOverflowControls(paintInfo.context, roundedIntPoint(adjustedPaintOffset), paintInfo.rect, false /* paintingOverlayControls */);
}
}
@@ -144,15 +144,17 @@ void BlockPainter::paintObject(PaintInfo& paintInfo, const LayoutPoint& paintOff
{
PaintPhase paintPhase = paintInfo.phase;
- LayoutRect bounds;
- if (RuntimeEnabledFeatures::slimmingPaintEnabled())
- bounds = m_renderBlock.visualOverflowRect();
-
// Adjust our painting position if we're inside a scrolled layer (e.g., an overflow:auto div).
LayoutPoint scrolledOffset = paintOffset;
if (m_renderBlock.hasOverflowClip())
scrolledOffset.move(-m_renderBlock.scrolledContentOffset());
+ LayoutRect bounds;
+ if (RuntimeEnabledFeatures::slimmingPaintEnabled()) {
+ bounds = m_renderBlock.visualOverflowRect();
+ bounds.moveBy(scrolledOffset);
+ }
+
// 1. paint background, borders etc
if ((paintPhase == PaintPhaseBlockBackground || paintPhase == PaintPhaseChildBlockBackground) && m_renderBlock.style()->visibility() == VISIBLE) {
if (m_renderBlock.hasBoxDecorationBackground()) {
« no previous file with comments | « no previous file | Source/core/paint/LineBoxListPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698