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

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

Issue 1610063002: Revert of Remove PaintInfo's paintingRoot (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
Index: third_party/WebKit/Source/core/paint/BlockPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/BlockPainter.cpp b/third_party/WebKit/Source/core/paint/BlockPainter.cpp
index f1d9ee6a5835a2e1944174a36aab09bc5950bfa4..bfe468f7d58d4898f30ef0e7d80b0c1478cfb28d 100644
--- a/third_party/WebKit/Source/core/paint/BlockPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/BlockPainter.cpp
@@ -74,6 +74,7 @@
if (m_layoutBlock.hasOverflowClip()
&& m_layoutBlock.style()->visibility() == VISIBLE
&& shouldPaintSelfBlockBackground(paintInfo.phase)
+ && paintInfo.shouldPaintWithinRoot(&m_layoutBlock)
&& !paintInfo.paintRootBackgroundOnly()) {
Optional<ClipRecorder> clipRecorder;
if (!m_layoutBlock.layer()->isSelfPaintingLayer()) {
@@ -113,7 +114,7 @@
void BlockPainter::paintInlineBox(const InlineBox& inlineBox, const PaintInfo& paintInfo, const LayoutPoint& paintOffset)
{
- if (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhaseSelection)
+ if (!paintInfo.shouldPaintWithinRoot(LineLayoutPaintShim::constLayoutObjectFrom(inlineBox.lineLayoutItem())) || (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhaseSelection))
return;
LayoutPoint childPoint = paintOffset;
@@ -250,6 +251,7 @@
LineBoxListPainter(m_layoutBlock.lineBoxes()).paint(m_layoutBlock, paintInfo, paintOffset);
} else {
PaintInfo paintInfoForDescendants = paintInfo.forDescendants();
+ paintInfoForDescendants.updatePaintingRootForChildren(&m_layoutBlock);
m_layoutBlock.paintChildren(paintInfoForDescendants, paintOffset);
}
}
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutReplaced.cpp ('k') | third_party/WebKit/Source/core/paint/BoxPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698