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

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

Issue 1562183002: ObjectPainter::paintAsStackingContext() (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/ObjectPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/ObjectPainter.cpp b/third_party/WebKit/Source/core/paint/ObjectPainter.cpp
index 8d5887eecc475256ffc669a340df39d05d754e76..74312345d55e108d5d8514493934d49702d7d301 100644
--- a/third_party/WebKit/Source/core/paint/ObjectPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/ObjectPainter.cpp
@@ -534,4 +534,25 @@ void ObjectPainter::drawSolidBoxSide(GraphicsContext& graphicsContext, int x1, i
graphicsContext.fillPolygon(4, quad, color, antialias);
}
+void ObjectPainter::paintAsStackingContext(const PaintInfo& paintInfo, const LayoutPoint& paintOffset)
+{
+ bool preservePhase = paintInfo.phase == PaintPhaseSelection || paintInfo.phase == PaintPhaseTextClip;
+ if (!preservePhase && paintInfo.phase != PaintPhaseForeground)
+ return;
+
+ PaintInfo info(paintInfo);
+ info.phase = preservePhase ? paintInfo.phase : PaintPhaseBlockBackground;
+ m_layoutObject.paint(info, paintOffset);
+ if (!preservePhase) {
+ info.phase = PaintPhaseChildBlockBackgrounds;
+ m_layoutObject.paint(info, paintOffset);
+ info.phase = PaintPhaseFloat;
+ m_layoutObject.paint(info, paintOffset);
+ info.phase = PaintPhaseForeground;
+ m_layoutObject.paint(info, paintOffset);
+ info.phase = PaintPhaseOutline;
+ m_layoutObject.paint(info, paintOffset);
+ }
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698