| 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 f3b067dadd0e090a5ec86ff8ed07e9f97801a152..3145a831c081da7bc5ae9182235986102d60b6d4 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutTableCell.h
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutTableCell.h
|
| @@ -288,12 +288,12 @@ class CORE_EXPORT LayoutTableCell final : public LayoutBlockFlow {
|
| bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect&) const override;
|
| void invalidateDisplayItemClients(PaintInvalidationReason) const override;
|
|
|
| + // TODO(wkorman): Consider making this a struct again as it once was.
|
| // TODO(wkorman): Consider renaming to more clearly differentiate from
|
| // CollapsedBorderValue.
|
| - class CollapsedBorderValues : public DisplayItemClient {
|
| + class CollapsedBorderValues {
|
| public:
|
| - CollapsedBorderValues(const LayoutTable&,
|
| - const CollapsedBorderValue& startBorder,
|
| + CollapsedBorderValues(const CollapsedBorderValue& startBorder,
|
| const CollapsedBorderValue& endBorder,
|
| const CollapsedBorderValue& beforeBorder,
|
| const CollapsedBorderValue& afterBorder);
|
| @@ -305,19 +305,31 @@ class CORE_EXPORT LayoutTableCell final : public LayoutBlockFlow {
|
|
|
| void setCollapsedBorderValues(const CollapsedBorderValues& other);
|
|
|
| + private:
|
| + CollapsedBorderValue m_startBorder;
|
| + CollapsedBorderValue m_endBorder;
|
| + CollapsedBorderValue m_beforeBorder;
|
| + CollapsedBorderValue m_afterBorder;
|
| + };
|
| +
|
| + // Composited table cells may paint content such as borders and backgrounds
|
| + // into their table's graphics layer. In such cases we must use the table's
|
| + // visual rect for that painting. Thus, we use this class to act as a separate
|
| + // display item client for unique id purposes on a per-cell basis.
|
| + class CompositedTableCell : public DisplayItemClient {
|
| + public:
|
| + CompositedTableCell(const LayoutTable&);
|
| +
|
| // 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 CompositedTableCell* compositedTableCell() const;
|
| const CollapsedBorderValues* collapsedBorderValues() const {
|
| return m_collapsedBorderValues.get();
|
| }
|
| @@ -330,6 +342,7 @@ class CORE_EXPORT LayoutTableCell final : public LayoutBlockFlow {
|
| LayoutBox* locationContainer() const override { return section(); }
|
|
|
| protected:
|
| + void ensureIsReadyForPaintInvalidation() override;
|
| void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) override;
|
| void computePreferredLogicalWidths() override;
|
|
|
| @@ -432,6 +445,7 @@ class CORE_EXPORT LayoutTableCell final : public LayoutBlockFlow {
|
| int m_intrinsicPaddingAfter;
|
|
|
| std::unique_ptr<CollapsedBorderValues> m_collapsedBorderValues;
|
| + std::unique_ptr<CompositedTableCell> m_compositedTableCell;
|
| };
|
|
|
| DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTableCell, isTableCell());
|
|
|