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

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

Issue 1088613002: CTM-independent BackgroundBleedBackgroundOverBorder implementation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: expectations Created 5 years, 8 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/TestExpectations ('k') | Source/core/paint/BoxPainter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/BoxDecorationData.cpp
diff --git a/Source/core/paint/BoxDecorationData.cpp b/Source/core/paint/BoxDecorationData.cpp
index 370311d2ceaaa95fa07f7340222ffa3a7895e294..66554ac46a3b4742e3e227ccefa1544b1a3b7004 100644
--- a/Source/core/paint/BoxDecorationData.cpp
+++ b/Source/core/paint/BoxDecorationData.cpp
@@ -38,13 +38,6 @@ BackgroundBleedAvoidance BoxDecorationData::determineBackgroundBleedAvoidance(co
return BackgroundBleedNone;
}
- // If display lists are enabled (via Slimming Paint), then simply clip the background and do not
- // perform advanced bleed-avoidance heuristics. These heuristics are not correct in the presence
- // of impl-side rasterization or layerization, since the actual pixel-relative scaling and rotation
- // of the content is not known to Blink.
- if (RuntimeEnabledFeatures::slimmingPaintEnabled())
- return BackgroundBleedClipBackground;
-
// FIXME: See crbug.com/382491. getCTM does not accurately reflect the scale at the time content is
// rasterized, and should not be relied on to make decisions about bleeding.
AffineTransform ctm = context->getCTM();
chrishtr 2015/04/13 20:40:11 Please factor this code into borderObscuresBackgro
f(malita) 2015/04/13 21:17:59 Done.
@@ -64,8 +57,13 @@ BackgroundBleedAvoidance BoxDecorationData::determineBackgroundBleedAvoidance(co
if (contextScaling.height() > 1)
contextScaling.setHeight(1);
- if (borderObscuresBackgroundEdge(*layoutBox.style(), contextScaling))
+ // If display lists are enabled (via Slimming Paint), then BackgroundBleedShrinkBackground is not
+ // usable as is relies on device-space heuristics. These heuristics are not correct in the presence
+ // of impl-side rasterization or layerization, since the actual pixel-relative scaling and rotation
+ // of the content is not known to Blink.
+ if (!RuntimeEnabledFeatures::slimmingPaintEnabled() && borderObscuresBackgroundEdge(*layoutBox.style(), contextScaling))
chrishtr 2015/04/13 20:40:11 Why not just do it unconditionally? It's not slimm
f(malita) 2015/04/13 21:17:59 Not sure I follow here: BackgroundBleedShrinkBackg
return BackgroundBleedShrinkBackground;
+
if (!hasAppearance && layoutBox.style()->borderObscuresBackground() && layoutBox.backgroundHasOpaqueTopLayer())
return BackgroundBleedBackgroundOverBorder;
chrishtr 2015/04/13 20:40:11 I know it's not blocking slimming paint, but is it
f(malita) 2015/04/13 21:17:59 (are you mixing these fine enum names maybe?) Thi
« no previous file with comments | « LayoutTests/TestExpectations ('k') | Source/core/paint/BoxPainter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698