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

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

Issue 2439113003: Fix the bug that negative outline-offset is covered up by composited (Closed)
Patch Set: Use rebaseline-o-matic because rebaseline-cl doesn't work on this Created 4 years, 1 month 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/PaintLayerPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp b/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
index c96cfcae26f6dabd635ed384294b522c7061f30d..aa0c5ef2966797bc2666ae4263e2f0577f2ba499 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
@@ -267,19 +267,18 @@ PaintResult PaintLayerPainter::paintLayerContents(
paintFlags & PaintLayerPaintingCompositingForegroundPhase;
bool isPaintingCompositedBackground =
paintFlags & PaintLayerPaintingCompositingBackgroundPhase;
+ bool isPaintingCompositedDecoration =
+ paintFlags & PaintLayerPaintingCompositingDecorationPhase;
bool isPaintingOverflowContents =
paintFlags & PaintLayerPaintingOverflowContents;
// Outline always needs to be painted even if we have no visible content.
- // Also, the outline is painted in the background phase during composited
- // scrolling. If it were painted in the foreground phase, it would move with
- // the scrolled content. When not composited scrolling, the outline is painted
- // in the foreground phase. Since scrolled contents are moved by paint
- // invalidation in this case, the outline won't get 'dragged along'.
+ // It is painted as part of the decoration phase which paints content that
+ // is not scrolled and should be above scrolled content.
bool shouldPaintSelfOutline =
isSelfPaintingLayer && !isPaintingOverlayScrollbars &&
- ((isPaintingScrollingContent && isPaintingCompositedBackground) ||
- (!isPaintingScrollingContent && isPaintingCompositedForeground)) &&
+ (isPaintingCompositedDecoration || !isPaintingScrollingContent) &&
m_paintLayer.layoutObject()->styleRef().hasOutline();
+
bool shouldPaintContent = m_paintLayer.hasVisibleContent() &&
isSelfPaintingLayer && !isPaintingOverlayScrollbars;

Powered by Google App Engine
This is Rietveld 408576698