Chromium Code Reviews| 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..f888e6ccfa4b18bb1694e516a4381bf073a06f6c 100644 |
| --- a/third_party/WebKit/Source/core/layout/LayoutTableCell.h |
| +++ b/third_party/WebKit/Source/core/layout/LayoutTableCell.h |
| @@ -317,7 +317,61 @@ class CORE_EXPORT LayoutTableCell final : public LayoutBlockFlow { |
| CollapsedBorderValue m_afterBorder; |
| }; |
| - bool usesTableAsAdditionalDisplayItemClient() const; |
| + class RowBackgroundDisplayItemClient : public DisplayItemClient { |
|
wkorman
2016/11/15 02:30:14
This class and the two others below are essentiall
|
| + public: |
| + RowBackgroundDisplayItemClient(const LayoutTableRow&); |
| + |
| + // DisplayItemClient methods. |
| + String debugName() const; |
| + LayoutRect visualRect() const; |
| + |
| + private: |
| + const LayoutTableRow& m_layoutTableRow; |
| + }; |
| + |
| + class ColBackgroundDisplayItemClient : public DisplayItemClient { |
| + public: |
| + ColBackgroundDisplayItemClient(const LayoutTableCol&); |
| + |
| + // DisplayItemClient methods. |
| + String debugName() const; |
| + LayoutRect visualRect() const; |
| + |
| + private: |
| + const LayoutTableCol& m_layoutTableCol; |
| + }; |
| + |
| + class SectionBackgroundDisplayItemClient : public DisplayItemClient { |
| + public: |
| + SectionBackgroundDisplayItemClient(const LayoutTableSection&); |
| + |
| + // DisplayItemClient methods. |
| + String debugName() const; |
| + LayoutRect visualRect() const; |
| + |
| + private: |
| + const LayoutTableSection& m_layoutTableSection; |
| + }; |
| + |
| + bool usesCompositedCellDisplayItemClients() const; |
| + void createCompositedCellDisplayItemClients(); |
| + // The special background display item client instances below are only created |
| + // for composited table cells when their associated styling warrants per |
| + // createCompositedCellDisplayItemClients(). |
| + const RowBackgroundDisplayItemClient* rowBackgroundDisplayItemClient() const { |
| + return m_rowBackgroundDisplayItemClient.get(); |
| + } |
| + const ColBackgroundDisplayItemClient* colBackgroundDisplayItemClient() const { |
| + return m_colBackgroundDisplayItemClient.get(); |
| + } |
| + const ColBackgroundDisplayItemClient* colGroupBackgroundDisplayItemClient() |
| + const { |
| + return m_colGroupBackgroundDisplayItemClient.get(); |
| + } |
| + const SectionBackgroundDisplayItemClient* sectionBackgroundDisplayItemClient() |
| + const { |
| + return m_sectionBackgroundDisplayItemClient.get(); |
| + } |
| const CollapsedBorderValues* collapsedBorderValues() const { |
| return m_collapsedBorderValues.get(); |
| } |
| @@ -330,6 +384,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; |
| @@ -428,6 +483,14 @@ class CORE_EXPORT LayoutTableCell final : public LayoutBlockFlow { |
| int m_intrinsicPaddingAfter; |
| std::unique_ptr<CollapsedBorderValues> m_collapsedBorderValues; |
| + std::unique_ptr<RowBackgroundDisplayItemClient> |
|
wkorman
2016/11/15 01:05:33
We could use RareData to turn this batch of pointe
|
| + m_rowBackgroundDisplayItemClient; |
| + std::unique_ptr<ColBackgroundDisplayItemClient> |
| + m_colBackgroundDisplayItemClient; |
| + std::unique_ptr<ColBackgroundDisplayItemClient> |
| + m_colGroupBackgroundDisplayItemClient; |
| + std::unique_ptr<SectionBackgroundDisplayItemClient> |
| + m_sectionBackgroundDisplayItemClient; |
| }; |
| DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTableCell, isTableCell()); |