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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutTableCol.cpp

Issue 1676933004: Table cell background painting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: LayoutTableCol::clippedOverflowRectForPaintInvalidation fix Created 4 years, 9 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/layout/LayoutTableCol.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutTableCol.cpp b/third_party/WebKit/Source/core/layout/LayoutTableCol.cpp
index aaf594c9e7481959cd7c6dcd0ae31103047c1b45..8c5266746b90d9d578f1cd6002e48414d5051571 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTableCol.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutTableCol.cpp
@@ -110,15 +110,14 @@ bool LayoutTableCol::canHaveChildren() const
LayoutRect LayoutTableCol::clippedOverflowRectForPaintInvalidation(const LayoutBoxModelObject* paintInvalidationContainer, const PaintInvalidationState* paintInvalidationState) const
{
- // For now, just paint invalidate the whole table.
- // FIXME: Find a better way to do this, e.g., need to paint invalidate all the cells that we
- // might have propagated a background color or borders into.
- // FIXME: check for paintInvalidationContainer each time here?
-
- LayoutTable* parentTable = table();
- if (!parentTable)
+ // FIXME: Issue paint invalidation of only the rect the image paints in.
Xianzhu 2016/03/14 20:40:18 "FIXME:" style has been obsoleted by "TODO(name)".
+ LayoutTable* table = this->table();
+ if (!table)
return LayoutRect();
- return parentTable->clippedOverflowRectForPaintInvalidation(paintInvalidationContainer, paintInvalidationState);
+ LayoutRect r = table->frameRect();
Xianzhu 2016/03/14 20:40:18 This is incorrect because frameRect doesn't includ
+ r.setLocation(LayoutPoint(0, 0));
+ mapToVisibleRectInAncestorSpace(paintInvalidationContainer, r, paintInvalidationState);
+ return r;
}
void LayoutTableCol::imageChanged(WrappedImagePtr, const IntRect*)

Powered by Google App Engine
This is Rietveld 408576698