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

Unified Diff: Source/core/rendering/RenderTableSection.h

Issue 576823004: Move painting code for tables into *Paint classes. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix Created 6 years, 3 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
« no previous file with comments | « Source/core/rendering/RenderTableRow.cpp ('k') | Source/core/rendering/RenderTableSection.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderTableSection.h
diff --git a/Source/core/rendering/RenderTableSection.h b/Source/core/rendering/RenderTableSection.h
index f9fb56d64e1e96bb807b3804701a8d59edb01016..f87164256da1abb398944a6c6ceb01ec12b8212c 100644
--- a/Source/core/rendering/RenderTableSection.h
+++ b/Source/core/rendering/RenderTableSection.h
@@ -30,6 +30,9 @@
namespace blink {
+// This variable is used to balance the memory consumption vs the paint invalidation time on big tables.
+const float gMaxAllowedOverflowingCellRatioForFastPaintPath = 0.1f;
+
enum CollapsedBorderSide {
CBSBefore,
CBSAfter,
@@ -224,6 +227,14 @@ public:
virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE;
+ // Flip the rect so it aligns with the coordinates used by the rowPos and columnPos vectors.
+ LayoutRect logicalRectForWritingModeAndDirection(const LayoutRect&) const;
+
+ CellSpan dirtiedRows(const LayoutRect& paintInvalidationRect) const;
+ CellSpan dirtiedColumns(const LayoutRect& paintInvalidationRect) const;
+ WillBeHeapHashSet<RawPtrWillBeMember<RenderTableCell> >& overflowingCells() { return m_overflowingCells; }
+ bool hasMultipleCellLevels() { return m_hasMultipleCellLevels; }
+
protected:
virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) OVERRIDE;
virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction) OVERRIDE;
@@ -240,7 +251,6 @@ private:
virtual void layout() OVERRIDE;
- void paintCell(RenderTableCell*, PaintInfo&, const LayoutPoint&);
virtual void paintObject(PaintInfo&, const LayoutPoint&) OVERRIDE;
virtual void imageChanged(WrappedImagePtr, const IntRect* = 0) OVERRIDE;
@@ -268,17 +278,12 @@ private:
void updateBaselineForCell(RenderTableCell*, unsigned row, LayoutUnit& baselineDescent);
bool hasOverflowingCell() const { return m_overflowingCells.size() || m_forceSlowPaintPathWithOverflowingCell; }
+
void computeOverflowFromCells(unsigned totalRows, unsigned nEffCols);
CellSpan fullTableRowSpan() const { return CellSpan(0, m_grid.size()); }
CellSpan fullTableColumnSpan() const { return CellSpan(0, table()->columns().size()); }
- // Flip the rect so it aligns with the coordinates used by the rowPos and columnPos vectors.
- LayoutRect logicalRectForWritingModeAndDirection(const LayoutRect&) const;
-
- CellSpan dirtiedRows(const LayoutRect& paintInvalidationRect) const;
- CellSpan dirtiedColumns(const LayoutRect& paintInvalidationRect) const;
-
// 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 start==end.
CellSpan spannedRows(const LayoutRect& flippedRect) const;
« no previous file with comments | « Source/core/rendering/RenderTableRow.cpp ('k') | Source/core/rendering/RenderTableSection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698