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

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

Issue 1197443003: SP: add a scope recorder for painting inline continuation outlines. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 | « LayoutTests/paint/inline/self-painting-continuation-outline-expected.html ('k') | no next file » | 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 a21a7870bc69c48a77ec9c8f0dd694e8f0eaada4..55f284a5f70d8f35b62d9dddf3836412eb10e15d 100644
--- a/Source/core/paint/BlockPainter.cpp
+++ b/Source/core/paint/BlockPainter.cpp
@@ -323,10 +323,13 @@ void BlockPainter::paintContinuationOutlines(const PaintInfo& info, const Layout
// Do not add continuations for outline painting by our containing block if we are a relative positioned
// anonymous block (i.e. have our own layer), paint them straightaway instead. This is because a block depends on layoutObjects in its continuation table being
// in the same layer.
- if (!inlineEnclosedInSelfPaintingLayer && !m_layoutBlock.hasLayer())
+ if (!inlineEnclosedInSelfPaintingLayer && !m_layoutBlock.hasLayer()) {
cb->addContinuationWithOutline(inlineLayoutObject);
- else if (!inlineLayoutObject->firstLineBox() || (!inlineEnclosedInSelfPaintingLayer && m_layoutBlock.hasLayer()))
+ } else if (!inlineLayoutObject->firstLineBox() || (!inlineEnclosedInSelfPaintingLayer && m_layoutBlock.hasLayer())) {
+ // The outline might be painted multiple times if multiple blocks have the same inline element continuation, and the inline has a self-painting layer.
+ ScopeRecorder scopeRecorder(*info.context, *inlineLayoutObject);
InlinePainter(*inlineLayoutObject).paintOutline(info, paintOffset - m_layoutBlock.locationOffset() + inlineLayoutObject->containingBlock()->location());
+ }
}
ContinuationOutlineTableMap* table = continuationOutlineTable();
« no previous file with comments | « LayoutTests/paint/inline/self-painting-continuation-outline-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698