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

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..83018b8343d34b8fc5a3eb69726e7f6dd3063909 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::paintAsPseudoStackingContext(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
« no previous file with comments | « third_party/WebKit/Source/core/paint/ObjectPainter.h ('k') | third_party/WebKit/Source/core/paint/SVGForeignObjectPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698