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

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

Issue 2786463004: Paint backgrounds of a table section/row in one display item (Closed)
Patch Set: - Created 3 years, 8 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/LayoutTableSection.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutTableSection.h b/third_party/WebKit/Source/core/layout/LayoutTableSection.h
index 91b3e6770adfb9b60abdef5054ef8c3d06525ef4..b67e327bcfc8746c53e997f4c009bf6607a59a24 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTableSection.h
+++ b/third_party/WebKit/Source/core/layout/LayoutTableSection.h
@@ -57,6 +57,13 @@ class CellSpan {
unsigned m_end;
};
+inline bool operator==(const CellSpan& s1, const CellSpan& s2) {
+ return s1.start() == s2.start() && s1.end() == s2.end();
+}
+inline bool operator!=(const CellSpan& s1, const CellSpan& s2) {
+ return !(s1 == s2);
+}
+
class LayoutTableCell;
class LayoutTableRow;
@@ -316,7 +323,7 @@ class CORE_EXPORT LayoutTableSection final : public LayoutTableBoxComponent {
CellSpan dirtiedRows(const LayoutRect& visualRect) const;
CellSpan dirtiedEffectiveColumns(const LayoutRect& visualRect) const;
- const HashSet<LayoutTableCell*>& overflowingCells() const {
+ const HashSet<const LayoutTableCell*>& overflowingCells() const {
return m_overflowingCells;
}
bool hasMultipleCellLevels() const { return m_hasMultipleCellLevels; }
@@ -345,6 +352,11 @@ class CORE_EXPORT LayoutTableSection final : public LayoutTableBoxComponent {
void layout() override;
+ CellSpan fullSectionRowSpan() const { return CellSpan(0, m_grid.size()); }
+ CellSpan fullTableEffectiveColumnSpan() const {
+ return CellSpan(0, table()->numEffectiveColumns());
+ }
+
protected:
void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) override;
bool nodeAtPoint(HitTestResult&,
@@ -420,11 +432,6 @@ class CORE_EXPORT LayoutTableSection final : public LayoutTableBoxComponent {
void computeOverflowFromCells(unsigned totalRows, unsigned nEffCols);
- CellSpan fullTableRowSpan() const { return CellSpan(0, m_grid.size()); }
- CellSpan fullTableEffectiveColumnSpan() const {
- return CellSpan(0, table()->numEffectiveColumns());
- }
-
// These two functions take a rectangle as input that has been flipped by
// logicalRectForWritingModeAndDirection.
// The returned span of rows or columns is end-exclusive, and empty if
@@ -443,6 +450,8 @@ class CORE_EXPORT LayoutTableSection final : public LayoutTableBoxComponent {
// size accordingly.
void adjustRowForPagination(LayoutTableRow&, SubtreeLayoutScope&);
+ bool paintedOutputOfObjectHasNoEffectRegardlessOfSize() const override;
+
// The representation of the rows and their cells (CellStruct).
Vector<RowStruct> m_grid;
@@ -480,7 +489,7 @@ class CORE_EXPORT LayoutTableSection final : public LayoutTableBoxComponent {
// If we have more than gMaxAllowedOverflowingCellRatio * total cells, it will
// be empty and m_forceSlowPaintPathWithOverflowingCell will be set to save
// memory.
- HashSet<LayoutTableCell*> m_overflowingCells;
+ HashSet<const LayoutTableCell*> m_overflowingCells;
bool m_forceSlowPaintPathWithOverflowingCell;
// This boolean tracks if we have cells overlapping due to rowspan / colspan
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTableRow.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutTableSection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698