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

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

Issue 2600903002: Paint the whole of a table-part background image behind the cells in a table (Closed)
Patch Set: Paint the whole of an image behind the cells in a table Created 3 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
« no previous file with comments | « third_party/WebKit/Source/core/paint/BackgroundImageGeometry.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/paint/BoxPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/BoxPainter.cpp b/third_party/WebKit/Source/core/paint/BoxPainter.cpp
index e27b590d4d9b9a34d3427d59e66c839501569849..355c45b9d2950dd85e890980b58dfbf2854a7db7 100644
--- a/third_party/WebKit/Source/core/paint/BoxPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/BoxPainter.cpp
@@ -518,6 +518,9 @@ inline bool paintFastBottomLayer(const LayoutBoxModelObject& obj,
SkBlendMode op,
const LayoutObject* backgroundObject,
Optional<BackgroundImageGeometry>& geometry) {
+ // Painting a background image from an ancestor onto a cell is a complex case.
+ if (obj.isTableCell() && backgroundObject && !backgroundObject->isTableCell())
+ return false;
// Complex cases not handled on the fast path.
if (!info.isBottomLayer || !info.isBorderFill ||
info.isClippedWithLocalScrolling)
@@ -533,7 +536,7 @@ inline bool paintFastBottomLayer(const LayoutBoxModelObject& obj,
if (info.shouldPaintImage) {
DCHECK(!geometry);
geometry.emplace();
- geometry->calculate(obj, paintInfo.paintContainer(),
+ geometry->calculate(obj, backgroundObject, paintInfo.paintContainer(),
paintInfo.getGlobalPaintFlags(), layer, rect);
if (!geometry->destRect().isEmpty()) {
@@ -743,7 +746,7 @@ void BoxPainter::paintFillLayer(const LayoutBoxModelObject& obj,
if (info.shouldPaintImage) {
if (!geometry) {
geometry.emplace();
- geometry->calculate(obj, paintInfo.paintContainer(),
+ geometry->calculate(obj, backgroundObject, paintInfo.paintContainer(),
paintInfo.getGlobalPaintFlags(), bgLayer,
scrolledPaintRect);
} else {
« no previous file with comments | « third_party/WebKit/Source/core/paint/BackgroundImageGeometry.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698