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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutTableCell.h

Issue 2507893002: Fix painting background for composited table cells in a non-composited row. (Closed)
Patch Set: Add rebaselines to TestExpectations due to http://crbug.com/665765 preventing rebaseline-cl happine… 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/layout/LayoutTableCell.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutTableCell.h b/third_party/WebKit/Source/core/layout/LayoutTableCell.h
index 6ce3209bf396e44e4c80f27cb087251db698acdd..5b21ff2fde9c0037ea729beda72c35ac9b3eb8a8 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTableCell.h
+++ b/third_party/WebKit/Source/core/layout/LayoutTableCell.h
@@ -317,10 +317,28 @@ class CORE_EXPORT LayoutTableCell final : public LayoutBlockFlow {
CollapsedBorderValue m_afterBorder;
};
- bool usesTableAsAdditionalDisplayItemClient() const;
+ class RowBackgroundDisplayItemClient : public DisplayItemClient {
+ public:
+ RowBackgroundDisplayItemClient(const LayoutTableRow&);
+
+ // DisplayItemClient methods.
+ String debugName() const;
+ LayoutRect visualRect() const;
+
+ private:
+ const LayoutTableRow& m_layoutTableRow;
+ };
+
+ bool usesCompositedCellDisplayItemClients() const;
const CollapsedBorderValues* collapsedBorderValues() const {
return m_collapsedBorderValues.get();
}
+ const DisplayItemClient& backgroundDisplayItemClient() const {
+ return m_rowBackgroundDisplayItemClient
+ ? static_cast<const DisplayItemClient&>(
+ *m_rowBackgroundDisplayItemClient)
+ : *this;
+ }
LayoutRect debugRect() const override;
@@ -329,6 +347,8 @@ class CORE_EXPORT LayoutTableCell final : public LayoutBlockFlow {
// A table cell's location is relative to its containing section.
LayoutBox* locationContainer() const override { return section(); }
+ void ensureIsReadyForPaintInvalidation() override;
+
protected:
void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) override;
void computePreferredLogicalWidths() override;
@@ -428,6 +448,8 @@ class CORE_EXPORT LayoutTableCell final : public LayoutBlockFlow {
int m_intrinsicPaddingAfter;
std::unique_ptr<CollapsedBorderValues> m_collapsedBorderValues;
+ std::unique_ptr<RowBackgroundDisplayItemClient>
+ m_rowBackgroundDisplayItemClient;
};
DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTableCell, isTableCell());

Powered by Google App Engine
This is Rietveld 408576698