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

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

Issue 2432663002: Use table as display item client for painting composited collapsed table cell borders. (Closed)
Patch Set: Add test baselines. Created 4 years, 2 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/LayoutTableCell.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutTableCell.h b/third_party/WebKit/Source/core/layout/LayoutTableCell.h
index 57f1089872620997692b0e55e7b3e25404fa6d20..f3b067dadd0e090a5ec86ff8ed07e9f97801a152 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTableCell.h
+++ b/third_party/WebKit/Source/core/layout/LayoutTableCell.h
@@ -286,13 +286,38 @@ class CORE_EXPORT LayoutTableCell final : public LayoutBlockFlow {
const char* name() const override { return "LayoutTableCell"; }
bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect&) const override;
-
- struct CollapsedBorderValues {
- CollapsedBorderValue startBorder;
- CollapsedBorderValue endBorder;
- CollapsedBorderValue beforeBorder;
- CollapsedBorderValue afterBorder;
+ void invalidateDisplayItemClients(PaintInvalidationReason) const override;
+
+ // TODO(wkorman): Consider renaming to more clearly differentiate from
+ // CollapsedBorderValue.
+ class CollapsedBorderValues : public DisplayItemClient {
+ public:
+ CollapsedBorderValues(const LayoutTable&,
+ const CollapsedBorderValue& startBorder,
+ const CollapsedBorderValue& endBorder,
+ const CollapsedBorderValue& beforeBorder,
+ const CollapsedBorderValue& afterBorder);
+
+ const CollapsedBorderValue& startBorder() const { return m_startBorder; }
+ const CollapsedBorderValue& endBorder() const { return m_endBorder; }
+ const CollapsedBorderValue& beforeBorder() const { return m_beforeBorder; }
+ const CollapsedBorderValue& afterBorder() const { return m_afterBorder; }
+
+ void setCollapsedBorderValues(const CollapsedBorderValues& other);
+
+ // DisplayItemClient methods.
+ String debugName() const;
+ LayoutRect visualRect() const;
+
+ private:
+ const LayoutTable& m_layoutTable;
+ CollapsedBorderValue m_startBorder;
+ CollapsedBorderValue m_endBorder;
+ CollapsedBorderValue m_beforeBorder;
+ CollapsedBorderValue m_afterBorder;
};
+
+ bool usesTableAsAdditionalDisplayItemClient() const;
const CollapsedBorderValues* collapsedBorderValues() const {
return m_collapsedBorderValues.get();
}

Powered by Google App Engine
This is Rietveld 408576698